parent
c0c44ea693
commit
c9a4165d0f
@ -0,0 +1,73 @@ |
||||
|
||||
sonata_user_security: |
||||
resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml" |
||||
|
||||
sonata_user_resetting: |
||||
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml" |
||||
prefix: /resetting |
||||
|
||||
sonata_user_profile: |
||||
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml" |
||||
prefix: /profile |
||||
|
||||
sonata_user_register: |
||||
resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml" |
||||
prefix: /register |
||||
|
||||
sonata_user_change_password: |
||||
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml" |
||||
prefix: /profile |
||||
|
||||
sonata_page_cache: |
||||
resource: '@SonataPageBundle/Resources/config/routing/cache.xml' |
||||
prefix: / |
||||
|
||||
sonata_page_exceptions: |
||||
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml' |
||||
prefix: /page |
||||
|
||||
sonata_media_gallery: |
||||
resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml' |
||||
prefix: /media/gallery |
||||
|
||||
sonata_media_media: |
||||
resource: '@SonataMediaBundle/Resources/config/routing/media.xml' |
||||
prefix: /media |
||||
|
||||
#sonata_customer: |
||||
# resource: @SonataCustomerBundle/Resources/config/routing/customer.xml |
||||
# prefix: /shop/user |
||||
# |
||||
#sonata_basket: |
||||
# resource: @SonataBasketBundle/Resources/config/routing/basket.xml |
||||
# prefix: /shop/basket |
||||
# |
||||
#sonata_order: |
||||
# resource: @SonataOrderBundle/Resources/config/routing/order.xml |
||||
# prefix: /shop/user/order |
||||
# |
||||
#sonata_product_catalog: |
||||
# resource: @SonataProductBundle/Resources/config/routing/catalog.xml |
||||
# prefix: /shop/catalog |
||||
# |
||||
#sonata_product: |
||||
# resource: @SonataProductBundle/Resources/config/routing/product.xml |
||||
# prefix: /shop/product |
||||
# |
||||
#sonata_payment: |
||||
# resource: @SonataPaymentBundle/Resources/config/routing/payment.xml |
||||
# prefix: /shop/payment |
||||
# |
||||
#sonata_invoice: |
||||
# resource: @SonataInvoiceBundle/Resources/config/routing/invoice.xml |
||||
# prefix: /shop/user/invoice |
||||
|
||||
#blog: |
||||
# resource: '@SonataNewsBundle/Resources/config/routing/news.xml' |
||||
# prefix: /blog |
||||
|
||||
#fos_comment: |
||||
# type: rest |
||||
# resource: "@FOSCommentBundle/Resources/config/routing.yml" |
||||
# prefix: /comments |
||||
# defaults: { _format: html } |
||||
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\AdminBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
|
||||
/** |
||||
* Class ApplicationSonataAdminBundle |
||||
* @package Application\Sonata\AdminBundle |
||||
*/ |
||||
class ChamiloAdminBundle extends Bundle |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getParent() |
||||
{ |
||||
return 'SonataAdminBundle'; |
||||
} |
||||
} |
||||
@ -0,0 +1,44 @@ |
||||
{# See vendor/sonata-project/admin-bundle/Resources/views/standard_layout.html.twig#} |
||||
{% extends '@ChamiloAdmin/standard_layout.html.twig' %} |
||||
|
||||
{% block stylesheets %} |
||||
{{ parent() }} |
||||
|
||||
<link rel="stylesheet" |
||||
href="{{ asset('bundles/sonataformatter/markitup/skins/sonata/style.css') }}" |
||||
type="text/css" media="all"/> |
||||
<link rel="stylesheet" |
||||
href="{{ asset('bundles/sonataformatter/markitup/sets/markdown/style.css') }}" |
||||
type="text/css" media="all"/> |
||||
<link rel="stylesheet" |
||||
href="{{ asset('bundles/sonataformatter/markitup/sets/html/style.css') }}" |
||||
type="text/css" media="all"/> |
||||
<link rel="stylesheet" |
||||
href="{{ asset('bundles/sonataformatter/markitup/sets/textile/style.css') }}" |
||||
type="text/css" media="all"/> |
||||
<link rel="stylesheet" |
||||
href="{{ asset('bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css') }}"/> |
||||
{% endblock %} |
||||
|
||||
{% block javascripts %} |
||||
{{ parent() }} |
||||
|
||||
<script src="{{ asset('bundles/ivoryckeditor/ckeditor.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonataformatter/markitup/sets/markdown/set.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonataformatter/markitup/sets/html/set.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonataformatter/markitup/sets/textile/set.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonatacore/vendor/moment/min/moment.min.js') }}" |
||||
type="text/javascript"></script> |
||||
<script src="{{ asset('bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js') }}" |
||||
type="text/javascript"></script> |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block footer %} |
||||
{% endblock %} |
||||
@ -0,0 +1,375 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
{% set _preview = block('preview') %} |
||||
{% set _form = block('form') %} |
||||
{% set _show = block('show') %} |
||||
{% set _list_table = block('list_table') %} |
||||
{% set _list_filters = block('list_filters') %} |
||||
{% set _tab_menu = block('tab_menu') %} |
||||
{% set _content = block('content') %} |
||||
{% set _title = block('title') %} |
||||
{% set _breadcrumb = block('breadcrumb') %} |
||||
{% set _actions = block('actions') %} |
||||
{% set _navbar_title = block('navbar_title') %} |
||||
{% set _list_filters_actions = block('list_filters_actions') %} |
||||
|
||||
<!DOCTYPE html> |
||||
<html {% block html_attributes %}class="no-js"{% endblock %}> |
||||
<head> |
||||
{% block meta_tags %} |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta charset="UTF-8"> |
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' |
||||
name='viewport'> |
||||
{% endblock %} |
||||
|
||||
{% block stylesheets %} |
||||
{% for stylesheet in sonata_admin.adminPool.getOption('stylesheets', []) %} |
||||
<link rel="stylesheet" href="{{ asset(stylesheet) }}"> |
||||
{% endfor %} |
||||
{% endblock %} |
||||
|
||||
{% block javascripts %} |
||||
<script> |
||||
window.SONATA_CONFIG = { |
||||
CONFIRM_EXIT: {% if sonata_admin.adminPool.getOption('confirm_exit') %}true{% else %}false{% endif %}, |
||||
USE_SELECT2: {% if sonata_admin.adminPool.getOption('use_select2') %}true{% else %}false{% endif %}, |
||||
USE_ICHECK: {% if sonata_admin.adminPool.getOption('use_icheck') %}true{% else %}false{% endif %}, |
||||
USE_STICKYFORMS: {% if sonata_admin.adminPool.getOption('use_stickyforms') %}true{% else %}false{% endif %} |
||||
}; |
||||
window.SONATA_TRANSLATIONS = { |
||||
CONFIRM_EXIT: '{{ 'confirm_exit'|trans({}, 'SonataAdminBundle')|escape('js') }}' |
||||
}; |
||||
|
||||
// http://getbootstrap.com/getting-started/#support-ie10-width |
||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) { |
||||
var msViewportStyle = document.createElement('style'); |
||||
msViewportStyle.appendChild(document.createTextNode('@-ms-viewport{width:auto!important}')); |
||||
document.querySelector('head').appendChild(msViewportStyle); |
||||
} |
||||
</script> |
||||
|
||||
{% for javascript in sonata_admin.adminPool.getOption('javascripts', []) %} |
||||
<script src="{{ asset(javascript) }}"></script> |
||||
{% endfor %} |
||||
|
||||
{% set locale = app.request.locale %} |
||||
{# localize moment #} |
||||
{% if locale[:2] != 'en' %} |
||||
<script src="{{ asset('bundles/sonatacore/vendor/moment/locale/' ~ locale|replace({'_':'-'}) ~ '.js') }}"></script> |
||||
{% endif %} |
||||
|
||||
{# localize select2 #} |
||||
{% if sonata_admin.adminPool.getOption('use_select2') %} |
||||
{% if locale == 'pt' %}{% set locale = 'pt_PT' %}{% endif %} |
||||
|
||||
{# omit default EN locale #} |
||||
{% if locale[:2] != 'en' %} |
||||
<script src="{{ asset('bundles/sonatacore/vendor/select2/select2_locale_' ~ locale|replace({'_':'-'}) ~ '.js') }}"></script> |
||||
{% endif %} |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
<title> |
||||
{% block sonata_head_title %} |
||||
{{ 'Admin'|trans({}, 'SonataAdminBundle') }} |
||||
|
||||
{% if _title is not empty %} |
||||
{{ _title|raw }} |
||||
{% else %} |
||||
{% if action is defined %} |
||||
- |
||||
{% for menu in admin.breadcrumbs(action) %} |
||||
{% if not loop.first %} |
||||
{% if loop.index != 2 %} |
||||
> |
||||
{% endif %} |
||||
|
||||
{{ menu.label }} |
||||
{% endif %} |
||||
{% endfor %} |
||||
{% endif %} |
||||
{% endif %} |
||||
{% endblock %} |
||||
</title> |
||||
</head> |
||||
<body {% block body_attributes %}class="sonata-bc skin-black fixed"{% endblock %}> |
||||
|
||||
<div class="wrapper"> |
||||
|
||||
{% block sonata_header %} |
||||
<header class="main-header"> |
||||
{% block sonata_header_noscript_warning %} |
||||
<noscript> |
||||
<div class="noscript-warning"> |
||||
{{ 'noscript_warning'|trans({}, 'SonataAdminBundle') }} |
||||
</div> |
||||
</noscript> |
||||
{% endblock %} |
||||
{% block logo %} |
||||
{% spaceless %} |
||||
<a class="logo" href="{{ path('sonata_admin_dashboard') }}"> |
||||
{% if 'single_image' == sonata_admin.adminPool.getOption('title_mode') or 'both' == sonata_admin.adminPool.getOption('title_mode') %} |
||||
<img src="{{ asset(sonata_admin.adminPool.titlelogo) }}" |
||||
alt="{{ sonata_admin.adminPool.title }}"> |
||||
{% endif %} |
||||
{% if 'single_text' == sonata_admin.adminPool.getOption('title_mode') or 'both' == sonata_admin.adminPool.getOption('title_mode') %} |
||||
<span>{{ sonata_admin.adminPool.title }}</span> |
||||
{% endif %} |
||||
</a> |
||||
{% endspaceless %} |
||||
{% endblock %} |
||||
{% block sonata_nav %} |
||||
<nav class="navbar navbar-static-top" role="navigation"> |
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" |
||||
role="button"> |
||||
<span class="sr-only">Toggle navigation</span> |
||||
</a> |
||||
|
||||
<div class="navbar-left"> |
||||
{% block sonata_breadcrumb %} |
||||
<div class="hidden-xs"> |
||||
{% if _breadcrumb is not empty or action is defined %} |
||||
<ol class="nav navbar-top-links breadcrumb"> |
||||
{% if _breadcrumb is empty %} |
||||
{% if action is defined %} |
||||
{% for menu in admin.breadcrumbs(action) %} |
||||
{% if not loop.last %} |
||||
<li> |
||||
{% if menu.uri is not empty %} |
||||
<a href="{{ menu.uri }}">{{ menu.label|raw }}</a> |
||||
{% else %} |
||||
{{ menu.label }} |
||||
{% endif %} |
||||
</li> |
||||
{% else %} |
||||
<li class="active"> |
||||
<span>{{ menu.label }}</span> |
||||
</li> |
||||
{% endif %} |
||||
{% endfor %} |
||||
{% endif %} |
||||
{% else %} |
||||
{{ _breadcrumb|raw }} |
||||
{% endif %} |
||||
</ol> |
||||
{% endif %} |
||||
</div> |
||||
{% endblock sonata_breadcrumb %} |
||||
</div> |
||||
|
||||
{% block sonata_top_nav_menu %} |
||||
<div class="navbar-custom-menu"> |
||||
<ul class="nav navbar-nav"> |
||||
<li class="dropdown"> |
||||
<a class="dropdown-toggle" |
||||
data-toggle="dropdown" href="#"> |
||||
<i class="fa fa-plus-square fa-fw"></i> |
||||
<i class="fa fa-caret-down"></i> |
||||
</a> |
||||
{% include sonata_admin.adminPool.getTemplate('add_block') %} |
||||
</li> |
||||
<li class="dropdown user-menu"> |
||||
<a class="dropdown-toggle" |
||||
data-toggle="dropdown" href="#"> |
||||
<i class="fa fa-user fa-fw"></i> <i |
||||
class="fa fa-caret-down"></i> |
||||
</a> |
||||
<ul class="dropdown-menu dropdown-user"> |
||||
{% include sonata_admin.adminPool.getTemplate('user_block') %} |
||||
</ul> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
{% endblock %} |
||||
</nav> |
||||
{% endblock sonata_nav %} |
||||
</header> |
||||
{% endblock sonata_header %} |
||||
|
||||
{% block sonata_wrapper %} |
||||
{% block sonata_left_side %} |
||||
<aside class="main-sidebar"> |
||||
<section class="sidebar"> |
||||
{% block sonata_side_nav %} |
||||
{% block sonata_sidebar_search %} |
||||
{% if app.user and is_granted('ROLE_SONATA_ADMIN') %} |
||||
<form action="{{ path('sonata_admin_search') }}" |
||||
method="GET" class="sidebar-form" |
||||
role="search"> |
||||
<div class="input-group custom-search-form"> |
||||
<input type="text" name="q" |
||||
value="{{ app.request.get('q') }}" |
||||
class="form-control" |
||||
placeholder="{{ 'search_placeholder'|trans({}, 'SonataAdminBundle') }}"> |
||||
<span class="input-group-btn"> |
||||
<button class="btn btn-flat" |
||||
type="submit"> |
||||
<i class="fa fa-search"></i> |
||||
</button> |
||||
</span> |
||||
</div> |
||||
</form> |
||||
{% endif %} |
||||
{% endblock sonata_sidebar_search %} |
||||
|
||||
{% block side_bar_before_nav %} {% endblock %} |
||||
{% block side_bar_nav %} |
||||
{% if app.user and is_granted('ROLE_SONATA_ADMIN') %} |
||||
{{ knp_menu_render('sonata_admin_sidebar', {template: sonata_admin.adminPool.getTemplate('knp_menu_template')}) }} |
||||
{% endif %} |
||||
{% endblock side_bar_nav %} |
||||
{% block side_bar_after_nav %} |
||||
<p class="text-center small" |
||||
style="border-top: 1px solid #444444; padding-top: 10px"> |
||||
{% block side_bar_after_nav_content %} |
||||
<a href="https://sonata-project.org" |
||||
rel="noreferrer" target="_blank">sonata |
||||
project</a> |
||||
{% endblock %} |
||||
</p> |
||||
{% endblock %} |
||||
{% endblock sonata_side_nav %} |
||||
</section> |
||||
</aside> |
||||
{% endblock sonata_left_side %} |
||||
|
||||
<div class="content-wrapper"> |
||||
{% block sonata_page_content %} |
||||
<section class="content-header"> |
||||
|
||||
{% block sonata_page_content_header %} |
||||
{% block sonata_page_content_nav %} |
||||
{% if _tab_menu is not empty or _actions is not empty or _list_filters_actions is not empty %} |
||||
<nav class="navbar navbar-default" |
||||
role="navigation"> |
||||
<div class="container-fluid"> |
||||
{% block tab_menu_navbar_header %} |
||||
{% if _navbar_title is not empty %} |
||||
<div class="navbar-header"> |
||||
<a class="navbar-brand" |
||||
href="#">{{ _navbar_title|raw }}</a> |
||||
</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
<div class="navbar-collapse"> |
||||
<div class="navbar-left"> |
||||
{% if _tab_menu is not empty %} |
||||
{{ _tab_menu|raw }} |
||||
{% endif %} |
||||
</div> |
||||
|
||||
{% if admin is defined and action is defined and action == 'list' and admin.listModes|length > 1 %} |
||||
<div class="nav navbar-right btn-group"> |
||||
{% for mode, settings in admin.listModes %} |
||||
<a href="{{ admin.generateUrl('list', app.request.query.all|merge({_list_mode: mode})) }}" |
||||
class="btn btn-default navbar-btn btn-sm{% if admin.getListMode() == mode %} active{% endif %}"><i |
||||
class="{{ settings.class }}"></i></a> |
||||
{% endfor %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{% block sonata_admin_content_actions_wrappers %} |
||||
{% if _actions|replace({ '<li>': '', '</li>': '' })|trim is not empty %} |
||||
<ul class="nav navbar-nav navbar-right"> |
||||
{% if _actions|split('</a>')|length > 2 %} |
||||
<li class="dropdown sonata-actions"> |
||||
<a href="#" |
||||
class="dropdown-toggle" |
||||
data-toggle="dropdown">{{ 'link_actions'|trans({}, 'SonataAdminBundle') }} |
||||
<b class="caret"></b></a> |
||||
<ul class="dropdown-menu" |
||||
role="menu"> |
||||
{{ _actions|raw }} |
||||
</ul> |
||||
</li> |
||||
{% else %} |
||||
{{ _actions|raw }} |
||||
{% endif %} |
||||
</ul> |
||||
{% endif %} |
||||
{% endblock sonata_admin_content_actions_wrappers %} |
||||
|
||||
{% if _list_filters_actions is not empty %} |
||||
{{ _list_filters_actions|raw }} |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</nav> |
||||
{% endif %} |
||||
{% endblock sonata_page_content_nav %} |
||||
{% endblock sonata_page_content_header %} |
||||
</section> |
||||
|
||||
<section class="content"> |
||||
{% block sonata_admin_content %} |
||||
|
||||
{% block notice %} |
||||
{% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} |
||||
{% endblock notice %} |
||||
|
||||
{% if _preview is not empty %} |
||||
<div class="sonata-ba-preview">{{ _preview|raw }}</div> |
||||
{% endif %} |
||||
|
||||
{% if _content is not empty %} |
||||
<div class="sonata-ba-content">{{ _content|raw }}</div> |
||||
{% endif %} |
||||
|
||||
{% if _show is not empty %} |
||||
<div class="sonata-ba-show">{{ _show|raw }}</div> |
||||
{% endif %} |
||||
|
||||
{% if _form is not empty %} |
||||
<div class="sonata-ba-form">{{ _form|raw }}</div> |
||||
{% endif %} |
||||
|
||||
{% if _list_table is not empty or _list_filters is not empty %} |
||||
{% if _list_filters|trim %} |
||||
<div class="row"> |
||||
{{ _list_filters|raw }} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="row"> |
||||
{{ _list_table|raw }} |
||||
</div> |
||||
|
||||
{% endif %} |
||||
{% endblock sonata_admin_content %} |
||||
</section> |
||||
{% endblock sonata_page_content %} |
||||
</div> |
||||
{% endblock sonata_wrapper %} |
||||
</div> |
||||
|
||||
{% if sonata_admin.adminPool.getOption('use_bootlint') %} |
||||
{% block bootlint %} |
||||
{# Bootlint - https://github.com/twbs/bootlint#in-the-browser #} |
||||
<script type="text/javascript"> |
||||
javascript:(function () { |
||||
var s = document.createElement("script"); |
||||
s.onload = function () { |
||||
bootlint.showLintReportForCurrentDocument([], { |
||||
hasProblems: false, |
||||
problemFree: false |
||||
}); |
||||
}; |
||||
s.src = "https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js"; |
||||
document.body.appendChild(s) |
||||
})(); |
||||
</script> |
||||
{% endblock %} |
||||
{% endif %} |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,25 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping |
||||
xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" |
||||
xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Chamilo\PageBundle\Entity\User" |
||||
table="user" |
||||
> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,75 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\UserBundle\Entity; |
||||
|
||||
use Sonata\UserBundle\Entity\BaseGroup as BaseGroup; |
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use Gedmo\Mapping\Annotation as Gedmo; |
||||
|
||||
/** |
||||
* @ORM\Entity(repositoryClass="Chamilo\UserBundle\Repository\GroupRepository") |
||||
* @ORM\Table(name="fos_group") |
||||
*/ |
||||
class Group extends BaseGroup |
||||
{ |
||||
/** |
||||
* @var integer |
||||
* |
||||
* @ORM\Column(name="id", type="integer") |
||||
* @ORM\Id |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @ORM\ManyToMany(targetEntity="Chamilo\UserBundle\Entity\User", mappedBy="groups") |
||||
* |
||||
*/ |
||||
protected $users; |
||||
|
||||
/** |
||||
* @var string |
||||
* @ORM\Column(name="code", type="string", length=40, nullable=false, unique=true) |
||||
*/ |
||||
private $code; |
||||
|
||||
/** |
||||
* Get id |
||||
* |
||||
* @return integer $id |
||||
*/ |
||||
public function getId() |
||||
{ |
||||
return $this->id; |
||||
} |
||||
|
||||
/** |
||||
* @return mixed |
||||
*/ |
||||
public function getUsers() |
||||
{ |
||||
return $this->users; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getCode() |
||||
{ |
||||
return $this->code; |
||||
} |
||||
|
||||
/** |
||||
* @param string $code |
||||
* @return Group |
||||
*/ |
||||
public function setCode($code) |
||||
{ |
||||
$this->code = $code; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,4 @@ |
||||
{#{% extends "FOSUserBundle::layout.html.twig" %}#} |
||||
{% block fos_user_content %} |
||||
{% include "SonataUserBundle:ChangePassword:changePassword_content.html.twig" %} |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,8 @@ |
||||
<form action="{{ path('sonata_user_change_password') }}" {{ form_enctype(form) }} |
||||
method="POST" class="fos_user_change_password form-horizontal"> |
||||
|
||||
{{ form_widget(form) }} |
||||
<button type="submit" class="btn btn-danger pull-right"><i |
||||
class="icon-lock icon-white glyphicon glyphicon-lock"></i> {{ 'change_password.submit'|trans({}, 'FOSUserBundle') }} |
||||
</button> |
||||
</form> |
||||
@ -0,0 +1,37 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
|
||||
{% block sonata_page_breadcrumb %} |
||||
{% if breadcrumb_context is not defined %} |
||||
{% set breadcrumb_context = 'user_index' %} |
||||
{% endif %} |
||||
<div class="row-fluid clearfix"> |
||||
{{ sonata_block_render_event('breadcrumb', { 'context': breadcrumb_context, 'current_uri': app.request.requestUri }) }} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
<h2>{% block sonata_profile_title %}{% trans from 'SonataUserBundle' %}sonata_profile_title{% endtrans %}{% endblock %}</h2> |
||||
|
||||
<div class="sonata-user-show row row-fluid"> |
||||
|
||||
<div class="span2 col-lg-2" style="padding: 8px 0;"> |
||||
{% block sonata_profile_menu %} |
||||
{{ sonata_block_render({'type': 'sonata.user.block.menu'}, {'current_uri': app.request.requestUri}) }} |
||||
{% endblock %} |
||||
</div> |
||||
|
||||
<div class="span10 col-lg-10"> |
||||
{% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} |
||||
|
||||
{% block sonata_profile_content '' %} |
||||
</div> |
||||
|
||||
</div> |
||||
@ -0,0 +1,26 @@ |
||||
<div class="row"> |
||||
<div class="span6 col-lg-6"> |
||||
<div class="panel panel-warning"> |
||||
<div class="panel-heading"> |
||||
<h3 class="panel-title">{{ 'title_user_edit_authentication'|trans({}, 'SonataUserBundle') }}</h3> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<form action="{{ path('sonata_user_profile_edit_authentication') }}" method="POST" class="form-horizontal"> |
||||
{{ form_widget(form) }} |
||||
|
||||
<button type="submit" name="submit" class="btn btn-primary pull-right">{{ 'sonata_user_submit'|trans({}, 'SonataUserBundle') }}</button> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="span6 col-lg-6"> |
||||
<div class="panel panel-danger"> |
||||
<div class="panel-heading"> |
||||
<h3 class="panel-title">{{ 'sonata_change_password_link'|trans({}, 'SonataUserBundle') }}</h3> |
||||
</div> |
||||
<div class="panel-body"> |
||||
{% render url("sonata_user_change_password") %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@ -0,0 +1,72 @@ |
||||
{% extends "ChamiloUserBundle:Profile:action.html.twig" %} |
||||
|
||||
{% block sonata_profile_title %} |
||||
{{ "title_user_account" | trans({}, 'SonataUserBundle')}} - {{ "title_user_edit_profile" | trans({}, 'SonataUserBundle')}} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_profile_content %} |
||||
{{ form_errors(form) }} |
||||
|
||||
|
||||
|
||||
{% form_theme form _self %} |
||||
|
||||
{#<script type="text/javascript">#} |
||||
{#// keep track of how many email fields have been rendered#} |
||||
{#var emailCount = '{{ form.extraFieldValues|length }}';#} |
||||
|
||||
{#jQuery(document).ready(function() {#} |
||||
{#jQuery('#add-extra-field').click(function(e) {#} |
||||
{#e.preventDefault();#} |
||||
|
||||
{#var emailList = jQuery('#field-list');#} |
||||
|
||||
{#// grab the prototype template#} |
||||
{#var newWidget = emailList.attr('data-prototype');#} |
||||
{#// replace the "__name__" used in the id and name of the prototype#} |
||||
{#// with a number that's unique to your emails#} |
||||
{#// end name attribute looks like name="contact[emails][2]"#} |
||||
{#newWidget = newWidget.replace(/__name__/g, emailCount);#} |
||||
{#emailCount++;#} |
||||
|
||||
{#// create a new list element and add it to the list#} |
||||
{#var newLi = jQuery('<li></li>').html(newWidget);#} |
||||
{#newLi.appendTo(emailList);#} |
||||
{#});#} |
||||
{#})#} |
||||
{#</script>#} |
||||
|
||||
<div class="panel panel-info"> |
||||
<div class="panel-heading"> |
||||
<h3 class="panel-title">{{ "title_user_account" | trans({}, 'SonataUserBundle')}}</h3> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<form action="{{ path('sonata_user_profile_edit') }}" method="POST" {{ form_enctype(form) }} class="form-horizontal"> |
||||
|
||||
{{ form_widget(form) }} |
||||
|
||||
{#<ul id="field-list"#} |
||||
{#data-prototype="{{ form_widget(form.extraFieldValues.vars.prototype)|e }}">#} |
||||
{#{% for field in form.extraFieldValues %}#} |
||||
{#<li>#} |
||||
{#{{ form_errors(field) }}#} |
||||
{#{{ form_widget(field) }}#} |
||||
{#</li>#} |
||||
{#{% endfor %}#} |
||||
{#</ul>#} |
||||
{#<a href="#" id="add-extra-field">Add</a>#} |
||||
|
||||
|
||||
<div class="form-actions"> |
||||
<button type="submit" name="submit" |
||||
class="btn btn-primary pull-right"> |
||||
{{ 'sonata_user_submit'|trans({}, 'SonataUserBundle') }} |
||||
</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
|
||||
{% render url("sonata_user_profile_edit_authentication") %} |
||||
|
||||
{% endblock %} |
||||
@ -0,0 +1,39 @@ |
||||
{% extends "SonataUserBundle:Profile:action.html.twig" %} |
||||
|
||||
{% block sonata_profile_content %} |
||||
|
||||
<div class="row row-fluid"> |
||||
{% set has_center = false %} |
||||
{% for block in blocks %} |
||||
{% if block.position == 'center' %} |
||||
{% set has_center = true %} |
||||
{% endif %} |
||||
{% endfor %} |
||||
|
||||
<div class="{% if has_center %}span4 col-lg-4{% else %}span6 col-lg-6{% endif %}"> |
||||
{% for block in blocks %} |
||||
{% if block.position == 'left' %} |
||||
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }} |
||||
{% endif %} |
||||
{% endfor %} |
||||
</div> |
||||
|
||||
{% if has_center %} |
||||
<div class="span4 col-lg-4"> |
||||
{% for block in blocks %} |
||||
{% if block.position == 'center' %} |
||||
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }} |
||||
{% endif %} |
||||
{% endfor %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="{% if has_center %}span4 col-lg-4{% else %}span6 col-lg-6{% endif %}"> |
||||
{% for block in blocks %} |
||||
{% if block.position == 'right' %} |
||||
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }} |
||||
{% endif %} |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
@ -0,0 +1,19 @@ |
||||
<div class="panel panel-success"> |
||||
<div class="panel-heading"> |
||||
<h2 class="panel-title">{{ 'title_user_registration'|trans({}, 'SonataUserBundle') }}</h2> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} |
||||
method="POST" |
||||
class="fos_user_registration_register form-horizontal"> |
||||
|
||||
{{ form_widget(form) }} |
||||
|
||||
<div class="form-actions"> |
||||
<input type="submit" |
||||
value="{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}" |
||||
class="btn btn-success pull-right"/> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
@ -0,0 +1,10 @@ |
||||
{% extends "FOSUserBundle::layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
<div class="header"> |
||||
{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }} |
||||
</div> |
||||
<div class="body bg-gray"> |
||||
{{ 'resetting.check_email'|trans({'%email%': email}, 'FOSUserBundle') }} |
||||
</div> |
||||
{% endblock %} |
||||
@ -0,0 +1,11 @@ |
||||
{% block subject %} |
||||
{% autoescape false %} |
||||
{{ 'resetting.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} |
||||
{% endautoescape %} |
||||
{% endblock %} |
||||
{% block body_text %} |
||||
{% autoescape false %} |
||||
{{ 'resetting.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} |
||||
{% endautoescape %} |
||||
{% endblock %} |
||||
{% block body_html %}{% endblock %} |
||||
@ -0,0 +1,10 @@ |
||||
{% extends "FOSUserBundle::layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
<div class="header"> |
||||
{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }} |
||||
</div> |
||||
<div class="body bg-gray"> |
||||
<p>{{ 'resetting.password_already_requested'|trans({}, 'FOSUserBundle') }}</p> |
||||
</div> |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,5 @@ |
||||
{% extends "FOSUserBundle::layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
{% include "FOSUserBundle:Resetting:request_content.html.twig" %} |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,23 @@ |
||||
<div class="header"> |
||||
{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }} |
||||
</div> |
||||
|
||||
<form action="{{ path('fos_user_resetting_send_email') }}" method="POST" |
||||
class="fos_user_resetting_request"> |
||||
<div class="body bg-gray"> |
||||
<div class="form-group"> |
||||
{% if invalid_username is defined %} |
||||
<p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}, 'FOSUserBundle') }}</p> |
||||
{% endif %} |
||||
<label for="username">{{ 'resetting.request.username'|trans({}, 'FOSUserBundle') }}</label> |
||||
<input type="text" id="username" name="username" |
||||
required="required"/> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<input type="submit" |
||||
value="{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }}"/> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
|
||||
@ -0,0 +1,5 @@ |
||||
{% extends "FOSUserBundle::layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
{% include "FOSUserBundle:Resetting:reset_content.html.twig" %} |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,8 @@ |
||||
<form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} |
||||
method="POST" class="fos_user_resetting_reset"> |
||||
{{ form_widget(form) }} |
||||
<div> |
||||
<input type="submit" |
||||
value="{{ 'resetting.reset.submit'|trans({}, 'FOSUserBundle') }}"/> |
||||
</div> |
||||
</form> |
||||
@ -0,0 +1,94 @@ |
||||
{% extends "@ChamiloUser/layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
<div class="row"> |
||||
<div class="col-sm-6"> |
||||
{% block sonata_user_login %} |
||||
<div class="login-box-body"> |
||||
|
||||
<div class="panel-heading"> |
||||
<h2 class="panel-title">{{ 'title_user_authentication'|trans({}, 'SonataUserBundle') }}</h2> |
||||
</div> |
||||
|
||||
<div class="panel-body"> |
||||
|
||||
{% block sonata_user_login_error %} |
||||
{% if error %} |
||||
<div class="alert alert-danger alert-danger">{{ error|trans({}, 'FOSUserBundle') }}</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_user_login_form %} |
||||
<form action="{{ path("fos_user_security_check") }}" |
||||
method="post" role="form" |
||||
class="form-horizontal"> |
||||
<input type="hidden" name="_csrf_token" |
||||
value="{{ csrf_token }}"/> |
||||
|
||||
<div class="form-group"> |
||||
<label for="username" |
||||
class="col-sm-4 control-label">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label> |
||||
|
||||
<div class="col-sm-8"><input type="text" |
||||
class="form-control" |
||||
id="username" |
||||
name="_username" |
||||
value="{{ last_username }}" |
||||
required="required"/> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="form-group control-group"> |
||||
<label for="password" |
||||
class="col-sm-4 control-label">{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}</label> |
||||
|
||||
<div class="col-sm-8"><input type="password" |
||||
class="form-control" |
||||
id="password" |
||||
name="_password" |
||||
required="required"/> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-4 col-sm-8"> |
||||
<div class="checkbox control-group"> |
||||
<label for="remember_me"> |
||||
<input type="checkbox" |
||||
id="remember_me" |
||||
name="_remember_me" |
||||
value="on"/> |
||||
{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }} |
||||
</label> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group control-group"> |
||||
<div class="controls col-sm-offset-4 col-sm-8"> |
||||
<a href="{{ path('fos_user_resetting_request') }}">{{ 'forgotten_password'|trans({}, 'SonataUserBundle') }}</a> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-4 col-sm-8"> |
||||
<input type="submit" id="_submit" |
||||
name="_submit" |
||||
class="btn btn-primary" |
||||
value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}"/> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
{% endblock %} |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
</div> |
||||
<div class="col-sm-6"> |
||||
{% block sonata_user_registration %} |
||||
{% render controller("SonataUserBundle:RegistrationFOSUser1:register") %} |
||||
{% endblock %} |
||||
</div> |
||||
</div> |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,61 @@ |
||||
{% extends "@ChamiloUser/layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
{% block sonata_user_login %} |
||||
{% block sonata_user_login_error %} |
||||
{% if error %} |
||||
<div class="alert alert-danger alert-danger">{{ error|trans({}, 'FOSUserBundle') }}</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
<div class="login-box-body"> |
||||
{% block sonata_user_login_form %} |
||||
<form action="{{ path("fos_user_security_check") }}" |
||||
method="post" role="form"> |
||||
<input type="hidden" name="_csrf_token" |
||||
value="{{ csrf_token('authenticate') }}"/> |
||||
|
||||
<div class="form-group has-feedback"> |
||||
<label for="username" |
||||
class="col-sm-4 control-label">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label> |
||||
|
||||
<input type="text" class="form-control" id="username" |
||||
name="_username" value="{{ last_username }}" |
||||
required="required"/> |
||||
</div> |
||||
|
||||
<div class="form-group has-feedback"> |
||||
<label for="password" |
||||
class="col-sm-4 control-label">{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}</label> |
||||
|
||||
<input type="password" class="form-control" |
||||
id="password" |
||||
name="_password" required="required"/> |
||||
</div> |
||||
|
||||
<div class="form-group has-feedback"> |
||||
<div class="checkbox control-group"> |
||||
<label for="remember_me"> |
||||
<input type="checkbox" id="remember_me" |
||||
name="_remember_me" value="on"/> |
||||
{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }} |
||||
</label> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group has-feedback"> |
||||
<a href="{{ path('fos_user_resetting_request') }}">{{ 'forgotten_password'|trans({}, 'SonataUserBundle') }}</a> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-4 col-sm-8"> |
||||
<input type="submit" id="_submit" name="_submit" |
||||
class="btn btn-primary" |
||||
value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}"/> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
{% endblock %} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1,6 @@ |
||||
{#{% extends '@ChamiloTheme/Layout/login-layout.html.twig' %}#} |
||||
|
||||
{% block page_content %} |
||||
{% block fos_user_content %} |
||||
{% endblock %} |
||||
{% endblock %} |
||||
Loading…
Reference in new issue