commit
53517392f2
@ -1,180 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Form element to select a date. |
||||
* |
||||
* Class DatePicker |
||||
*/ |
||||
class DatePicker extends HTML_QuickForm_text |
||||
{ |
||||
/** |
||||
* @param string $elementName |
||||
* @param string $elementLabel |
||||
* @param array $attributes |
||||
*/ |
||||
public function __construct($elementName = null, $elementLabel = null, $attributes = null) |
||||
{ |
||||
if (!isset($attributes['id'])) { |
||||
$attributes['id'] = $elementName; |
||||
} |
||||
$attributes['class'] = 'form-control'; |
||||
|
||||
parent::__construct($elementName, $elementLabel, $attributes); |
||||
$this->_appendName = true; |
||||
$this->_type = 'date_picker'; |
||||
} |
||||
|
||||
/** |
||||
* HTML code to display this datepicker |
||||
* |
||||
* @return string |
||||
*/ |
||||
public function toHtml() |
||||
{ |
||||
if ($this->_flagFrozen) { |
||||
return $this->getFrozenHtml(); |
||||
} |
||||
|
||||
$id = $this->getAttribute('id'); |
||||
$value = $this->getValue(); |
||||
$label = $this->getLabel(); |
||||
|
||||
if (!empty($value)) { |
||||
$value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H); |
||||
} |
||||
|
||||
return $this->getElementJS() . ' |
||||
<div class="input-group"> |
||||
<span class="input-group-addon"> |
||||
<input ' . $this->_getAttrString($this->_attributes) . '> |
||||
</span> |
||||
<input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '"> |
||||
</div> |
||||
'; |
||||
} |
||||
|
||||
/** |
||||
* @param string $value |
||||
*/ |
||||
public function setValue($value) |
||||
{ |
||||
$value = substr($value, 0, 16); |
||||
$this->updateAttributes( |
||||
array( |
||||
'value' => $value |
||||
) |
||||
); |
||||
} |
||||
|
||||
/** |
||||
* Get the necessary javascript for this datepicker |
||||
* @return string |
||||
*/ |
||||
private function getElementJS() |
||||
{ |
||||
$js = null; |
||||
$id = $this->getAttribute('id'); |
||||
|
||||
$js .= "<script> |
||||
$(function() { |
||||
$('#$id').hide().datepicker({ |
||||
defaultDate: '" . $this->getValue() . "', |
||||
dateFormat: 'yy-mm-dd', |
||||
altField: '#{$id}_alt', |
||||
altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\", |
||||
showOn: 'both', |
||||
buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "', |
||||
buttonImageOnly: true, |
||||
buttonText: '" . get_lang('SelectDate') . "', |
||||
changeMonth: true, |
||||
changeYear: true, |
||||
yearRange: 'c-60y:c+5y' |
||||
}); |
||||
}); |
||||
</script>"; |
||||
|
||||
return $js; |
||||
} |
||||
|
||||
/** |
||||
* @param string $layout |
||||
* |
||||
* @return string |
||||
*/ |
||||
public function getTemplate($layout) |
||||
{ |
||||
$size = $this->getColumnsSize(); |
||||
$id = $this->getAttribute('id'); |
||||
$value = $this->getValue(); |
||||
|
||||
if (empty($size)) { |
||||
$sizeTemp = $this->getInputSize(); |
||||
if (empty($size)) { |
||||
$sizeTemp = 8; |
||||
} |
||||
$size = array(2, $sizeTemp, 2); |
||||
} else { |
||||
if (is_array($size)) { |
||||
if (count($size) != 3) { |
||||
$sizeTemp = $this->getInputSize(); |
||||
if (empty($size)) { |
||||
$sizeTemp = 8; |
||||
} |
||||
$size = array(2, $sizeTemp, 2); |
||||
} |
||||
// else just keep the $size array as received |
||||
} else { |
||||
$size = array(2, intval($size), 2); |
||||
} |
||||
} |
||||
|
||||
if (!empty($value)) { |
||||
$value = api_format_date($value, DATE_FORMAT_LONG_NO_DAY); |
||||
} |
||||
|
||||
switch ($layout) { |
||||
case FormValidator::LAYOUT_INLINE: |
||||
return ' |
||||
<div class="form-group {error_class}"> |
||||
<label {label-for} > |
||||
<!-- BEGIN required --><span class="form_required">*</span><!-- END required --> |
||||
{label} |
||||
</label> |
||||
|
||||
{element} |
||||
</div>'; |
||||
break; |
||||
case FormValidator::LAYOUT_HORIZONTAL: |
||||
return ' |
||||
<div class="form-group {error_class}"> |
||||
<label {label-for} class="col-sm-'.$size[0].' control-label" > |
||||
<!-- BEGIN required --><span class="form_required">*</span><!-- END required --> |
||||
{label} |
||||
</label> |
||||
<div class="col-sm-'.$size[1].'"> |
||||
{icon} |
||||
|
||||
{element} |
||||
|
||||
<!-- BEGIN label_2 --> |
||||
<p class="help-block">{label_2}</p> |
||||
<!-- END label_2 --> |
||||
|
||||
<!-- BEGIN error --> |
||||
<span class="help-inline">{error}</span> |
||||
<!-- END error --> |
||||
</div> |
||||
<div class="col-sm-'.$size[2].'"> |
||||
<!-- BEGIN label_3 --> |
||||
{label_3} |
||||
<!-- END label_3 --> |
||||
</div> |
||||
</div>'; |
||||
break; |
||||
case FormValidator::LAYOUT_BOX_NO_LABEL: |
||||
return '{element}'; |
||||
break; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,5 @@ |
||||
<div> |
||||
Congratulations! You have finished this learning path |
||||
</div> |
||||
((certificate)) <br /> |
||||
((skill)) |
@ -0,0 +1,128 @@ |
||||
<?php |
||||
|
||||
$_in_course = true; |
||||
require_once '../inc/global.inc.php'; |
||||
$current_course_tool = TOOL_GRADEBOOK; |
||||
|
||||
api_protect_course_script(true); |
||||
|
||||
$courseCode = api_get_course_id(); |
||||
$userId = api_get_user_id(); |
||||
$sessionId = api_get_session_id(); |
||||
$id = isset($_GET['id']) ? intval($_GET['id']) : 0; |
||||
$lpId = isset($_GET['lp_id']) ? intval($_GET['lp_id']) : 0; |
||||
|
||||
if (!$id && !$lpId) { |
||||
Display::display_warning_message(get_lang('FileNotFound')); |
||||
exit; |
||||
} |
||||
|
||||
$catLoad = Category::load(null, null, $courseCode, null, null, $sessionId, 'ORDER By id'); |
||||
|
||||
if (!$catLoad) { |
||||
Display::display_warning_message(get_lang('FileNotFound')); |
||||
exit; |
||||
} |
||||
|
||||
$categoryId = $catLoad[0]->get_id(); |
||||
$link = LinkFactory::load(null, null, $lpId, null, $courseCode, $categoryId); |
||||
$downloadCertificateLink = ''; |
||||
$viewCertificateLink = ''; |
||||
$badgeLink = ''; |
||||
|
||||
if ($link) { |
||||
$cat = new Category(); |
||||
$catCourseCode = CourseManager::get_course_by_category($categoryId); |
||||
$show_message = $cat->show_message_resource_delete($catCourseCode); |
||||
|
||||
if ($show_message == '') { |
||||
if (!api_is_allowed_to_edit() && !api_is_excluded_user_type()) { |
||||
$certificate = Category::register_user_certificate( |
||||
$categoryId, |
||||
$userId |
||||
); |
||||
if (isset($certificate['pdf_url']) && isset($certificate['certificate_link']) && isset($certificate['badge_link'])) { |
||||
$downloadCertificateLink .= Display::url(Display::returnFontAwesomeIcon('file-pdf-o') . |
||||
get_lang('DownloadCertificatePdf'), |
||||
$certificate['pdf_url'], |
||||
['class' => 'btn btn-default'] |
||||
); |
||||
$viewCertificateLink .= $certificate['certificate_link']; |
||||
$downloadCertificateLink = " |
||||
<div class='panel panel-default'> |
||||
<div class='panel-body'> |
||||
<h3 class='text-center'>".get_lang('NowDownloadYourCertificateClickHere')."</h3> |
||||
<div class='text-center'>$downloadCertificateLink $viewCertificateLink</div> |
||||
</div> |
||||
</div> |
||||
"; |
||||
|
||||
$skillRelUser = new SkillRelUser(); |
||||
$courseId = api_get_course_int_id(); |
||||
$userSkills = $skillRelUser->get_user_skills($userId, $courseId, $sessionId); |
||||
$skillList = ''; |
||||
|
||||
if ($userSkills) { |
||||
$skill = new Skill(); |
||||
foreach ($userSkills as $userSkill) { |
||||
$oneSkill = $skill->get($userSkill['skill_id']); |
||||
$skillList .= " |
||||
<div class='row'> |
||||
<div class='col-md-2 col-xs-6'> |
||||
<div class='thumbnail'> |
||||
<img class='skill-badge-img' src='".$oneSkill['web_icon_path']."' > |
||||
</div> |
||||
</div> |
||||
<div class='col-md-8 col-xs-6'> |
||||
<h5><b>".$oneSkill['name']."</b></h5> |
||||
".$oneSkill['description']." |
||||
</div> |
||||
<div class='col-md-2 col-xs-12'> |
||||
<h5><b>".get_lang('ShareWithYourFriends')."</b></h5> |
||||
<a href='http://www.facebook.com/sharer.php?u=".api_get_path(WEB_PATH)."badge/".$oneSkill['id']."/user/".$userId."' target='_new'> |
||||
<em class='fa fa-facebook-square fa-3x text-info' aria-hidden='true'></em> |
||||
</a> |
||||
<a href='https://twitter.com/home?status=".api_get_path(WEB_PATH)."badge/".$oneSkill['id']."/user/".$userId."' target='_new'> |
||||
<em class='fa fa-twitter-square fa-3x text-light' aria-hidden='true'></em> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
"; |
||||
} |
||||
$badgeLink .= " |
||||
<div class='panel panel-default'> |
||||
<div class='panel-body'> |
||||
<h3 class='text-center'>".get_lang('AdditionallyYouHaveObtainedTheFollowingSkills')."</h3> |
||||
$skillList |
||||
</div> |
||||
</div> |
||||
"; |
||||
} |
||||
|
||||
$documentInfo = DocumentManager::get_document_data_by_id( |
||||
$id, |
||||
$courseCode, |
||||
true, |
||||
$sessionId |
||||
); |
||||
|
||||
$finalItemTemplate = file_get_contents($documentInfo['absolute_path']); |
||||
|
||||
$finalItemTemplate = str_replace('((certificate))', $downloadCertificateLink, $finalItemTemplate); |
||||
$finalItemTemplate = str_replace('((skill))', $badgeLink, $finalItemTemplate); |
||||
} else { |
||||
Display::display_warning_message(get_lang('LearnpathPrereqNotCompleted')); |
||||
$finalItemTemplate = ''; |
||||
} |
||||
|
||||
$currentScore = Category::getCurrentScore($userId, $categoryId, $courseCode, $sessionId, true); |
||||
Category::registerCurrentScore($currentScore, $userId, $categoryId); |
||||
} |
||||
} |
||||
} |
||||
|
||||
// Instance a new template : No page tittle, No header, No footer |
||||
$tpl = new Template(null, false, false); |
||||
$tpl->assign('content', $finalItemTemplate); |
||||
$tpl->display_one_col_template(); |
||||
|
@ -0,0 +1,51 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\Admin; |
||||
|
||||
use Sonata\AdminBundle\Admin\Admin; |
||||
use Sonata\AdminBundle\Datagrid\ListMapper; |
||||
use Sonata\AdminBundle\Form\FormMapper; |
||||
use Sonata\AdminBundle\Datagrid\DatagridMapper; |
||||
|
||||
/** |
||||
* Class UserAdmin |
||||
* @package Chamilo\ContactBundle\Admin |
||||
*/ |
||||
class CategoryAdmin extends Admin |
||||
{ |
||||
/** |
||||
* @param ListMapper $listMapper |
||||
*/ |
||||
protected function configureListFields(ListMapper $listMapper) |
||||
{ |
||||
$listMapper |
||||
//->add('headline', null, array('identifier' => true)) |
||||
->add('name', null, array('identifier' => true)) |
||||
->add('email') |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
protected function configureFormFields(FormMapper $formMapper) |
||||
{ |
||||
$formMapper |
||||
->add('name') |
||||
->add('email') |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* @param DatagridMapper $datagridMapper |
||||
*/ |
||||
protected function configureDatagridFilters(DatagridMapper $datagridMapper) |
||||
{ |
||||
$datagridMapper |
||||
->add('name') |
||||
->add('email') |
||||
; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,15 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
|
||||
/** |
||||
* Class ChamiloContactBundle |
||||
* @package Chamilo\ChamiloContactBundle |
||||
*/ |
||||
class ChamiloContactBundle extends Bundle |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,93 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\Controller; |
||||
|
||||
use Chamilo\ContactBundle\Entity\Category; |
||||
use Chamilo\ContactBundle\Form\Type\ContactType; |
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
||||
use Symfony\Component\HttpFoundation\Request; |
||||
use Symfony\Component\HttpFoundation\Response; |
||||
use Chamilo\UserBundle\Entity\User; |
||||
|
||||
/** |
||||
* |
||||
* Class ContactController |
||||
* |
||||
* @Route("/") |
||||
* |
||||
* @package Chamilo\ContactBundle\Controller |
||||
*/ |
||||
class ContactController extends Controller |
||||
{ |
||||
/** |
||||
* @Route("/", name="contact") |
||||
* |
||||
* @param Request $request |
||||
* @return mixed |
||||
*/ |
||||
public function indexAction(Request $request) |
||||
{ |
||||
$type = new ContactType(); |
||||
/** @var User $user */ |
||||
$user = $this->getUser(); |
||||
$data = []; |
||||
|
||||
if ($user) { |
||||
$data = [ |
||||
'firstname' => $user->getFirstname(), |
||||
'lastname' => $user->getFirstname(), |
||||
'email' => $user->getEmail(), |
||||
|
||||
]; |
||||
} |
||||
|
||||
$form = $this->createForm($type, $data); |
||||
|
||||
if ($request->isMethod('POST')) { |
||||
$form->bind($request); |
||||
|
||||
$em = $this->getDoctrine()->getManager(); |
||||
|
||||
$category = $form->get('category')->getData(); |
||||
/** @var Category $category */ |
||||
$category = $em->getRepository('ChamiloContactBundle:Category')->find($category); |
||||
|
||||
if ($form->isValid()) { |
||||
$message = \Swift_Message::newInstance() |
||||
->setSubject($form->get('subject')->getData()) |
||||
->setFrom($form->get('email')->getData()) |
||||
->setTo($category->getEmail()) |
||||
->setBody( |
||||
$this->renderView( |
||||
'@ChamiloContact/contact.html.twig', |
||||
array( |
||||
'ip' => $request->getClientIp(), |
||||
'firstname' => $form->get('firstname')->getData(), |
||||
'lastname' => $form->get('lastname')->getData(), |
||||
'subject' => $form->get('subject')->getData(), |
||||
'email' => $form->get('email')->getData(), |
||||
'message' => $form->get('message')->getData() |
||||
) |
||||
) |
||||
); |
||||
|
||||
$this->get('mailer')->send($message); |
||||
$this->addFlash( |
||||
'success', |
||||
'Your email has been sent! Thanks!' |
||||
); |
||||
|
||||
return $this->redirect($this->generateUrl('contact')); |
||||
} |
||||
} |
||||
|
||||
return $this->render( |
||||
'@ChamiloContact/index.html.twig', |
||||
array( |
||||
'form' => $form->createView() |
||||
) |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,26 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\DependencyInjection; |
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder; |
||||
use Symfony\Component\Config\FileLocator; |
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
||||
use Symfony\Component\DependencyInjection\Loader; |
||||
|
||||
/** |
||||
* This is the class that loads and manages your bundle configuration |
||||
* |
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
||||
*/ |
||||
class ChamiloContactExtension extends Extension |
||||
{ |
||||
/** |
||||
* {@inheritDoc} |
||||
*/ |
||||
public function load(array $configs, ContainerBuilder $container) |
||||
{ |
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||||
$loader->load('admin.yml'); |
||||
} |
||||
} |
@ -0,0 +1,81 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
|
||||
/** |
||||
* Class Category |
||||
* |
||||
* @ORM\Entity |
||||
* @ORM\Table( |
||||
* name="contact_category" |
||||
* ) |
||||
* |
||||
* @package Chamilo\FaqBundle\Entity |
||||
*/ |
||||
class Category |
||||
{ |
||||
/** |
||||
* @var integer |
||||
* |
||||
* @ORM\Column(name="id", type="integer") |
||||
* @ORM\Id |
||||
* @ORM\GeneratedValue() |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @var string |
||||
* @ORM\Column(name="name", type="string", nullable=false) |
||||
*/ |
||||
protected $name; |
||||
|
||||
/** |
||||
* @var string |
||||
* @ORM\Column(name="email", type="string") |
||||
*/ |
||||
protected $email; |
||||
|
||||
public function __toString() |
||||
{ |
||||
return (string) $this->getName(); |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* @param string $name |
||||
* @return Category |
||||
*/ |
||||
public function setName($name) |
||||
{ |
||||
$this->name = $name; |
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getEmail() |
||||
{ |
||||
return $this->email; |
||||
} |
||||
|
||||
/** |
||||
* @param string $email |
||||
* @return Category |
||||
*/ |
||||
public function setEmail($email) |
||||
{ |
||||
$this->email = $email; |
||||
return $this; |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
|
||||
class Contact |
||||
{ |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,78 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\ContactBundle\Form\Type; |
||||
|
||||
use Symfony\Component\Form\AbstractType; |
||||
use Symfony\Component\Form\FormBuilderInterface; |
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
||||
use Symfony\Component\Validator\Constraints\Collection; |
||||
use Symfony\Component\Validator\Constraints\Email; |
||||
use Symfony\Component\Validator\Constraints\Length; |
||||
use Symfony\Component\Validator\Constraints\NotBlank; |
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; |
||||
|
||||
/** |
||||
* Class ContactType |
||||
* @package Chamilo\ContactBundle\Form\Type |
||||
*/ |
||||
class ContactType extends AbstractType |
||||
{ |
||||
/** |
||||
* @param FormBuilderInterface $builder |
||||
* @param array $options |
||||
*/ |
||||
public function buildForm(FormBuilderInterface $builder, array $options) |
||||
{ |
||||
$builder |
||||
->add( |
||||
'category', |
||||
EntityType::class, |
||||
['class' => 'Chamilo\ContactBundle\Entity\Category'] |
||||
) |
||||
->add('firstname') |
||||
->add('lastname') |
||||
->add('email') |
||||
->add('subject') |
||||
->add('message', 'textarea') |
||||
->add('send', SubmitType::class, ['attr' => ['class' => 'btn btn-primary']]) |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* @param OptionsResolverInterface $resolver |
||||
*/ |
||||
public function setDefaultOptions(OptionsResolverInterface $resolver) |
||||
{ |
||||
$collectionConstraint = new Collection(array( |
||||
'category' => array( |
||||
new NotBlank(array('message' => 'Category should not be blank.')) |
||||
), |
||||
'firstname' => array( |
||||
new NotBlank(array('message' => 'firstname should not be blank.')), |
||||
new Length(array('min' => 2)) |
||||
), |
||||
'lastname' => array( |
||||
new NotBlank(array('message' => 'lastname should not be blank.')), |
||||
new Length(array('min' => 2)) |
||||
), |
||||
'email' => array( |
||||
new NotBlank(array('message' => 'Email should not be blank.')), |
||||
new Email(array('message' => 'Invalid email address.')) |
||||
), |
||||
'subject' => array( |
||||
new NotBlank(array('message' => 'Subject should not be blank.')), |
||||
new Length(array('min' => 3)) |
||||
), |
||||
'message' => array( |
||||
new NotBlank(array('message' => 'Message should not be blank.')), |
||||
new Length(array('min' => 5)) |
||||
) |
||||
)); |
||||
|
||||
$resolver->setDefaults(array( |
||||
'constraints' => $collectionConstraint |
||||
)); |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
services: |
||||
sonata.admin.contact_category: |
||||
class: Chamilo\ContactBundle\Admin\CategoryAdmin |
||||
tags: |
||||
- { name: sonata.admin, manager_type: orm, group: "LMS", label: "Contact category" } |
||||
arguments: |
||||
- ~ |
||||
- Chamilo\ContactBundle\Entity\Category |
||||
- ~ |
@ -0,0 +1,3 @@ |
||||
contact: |
||||
resource: "@ChamiloContactBundle/Controller/ContactController.php" |
||||
type: annotation |
@ -0,0 +1,11 @@ |
||||
{{ 'You had a new message from %url%' | trans({'%url%': url(app.request.attributes.get('_route'))} ) }} |
||||
|
||||
{{ 'Firstname' | trans }} : {{ firstname }} |
||||
{{ 'Lirstname' | trans }} : {{ lastname }} |
||||
|
||||
Email: {{ email }} |
||||
IP: {{ ip }} |
||||
|
||||
{{ 'Subject' | trans }} : {{ subject }} |
||||
{{ 'Message' | trans }} : |
||||
{{ message|raw }} |
@ -0,0 +1,12 @@ |
||||
{% extends '@ChamiloCore/layout_one_col.html.twig' %} |
||||
|
||||
{% block content %} |
||||
|
||||
<section id="main_content"> |
||||
<div class="page-header"><h2>{{ 'Contact' | trans }}</h2> |
||||
</div> |
||||
{{ form_start(form) }} |
||||
{{ form_widget(form, {'attr': {'class': ''}}) }} |
||||
{{ form_end(form) }} |
||||
</section> |
||||
{% endblock %} |
@ -0,0 +1,37 @@ |
||||
{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %} |
||||
|
||||
{% block page_content %} |
||||
|
||||
{% if js is defined %} |
||||
{% autoescape false %} |
||||
{% for item in js %} |
||||
{{ item }} |
||||
{% endfor %} |
||||
{% endautoescape %} |
||||
{% endif %} |
||||
|
||||
<div class="row"> |
||||
<div class="col-xs-12 col-md-12"> |
||||
{# Breadcrumb #} |
||||
{% block chamilo_breadcrumb %} |
||||
{# {% include '@ChamiloCore/breadcrumb.html.twig' %}#} |
||||
{% endblock %} |
||||
|
||||
{% block chamilo_messages %} |
||||
{# Flash messages #} |
||||
{% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} |
||||
{% endblock %} |
||||
|
||||
{# Content #} |
||||
{% block content %} |
||||
<section id="main_content"> |
||||
{% autoescape false %} |
||||
{{ content }} |
||||
{% endautoescape %} |
||||
</section> |
||||
{% endblock %} |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
@ -0,0 +1,48 @@ |
||||
{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %} |
||||
|
||||
{% set pathInfo = path( |
||||
app.request.attributes.get('_route'), |
||||
app.request.attributes.get('_route_params')) |
||||
%} |
||||
|
||||
{% block page_content %} |
||||
{# Left column #} |
||||
<div class="col-md-3"> |
||||
{% block chamilo_left_column %} |
||||
<section class="left_column"> |
||||
{% if is_granted('IS_AUTHENTICATED_FULLY') %} |
||||
{{ render(controller('ChamiloThemeBundle:Sidebar:userPanel', {'pathInfo': pathInfo })) }} |
||||
{#{{ render(controller('ChamiloThemeBundle:Sidebar:searchForm')) }}#} |
||||
{% endif %} |
||||
|
||||
{# Sidebar menu #} |
||||
{{ render(controller('ChamiloThemeBundle:Sidebar:menuKnp', {'request' : app.request, pathInfo: pathInfo })) }} |
||||
|
||||
{# Skill block see SkillBlockService.php #} |
||||
{#{{ sonata_block_render({'type': 'chamilo_core.block.skill'}) }}#} |
||||
</section> |
||||
{% endblock %} |
||||
</div> |
||||
|
||||
{# Right column #} |
||||
<div class="col-md-9"> |
||||
{% block chamilo_breadcrumb %} |
||||
{% include '@ChamiloCore/breadcrumb.html.twig' %} |
||||
{% endblock %} |
||||
|
||||
{% block chamilo_messages %} |
||||
{# Flash messages #} |
||||
{% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} |
||||
{% endblock %} |
||||
|
||||
{% block chamilo_right_column %} |
||||
{% block content %} |
||||
<section class="right_column"> |
||||
{% autoescape false %} |
||||
{{ content }} |
||||
{% endautoescape %} |
||||
</section> |
||||
{% endblock %} |
||||
{% endblock %} |
||||
</div> |
||||
{% endblock %} |
Loading…
Reference in new issue