mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix folder name
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{%- macro _render(address, options) -%}
|
||||
{%- set options = { 'with_valid_from' : true }|merge(options|default({})) -%}
|
||||
{%- set options = { 'has_no_address' : false }|merge(options|default({})) -%}
|
||||
<div class="chill_address">
|
||||
{% if options['has_no_address'] == true and address.isNoAddress == true %}
|
||||
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
||||
{% endif %}
|
||||
<div class="chill_address_address">
|
||||
{% if address.streetAddress1 is not empty %}<p class="street street1">{{ address.streetAddress1 }}</p>{% endif %}
|
||||
{% if address.streetAddress2 is not empty %}<p class="street street2">{{ address.streetAddress2 }}</p>{% endif %}
|
||||
{% if address.postCode is not empty %}
|
||||
<p class="postalCode"><span class="code">{{ address.postCode.code }}</span> <span class="name">{{ address.postCode.name }}</span></p>
|
||||
<p class="country">{{ address.postCode.country.name|localize_translatable_string }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- if options['with_valid_from'] == true -%}
|
||||
<span class="address_since">{{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long') } ) }}</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endmacro -%}
|
@@ -0,0 +1,17 @@
|
||||
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>{{ 'Administration interface'|trans }}</h1>
|
||||
|
||||
{{ 'welcome_message_raw'|trans|raw }}
|
||||
|
||||
<div>
|
||||
<h2>{{ 'Configuration alerts'|trans }}</h2>
|
||||
|
||||
<p>{{ 'Here you can check the configuration of your instance.'|trans }}</p>
|
||||
|
||||
{{ chill_widget('configuration_warnings', {}) }}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
The layout of the admin section. All the page / template of the admin section must use this
|
||||
layout.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block navigation_search_bar %}{% endblock %}
|
||||
{% block navigation_section_menu %}
|
||||
{{ chill_menu('admin_section', {
|
||||
'layout': '@ChillMain/Menu/adminSection.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block admin_content %}<!-- block personcontent empty -->
|
||||
<div class="container">
|
||||
<div class="grid-10 push-1">
|
||||
<h2>{{ 'Welcome to the admin section !'|trans }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
@@ -0,0 +1,37 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
The layout of the admin section. All the page / template of the admin section must use this
|
||||
layout.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block navigation_search_bar %}{% endblock %}
|
||||
{% block navigation_section_menu %}
|
||||
{{ chill_menu('admin_section', {
|
||||
'layout': '@ChillMain/Menu/adminSection.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
{% block admin_content %}<!-- block personcontent empty -->
|
||||
<h2>{{ 'Welcome to the admin section !'|trans }}</h2>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
@@ -0,0 +1,31 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block vertical_menu_content %}
|
||||
{{ chill_menu('admin_permissions', {
|
||||
'layout': '@ChillMain/Menu/admin_permissions.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
{% block admin_content %}<!-- block personcontent empty -->
|
||||
<h1>{{ 'Permissions management of your chill installation' |trans }}</h1>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
@@ -0,0 +1,37 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
<p class="message-confirm">{{ ('crud.'~crud_name~'.confirm_message_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}</p>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_view %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'view'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-show" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_view', { 'id': entity.id }) }}">
|
||||
{{ 'crud.edit.back_to_view'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block content_form_actions_confirm_delete %}
|
||||
<li>
|
||||
<button type="submit" class="sc-button bt-delete" value="delete-and-close">{{ ('crud.'~crud_name~'.button_delete')|trans }}</button>
|
||||
</li>
|
||||
{% endblock content_form_actions_confirm_delete %}
|
||||
{% block content_form_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
@@ -0,0 +1,63 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_edit')|trans }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_form %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}
|
||||
{{ form_row(f) }}
|
||||
{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block crud_content_form_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_delete %}
|
||||
{% if chill_crud_action_exists(crud_name, 'delete') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'delete'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-small bt-delete" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_delete', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_delete %}
|
||||
{% block content_form_actions_view %}
|
||||
{% if chill_crud_action_exists(crud_name, 'view') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'view'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-small bt-show" href="{{ chill_path_forward_return_path('chill_crud_'~crud_name~'_view', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_view %}
|
||||
{% block content_form_actions_save_and_close %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-close" class="sc-button bt-update">
|
||||
{{ 'crud.edit.save_and_close'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_show %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-show" class="sc-button bt-update">
|
||||
{{ 'crud.edit.save_and_show'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
@@ -0,0 +1 @@
|
||||
{{ ('crud.'~crud_name~'.title_edit')|trans }}
|
@@ -0,0 +1 @@
|
||||
{{ data }}
|
@@ -0,0 +1,48 @@
|
||||
<div class="grid-10 centered">
|
||||
|
||||
{% block index_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}</h1>
|
||||
{% endblock index_header %}
|
||||
|
||||
{% if entities|length == 0 %}
|
||||
{% block no_existing_entities %}
|
||||
<p>{{ no_existing_entities_sentences|default('No entities')|trans }}</p>
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% block table_entities %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>id</th>
|
||||
{% endblock %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="crud_index__pagination">
|
||||
{{ chill_pagination(paginator) }}
|
||||
</div>
|
||||
|
||||
{% block list_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block add_new %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_' ~ crud_name ~ '_new') }}" class="sc-button bt-new">{{ ('crud.'~crud_name~'.index.add_new')|trans( {'%crud_name%': crud_name} ) }}</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
</div>
|
@@ -0,0 +1,50 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_form %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}{% if f.vars.name != 'submit' %}
|
||||
{{ form_row(f) }}
|
||||
{% endif %}{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block crud_content_form_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_close %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-close" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_close'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_show %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-show" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_show'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_new %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-new" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_new'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
@@ -0,0 +1 @@
|
||||
{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}
|
@@ -0,0 +1,63 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_view %}
|
||||
|
||||
{% block crud_content_view_details %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>id</dt>
|
||||
<dd>{{ entity.id|default("No id") }}</dd>
|
||||
</dl>
|
||||
{% endblock crud_content_view_details %}
|
||||
|
||||
{% block crud_content_view_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_view_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_view_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_delete %}
|
||||
{% if chill_crud_action_exists(crud_name, 'delete') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'delete'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-delete" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_delete', { 'id': entity.id }) }}">
|
||||
{{ 'crud.delete.link_to_form'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_delete %}
|
||||
{% block content_view_actions_duplicate_link %}
|
||||
{% if chill_crud_action_exists(crud_name, 'new') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'new'), entity) %}
|
||||
<li>
|
||||
<a class="sc-button bt-duplicate" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_new', { 'duplicate_id': entity.id, 'duplicate': true }) }}">
|
||||
{{ 'crud.view.link_duplicate'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_view_actions_duplicate_link %}
|
||||
{% block content_view_actions_edit_link %}
|
||||
{% if chill_crud_action_exists(crud_name, 'edit') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'edit'), entity) %}
|
||||
<li>
|
||||
<a class="sc-button bt-edit" href="{{ chill_path_forward_return_path('chill_crud_'~crud_name~'_edit', { 'id': entity.id }) }}">
|
||||
{{ 'crud.new.link_edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_view_actions_edit_link %}
|
||||
{% block content_view_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
{% endblock crud_content_view_actions %}
|
||||
|
||||
{% endblock crud_content_view %}
|
||||
</div>
|
@@ -0,0 +1 @@
|
||||
{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}
|
@@ -0,0 +1,8 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}{{ ('crud.' ~ crud_name ~ '.delete.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
@@ -0,0 +1,8 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_view_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_view_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
@@ -0,0 +1,20 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Center edit'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Center edit'|trans }}</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'sc-button green' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_center') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Center list'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Center list'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td><a href="{{ path('admin_center_show', { 'id': entity.id }) }}">{{ entity.name }}</a></td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_new') }}">
|
||||
{{ 'Create a new center'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,20 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Center creation'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Center creation'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.submit, { 'attr' : { 'class' : 'sc-button green' } } ) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_center') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,29 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Centre %name%'|trans({ '%name%': entity.name }) }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Centre %name%'|trans({ '%name%': entity.name }) }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<td>{{ entity.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_center') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,43 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block title "Download export"|trans ~ export.title|trans %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("DOMContentLoaded", function(e) {
|
||||
var url = "{{ path('chill_main_export_generate', { 'alias' : alias } ) }}",
|
||||
query = window.location.search,
|
||||
container = document.querySelector("#download_container")
|
||||
;
|
||||
|
||||
chill.download_report(url+query, container);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
|
||||
<h1>{{ export.title|trans }}</h1>
|
||||
<h2>{{ "Download export"|trans }}</h2>
|
||||
|
||||
<div id="download_container" data-alias="{{ alias|escape('html_attr') }}" {% if mime_type is defined %}data-mime-type="{{ mime_type|escape('html_attr') }}"{% endif %} data-download-text="{{ "Download your report"|trans|escape('html_attr') }}"><span id="waiting_text">{{ "Waiting for your report"|trans }}...</span></div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,68 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'Exports list'|trans }}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="container-export">
|
||||
<h1>{{ 'Exports list'|trans }}</h1>
|
||||
|
||||
<div>
|
||||
{% for group, exports in grouped_exports %}{% if group != '_' %}
|
||||
<h2>{{ group }}</h2>
|
||||
|
||||
<div class="export-list">
|
||||
{% for export_alias, export in exports %}
|
||||
<div class="export-list__element">
|
||||
<h2>{{ export.title|trans }}</h2>
|
||||
<p>{{ export.description|trans }}</p>
|
||||
|
||||
<p>
|
||||
<a class="sc-button bt-action" href="{{ path('chill_main_export_new', { 'alias': export_alias } ) }}">
|
||||
{{ 'Create an export'|trans }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
{% if grouped_exports|keys|length > 1 %}
|
||||
<h2>{{ 'Ungrouped exports'|trans }}</h2>
|
||||
{% endif %}
|
||||
|
||||
<div class="export-list">
|
||||
{% for export_alias,export in grouped_exports['_'] %}
|
||||
<div class="export-list__element">
|
||||
<h2>{{ export.title|trans }}</h2>
|
||||
<p>{{ export.description|trans }}</p>
|
||||
|
||||
<p>
|
||||
<a class="sc-button bt-action" href="{{ path('chill_main_export_new', { 'alias': export_alias } ) }}">
|
||||
{{ 'Create an export'|trans }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
110
src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig
Normal file
110
src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig
Normal file
@@ -0,0 +1,110 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block title %}{{ export.title|trans }}{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("DOMContentLoaded", chill.listenerDisplayCheckbox);
|
||||
</script>
|
||||
{% endblock js %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
|
||||
<h1>{{ export.title|trans }}</h1>
|
||||
|
||||
<p>{{ export.description|trans }}</p>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% if form.children.export.children.filters is defined %}
|
||||
{% if form.children.export.children.filters is not empty%}
|
||||
<div style="clear:both; padding-top: 1.5em;">
|
||||
<h2>{{ 'Filters'| trans }}</h2>
|
||||
{% for filter_form in form.children.export.children.filters %}
|
||||
<div>
|
||||
<p>
|
||||
{{ form_widget(filter_form.enabled, { 'attr' : { 'style' : 'vertical-align: middle;', 'data-display-target': filter_form.vars.id } }) }}
|
||||
<span class="force-inline-label">{{ form_label(filter_form) }}</span>
|
||||
</p>
|
||||
|
||||
<div data-display-show-hide="{{ filter_form.vars.id }}">
|
||||
{{ form_widget(filter_form.form) }}
|
||||
{{ form_errors(filter_form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ form_errors(form.children.export.children.filters) }}
|
||||
</div>
|
||||
{% else %}
|
||||
{# render the children, to mark the widget as 'rendered' #}
|
||||
{{ form_widget(form.children.export.children.filters) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if form.children.export.children.aggregators is defined %}
|
||||
{% if form.children.export.children.aggregators is not empty %}
|
||||
<div style="clear:both; padding-top: 1.5em;">
|
||||
<h2>{{ 'Aggregators'| trans }}</h2>
|
||||
{% for aggregator_form in form.children.export.children.aggregators %}
|
||||
<div>
|
||||
<p>
|
||||
{{ form_widget(aggregator_form.enabled, { 'attr' : { 'style' : 'vertical-align: middle;', 'data-display-target': aggregator_form.vars.id } }) }}
|
||||
<span class="force-inline-label">{{ form_label(aggregator_form) }}</span>
|
||||
</p>
|
||||
|
||||
<div data-display-show-hide="{{ aggregator_form.vars.id }}">
|
||||
{{ form_widget(aggregator_form.form) }}
|
||||
{{ form_errors(aggregator_form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{# render the children, to mark the widget as 'rendered' #}
|
||||
{{ form_widget(form.children.export.children.aggregators) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if form.children.export.children.export.children|length > 0 %}
|
||||
<div style="clear:both; padding-top: 1.5em;">
|
||||
<h2>{{ 'Export parameters'|trans }}</h2>
|
||||
{{ form_widget(form.children.export.children.export) }}
|
||||
</div>
|
||||
{% else %}
|
||||
{# render the children, to mark the widget as 'rendered' #}
|
||||
{{ form_widget(form.children.export.children.export) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.children.export.children.pick_formatter is defined %}
|
||||
<div style="clear: both; padding-top: 1.5em;">
|
||||
<h2>{{ 'Formatter'| trans }}</h2>
|
||||
|
||||
<p> {{ 'Choose the formatter'|trans }}</p>
|
||||
|
||||
{{ form_row(form.children.export.children.pick_formatter.children.alias, { 'label' : 'Formatter' }) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button btn-create' }, 'label' : 'Go to formatter options' } ) }}</p>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock layout_wvm_content %}
|
@@ -0,0 +1,50 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block title %}{{ export.title|trans }}{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
|
||||
<h1>{{ export.title|trans }}</h1>
|
||||
|
||||
<p>{{ export.description|trans }}</p>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<h2>{{ 'Pick centers'|trans }}</h2>
|
||||
|
||||
<p>{{ 'The export will contains only data from the picked centers.'|trans }}
|
||||
{{ 'This will eventually restrict your possibilities in filtering the data.'|trans }}</p>
|
||||
|
||||
{{ form_widget(form.centers.c) }}
|
||||
|
||||
{% if form.centers.children.g is defined %}
|
||||
|
||||
<h3>{{ 'Pick aggregated centers'|trans }}</h3>
|
||||
|
||||
{% for f in form.centers.children.g.children %}
|
||||
{{ form_row(f) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button btn-action bt-create' }, 'label' : 'Go to export options' } ) }}</p>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock layout_wvm_content %}
|
@@ -0,0 +1,54 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block title %}{{ export.title|trans }}{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
|
||||
<h1>{{ export.title|trans }}</h1>
|
||||
|
||||
<p>{{ export.description|trans }}</p>
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div style="">
|
||||
<h2>{{ 'Formatter'| trans }}</h2>
|
||||
|
||||
<div style="clear: both;">
|
||||
{% if form.children.formatter.children|length == 0 %}
|
||||
<p>
|
||||
<span class="chill-no-data-statement">{{ "No options availables. Your report is fully configured."|trans }}</span>
|
||||
</p>
|
||||
{{ form_widget(form.children.formatter) }}
|
||||
{% else %}
|
||||
{# we always have to render children, to mark as rendered #}
|
||||
{% for input in form.children.formatter.children %}
|
||||
{{ form_row(input) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style=clear:both;">
|
||||
<p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button btn-action' }, 'label': 'Generate the report' } ) }}</p>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock layout_wvm_content %}
|
@@ -0,0 +1 @@
|
||||
{% if value is not empty %}<blockquote class="chill-user-quote">{{ value|nl2br }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ message|trans }}</span>{% endif %}
|
@@ -0,0 +1 @@
|
||||
{% if value is not empty %}<blockquote class="chill-user-quote">{{ value|format_date(date_format) }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ message|trans }}</span>{% endif %}
|
@@ -0,0 +1 @@
|
||||
{% if value is not empty %}{{ value|trans }}{% else %}<span class="chill-no-data-statement">{{ message|trans }}</span>{% endif %}
|
@@ -0,0 +1 @@
|
||||
{% if value is not empty %}{{ value|format_date(date_format) }}{% else %}<span class="chill-no-data-statement">{{ message|trans }}</span>{% endif %}
|
199
src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig
Normal file
199
src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig
Normal file
@@ -0,0 +1,199 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% block form_row %}
|
||||
{% apply spaceless %}
|
||||
{% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %}
|
||||
<div class="container">
|
||||
<div class="{% apply spaceless %}
|
||||
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
|
||||
grid-12
|
||||
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
||||
grid-2 grid-mobile-4 grid-tablet-4 mobile-clear tablet-clear
|
||||
{% else %}
|
||||
grid-4 clear
|
||||
{% endif %}
|
||||
{% endapply %}">
|
||||
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
|
||||
{{ form_label(form) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="{% apply spaceless %}
|
||||
{% if attr.class is defined and 'cf-title' in attr.class %}
|
||||
grid-12
|
||||
{% elseif attr.class is defined and 'cf-fields' in attr.class %}
|
||||
grid-12 parent
|
||||
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
||||
grid-2 grid-mobile-8 grid-tablet-8 multiple-cf-inline
|
||||
{% else %}
|
||||
grid-8
|
||||
{% endif %}
|
||||
{% endapply %}">
|
||||
{{ form_widget(form) }}
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ form_widget(form) }}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
{% endblock form_row %}
|
||||
|
||||
{% block choice_widget_expanded %}
|
||||
{% apply spaceless %}
|
||||
<div {{ block('widget_container_attributes') }} class="choice-widget-expanded">
|
||||
{% for child in form %}
|
||||
<span class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</span>
|
||||
<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('load', function(e) {
|
||||
chill.checkNullValuesInChoices("{{ form.vars.full_name }}");
|
||||
});
|
||||
</script>
|
||||
{% endapply %}
|
||||
{% endblock choice_widget_expanded %}
|
||||
|
||||
|
||||
{% block choice_with_other_widget %}
|
||||
{% apply spaceless %}
|
||||
{% for child in form._choices %}
|
||||
{%- if child.vars.value != '_other' -%}
|
||||
<div class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</div>
|
||||
{%- else -%}
|
||||
<div class="container">
|
||||
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
|
||||
<span class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
|
||||
{{ form_widget(form._other, {'attr': {'class': 'input-text-other-value'} }) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('load', function(e) {
|
||||
chill.checkNullValuesInChoices("{{ form._choices.vars.full_name }}");
|
||||
});
|
||||
</script>
|
||||
{% endapply %}
|
||||
{% endblock choice_with_other_widget %}
|
||||
|
||||
{% block money_widget %}
|
||||
<div class="chill-form-money">
|
||||
{{ block('form_widget_simple') }}
|
||||
<span class="chill-form-money__money">{{ money_pattern|form_encode_currency }}</span>
|
||||
</div>
|
||||
{% endblock money_widget %}
|
||||
|
||||
|
||||
{% block date_widget %}
|
||||
{% apply spaceless %}
|
||||
{% if widget == 'single_text' %}
|
||||
{% set attr = {'class' : 'input datepicker'} %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
<div {{ block('widget_container_attributes') }}>
|
||||
{{ date_pattern|replace({
|
||||
'{{ year }}': form_widget(form.year ),
|
||||
'{{ month }}': form_widget(form.month ),
|
||||
'{{ day }}': form_widget(form.day ),
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
{% endblock date_widget %}
|
||||
|
||||
{%- block time_widget -%}
|
||||
{%- if widget == 'single_text' -%}
|
||||
{{ block('form_widget_simple') }}
|
||||
{%- else -%}
|
||||
{%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%}
|
||||
{% set attr = {'class' : 'time_compound ' ~ attr.class|default('') } %}
|
||||
<div {{ block('widget_container_attributes') }}>
|
||||
{{ form_widget(form.hour, vars) }}{% if with_minutes %}<span class="separator">:</span>{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}<span class="separator">:</span>{{ form_widget(form.second, vars) }}{% endif %}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endblock time_widget -%}
|
||||
|
||||
{% block form_errors %}
|
||||
{% apply spaceless %}
|
||||
{% if errors|length > 0 %}
|
||||
<ul class="errors chill-form__errors">
|
||||
{% for error in errors %}
|
||||
<li class="chill-form_errors__entry {% if 'severity' in error.cause.constraint.payload|keys %}chill-form__errors__entry--{{ error.cause.constraint.payload.severity }}{% endif %}">{{ error.message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
{% endblock form_errors %}
|
||||
|
||||
{% block _formatter__aggregator_placement_csv_formatter_row %}
|
||||
<h3>{{ form_label(form) }}</h3>
|
||||
|
||||
{{ form_row(form.order) }}
|
||||
|
||||
{{ form_row(form.position) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block _formatter__aggregator_placement_spreadsheet_formatter_row %}
|
||||
<h3>{{ form_label(form) }}</h3>
|
||||
|
||||
{{ form_row(form.order) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block chill_collection_widget %}
|
||||
<div class="chill-collection">
|
||||
<ul class="chill-collection__list" data-collection-name="{{ form.vars.name|escape('html_attr') }}" data-collection-identifier="{{ form.vars.identifier|escape('html_attr') }}" data-collection-button-remove-label="{{ form.vars.button_remove_label|trans|e }}" data-collection-allow-add="{{ form.vars.allow_add|escape('html_attr') }}" data-collection-allow-delete="{{ form.vars.allow_delete|escape('html_attr') }}" >
|
||||
{% for entry in form %}
|
||||
<li class="chill-collection__list__entry" data-collection-is-persisted="1">
|
||||
<div>
|
||||
{{ form_widget(entry) }}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if form.vars.allow_add == 1 %}
|
||||
<button class="chill-collection__button--add sc-button" data-collection-add-target="{{ form.vars.name|escape('html_attr') }}" data-form-prototype="{{ ('<div>' ~ form_widget(form.vars.prototype) ~ '</div>')|escape('html_attr') }}" >{{ form.vars.button_add_label|trans }}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block address_widget %}
|
||||
{% for entry in form %}
|
||||
{% if entry.vars.name != 'customs' %}
|
||||
{{ form_row(entry) }}
|
||||
{% else %}
|
||||
{{ form_widget(entry) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@@ -0,0 +1,4 @@
|
||||
<footer class="footer">
|
||||
<p>{{ 'This program is free software: you can redistribute it and/or modify it under the terms of the <strong>GNU Affero General Public License</strong>'|trans|raw }}
|
||||
<br/> <a href="https://{{ app.request.locale }}.wikibooks.org/wiki/Chill" target="_blank">{{ 'User manual'|trans }}</a></p>
|
||||
</footer>
|
@@ -0,0 +1 @@
|
||||
<img class="logo" src="{{ asset('build/images/logo-chill-sans-slogan_white.png') }}">
|
@@ -0,0 +1 @@
|
||||
<footer class="footer"></footer>
|
@@ -0,0 +1 @@
|
||||
<img class="logo" src="{{ asset('build/images/logo-chill-outil-accompagnement_white.png') }}">
|
@@ -0,0 +1,55 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>
|
||||
{{ 'Login to %installation_name%' | trans({ '%installation_name%' : installation.name } ) }}
|
||||
</title>
|
||||
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="stylesheet" href="{{ asset('build/login.css') }}"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
{{ include('@ChillMain/Login/_login-logo.html.twig') }}
|
||||
|
||||
{% if error is not null %}
|
||||
<p>{{ error.message|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="POST" action="{{ path('login_check') }}">
|
||||
<label for="_username">{{ 'Username'|trans }}</label>
|
||||
<input type="text" name="_username" value="{{ last_username }}" />
|
||||
<br/>
|
||||
<label for="_password">{{ 'Password'|trans }}</label>
|
||||
<input type="password" name="_password" />
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
<br/>
|
||||
<button type="submit" name="login">{{ 'Login'|trans }}</button>
|
||||
|
||||
</form>
|
||||
<p class="forgot-password-link"><a href="{{ path('password_request_recover') }}">{{ 'Forgot your password ?'|trans }}</a></p>
|
||||
|
||||
{{ include('@ChillMain/Login/_footer.html.twig') }}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="{{ asset('build/runtime.js') }}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,20 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}{{ 'Admin Menu'|trans }}{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<li class="nav-link2">
|
||||
<div class="li-content">
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="more">Admin Sections</a>
|
||||
</div>
|
||||
<ul class="submenu width-15-em" style="padding-left: 0; padding-right: 0; background-color:transparent;">
|
||||
{% for menu in menus %}
|
||||
<li style="display:block; background-color: #333333; padding-left:1.5em; border-bottom:1px; border-bottom: 1px solid #FFF;padding-top:0; padding-bottom:0;">
|
||||
<div style="margin-bottom:2px;">
|
||||
<div style="font-family: 'Open Sans'; font-weight:300; font-size: 0.75em; text-align:left; height: 46px; display:inline-block; width: calc(100% - 5em - 1px); vertical-align:top;">
|
||||
<a href="{{ menu.uri }}">{{ menu.label|trans }}</a>
|
||||
</div>
|
||||
<div style="background-color: #333333; text-align:center;width: 2em; margin-left:-0.15em; font-size:1.5em; color:#FFF; height: 46px; display:inline-block; vertical-align:top;float:right">{% apply spaceless %}
|
||||
{% if menu.extras.icons is defined %}
|
||||
{% for icon in menu.extras.icons %}
|
||||
<i class="fa fa-{{ icon }}"></i>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endapply %}</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
@@ -0,0 +1,20 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}{{ 'Permissions Menu'|trans }}{% endblock %}
|
@@ -0,0 +1,23 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<ul>
|
||||
{% for route in routes %}
|
||||
<li><a href="{{ path(route.key, args ) }}" class="{%- if activeRouteKey == route.key -%}active{%- endif -%}">{{ route.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
@@ -0,0 +1,20 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}{{ 'Export Menu'|trans }}{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<li class="nav-link2">
|
||||
<div class="li-content">
|
||||
<a href="javascript:void(0)" class="more">Sections</a>
|
||||
</div>
|
||||
<ul class="submenu width-15-em" style="padding-left: 0; padding-right: 0; background-color:transparent;">
|
||||
{% for menu in menus %}
|
||||
<li style="display:block; background-color: #333333; padding-left:1.5em; border-bottom:1px; border-bottom: 1px solid #FFF;padding-top:0; padding-bottom:0;">
|
||||
<div style="margin-bottom:2px;">
|
||||
<div style="font-family: 'Open Sans'; font-weight:300; font-size: 0.75em; text-align:left; height: 46px; display:inline-block; width: calc(100% - 5em - 1px); vertical-align:top;">
|
||||
<a href="{{ menu.uri }}">{{ menu.label }}</a>
|
||||
</div>
|
||||
<div style="background-color: #333333; text-align:center;width: 2em; margin-left:-0.15em; font-size:1.5em; color:#FFF; height: 46px; display:inline-block; vertical-align:top;float:right">{% apply spaceless %}
|
||||
{% if menu.extras.icons is defined %}
|
||||
{% for icon in menu.extras.icons %}
|
||||
<i class="fa fa-{{ icon }}"></i>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endapply %}</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
@@ -0,0 +1,60 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<li class="nav-link2 user-menu">
|
||||
<div class="li-content">
|
||||
<a href="javascript:void(0)" style="font-size: 0.8em; font-family: 'Open Sans'; font-weight:300;">
|
||||
|
||||
{{ 'Welcome' | trans }}<br/>
|
||||
|
||||
<b>{{ app.user.username }}{{ render(controller('ChillMainBundle:UI:showNotificationUserCounter')) }}</b>
|
||||
|
||||
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
|
||||
<i class="fa fa-wrench fa-lg" title="Impersonate mode"></i>
|
||||
{% endif %}
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<ul class="submenu width-11-em user-menu-list" style="padding-left: 0; padding-right: 0; background-color:transparent;">
|
||||
{% for menu in menus %}
|
||||
<li style="display:block; background-color: #333333; padding-left:1.5em; border-bottom:1px; border-bottom: 1px solid #FFF;padding-top:0; padding-bottom:0;">
|
||||
<div style="margin-bottom:2px;">
|
||||
<div style="font-family: 'Open Sans'; font-weight:300; font-size: 0.75em; text-align:left; height: 46px; display:inline-block; width: calc(100% - 5em - 1px); vertical-align:top;">
|
||||
|
||||
{# Impersonate case logout #}
|
||||
{% if is_granted('ROLE_PREVIOUS_ADMIN') and menu.name == 'Logout' %}
|
||||
|
||||
<a href="{{ path('admin_user', {'_switch_user': '_exit'}) }}">
|
||||
{{ 'Exit impersonation'|trans }}
|
||||
</a>
|
||||
|
||||
{% else %}
|
||||
<a href="{{ menu.uri }}">{{ menu.label|trans }}</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div style="background-color: #333333; text-align:center;width: 2em; margin-left:-0.15em; font-size:1.5em; color:#FFF; height: 46px; display:inline-block; vertical-align:top;float:right">{% apply spaceless %}
|
||||
{% if menu.extras.icon is defined %}
|
||||
<i class="fa fa-{{ menu.extras.icon }}"></i>
|
||||
{% endif %}
|
||||
{% endapply %}</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
@@ -0,0 +1,37 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
Layout for a vertical menu (like admin, export) to use with the
|
||||
layout ../layoutWithVerticalMenu.html.twig.
|
||||
#}
|
||||
|
||||
<ul class="tab-nav follow-href-path">
|
||||
<li class="title">
|
||||
{% block v_menu_title %}<!-- title of the verticalMenu is empty -->{% endblock %}
|
||||
</li>
|
||||
{% for route in routes %}
|
||||
<li class="{% apply spaceless %}
|
||||
{% if route.key == activeRouteKey %}
|
||||
active
|
||||
{% endif %}
|
||||
{% endapply %} ">
|
||||
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
@@ -0,0 +1,27 @@
|
||||
{%- macro page(text, page, class = "") -%}
|
||||
<span class="link {{ class }}"><a href="{{ page.generateUrl() }}">{{ text }}</a></span>
|
||||
{%- endmacro -%}
|
||||
|
||||
{% import _self as m %}
|
||||
|
||||
{% if paginator|length > 1 %}
|
||||
<div class="pagination long">
|
||||
{%- if paginator.hasPreviousPage() -%}
|
||||
{{ m.page('Previous'|trans, paginator.getPreviousPage() ) }}
|
||||
{%- endif -%}
|
||||
{% for i in range(10, 1) %}
|
||||
{%- if paginator.hasPage(current - i) -%}
|
||||
{{ m.page(current - i, paginator.getPage(current - i) ) }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
<span class="current link">{{ current }}</span>
|
||||
{% for i in range(1,10) %}
|
||||
{%- if paginator.hasPage(current + i) -%}
|
||||
{{ m.page(current + i, paginator.getPage(current + i) ) }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if paginator.hasNextPage() -%}
|
||||
{{ m.page('Next'|trans, paginator.getNextPage() ) }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{% endif %}
|
@@ -0,0 +1,44 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
|
||||
{% block title %}{{"Change my password"|trans}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
|
||||
|
||||
<h1>{{ 'Change my password'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.actual_password) }}
|
||||
{{ form_row(form.new_password) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,10 @@
|
||||
{{ user.username }},
|
||||
|
||||
{{ 'You requested to recover your password'|trans }}
|
||||
|
||||
{{ 'Click on the link below to recover your password'|trans }} :
|
||||
|
||||
{{ url|raw }}
|
||||
|
||||
{{ 'Regards,'|trans }}
|
||||
{{ 'Your administrator'|trans }}
|
@@ -0,0 +1,49 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>
|
||||
{{ 'Login to %installation_name%' | trans({ '%installation_name%' : installation.name } ) }}
|
||||
</title>
|
||||
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="stylesheet" href="{{ asset('build/chill.css') }}"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="navigation container">
|
||||
<div class="grid-4 hide-tablet hide-mobile parent">
|
||||
<div class="grid-10 push-2 grid-tablet-12 grid-mobile-12 push-tablet-0 grid-mobile-0 logo-container">
|
||||
<a href="{{ path('chill_main_homepage') }}">
|
||||
<img class="logo" src="{{ asset('build/images/logo-chill-sans-slogan_white.png') }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div id="content">
|
||||
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,14 @@
|
||||
{% extends "@ChillMain/Password/recover_layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ "New password set"|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
|
||||
|
||||
<h1>{{ "New password set"|trans }}</h1>
|
||||
|
||||
<p>{{ "Your password has been set."|trans }} <a href="{{ path('login') }}">{{ "Log in with your new password"|trans }}</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,25 @@
|
||||
{% extends "@ChillMain/Password/recover_layout.html.twig" %}
|
||||
|
||||
{% set title = app.request.get('title', "Recover your password"|trans) %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
|
||||
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.new_password) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,43 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
|
||||
{% extends "@ChillMain/Password/recover_layout.html.twig" %}
|
||||
|
||||
|
||||
{% block title %}{{"Recover password"|trans}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
|
||||
|
||||
<h1>{{ 'Recover password'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.username_or_email) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,15 @@
|
||||
{% extends "@ChillMain/Password/recover_layout.html.twig" %}
|
||||
|
||||
{% block title "Check your email"|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
|
||||
|
||||
<h1>{{ 'Check your email'|trans }}</h1>
|
||||
|
||||
<p>{{ 'An email has been sent to your address. Click on the link inside this email to confirm that you are the owner of this account.'|trans }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,95 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'PermissionsGroup "%name%" edit'|trans( { '%name%': entity.name } ) }}</h1>
|
||||
|
||||
<h2>{{ 'Details'|trans }}</h2>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{% if edit_form.flags is defined %}
|
||||
{{ form_row(edit_form.flags) }}
|
||||
{% endif %}
|
||||
{{ form_row(edit_form.submit, { 'attr': { 'class': 'sc-button green' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<h2>{{ 'Grant those permissions'|trans }} :</h2>
|
||||
|
||||
{%- if entity.getRoleScopes|length > 0 -%}
|
||||
{% for title, role_scopes in role_scopes_sorted %}
|
||||
|
||||
<h3>{{ title|default("Unclassified")|trans }}</h3>
|
||||
|
||||
<table class="striped rounded">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Role'|trans }}</th>
|
||||
<th>{{ 'Circle'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for role_scope in role_scopes %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="role_scope role">{{ role_scope.role|trans }}</span>
|
||||
{% if expanded_roles[role_scope.role]|length > 1 %}
|
||||
<br/>
|
||||
<small>{{ 'Which implies'|trans }} : {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{%- if role_scope.scope is not null -%}
|
||||
<span class="role_scope scope">
|
||||
{{ role_scope.scope.name|localize_translatable_string }}
|
||||
</span>
|
||||
{%- else -%}
|
||||
<em>N/A</em>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_start(delete_role_scopes_form[role_scope.id]) }}
|
||||
{{ form_widget(delete_role_scopes_form[role_scope.id].submit, { 'attr': { 'class': 'sc-button red' } } ) }}
|
||||
{{ form_end(delete_role_scopes_form[role_scope.id]) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
|
||||
{%- else -%}
|
||||
<p>{{ 'This group does not provide any permission'|trans }}</p>
|
||||
{%- endif -%}
|
||||
|
||||
<h2>{{ 'Grant new permissions'|trans }}</h2>
|
||||
|
||||
{{ form_start(add_role_scopes_form) }}
|
||||
{{ form_errors(add_role_scopes_form) }}
|
||||
{{ form_row(add_role_scopes_form.composed_role_scope.role) }}
|
||||
{{ form_row(add_role_scopes_form.composed_role_scope.scope) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_row(add_role_scopes_form.submit, { 'attr' : { 'class': 'sc-button bt-create' } } ) }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="sc-button bt-see">{{ 'Cancel'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup') }}" class="sc-button bt-cancel">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{{ form_end(add_role_scopes_form) }}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Permissions group list'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Permissions group list'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td><a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}">{{ entity.name }}</a></td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="sc-button bt-see">{{ 'See'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup_new') }}" class="sc-button bt-create">
|
||||
{{ 'Create a new permissions group'| trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,23 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'New permission group'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'New permission group'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{% if form.flags is defined %}
|
||||
{{ form_row(form.flags) }}
|
||||
{% endif %}
|
||||
{{ form_row(form.submit, { 'attr': { 'class': 'sc-button green' } } ) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,72 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Permission group "%name%"'|trans({ '%name%': entity.name }) }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Permission group "%name%"'|trans({ '%name%': entity.name }) }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<td>{{ entity.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% if role_scopes_sorted|length > 0 %}
|
||||
<h2>{{ 'Grant those permissions'|trans }} :</h2>
|
||||
|
||||
{% for title, role_scopes in role_scopes_sorted %}
|
||||
<h3>{{ title|default('Unclassified')|trans }}</h3>
|
||||
<table class="striped rounded">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Role'|trans }}</th>
|
||||
<th>{{ 'Circle'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for role_scope in role_scopes %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ role_scope.role|trans }}
|
||||
{% if expanded_roles[role_scope.role]|length > 1 %}
|
||||
<br/>
|
||||
<small>{{ 'Which implies'|trans }} : {% for role in expanded_roles[role_scope.role] %}{{ role|trans }}{% if not loop.last %}, {% endif %}{% endfor %}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{%- if role_scope.scope is not null -%}
|
||||
{{ role_scope.scope.name|localize_translatable_string }}
|
||||
{%- else -%}
|
||||
<em>N/A</em>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
|
||||
<p>{{ 'This group does not provide any permission'|trans }}.
|
||||
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}">
|
||||
{{ 'add permissions'|trans|capitalize }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_permissionsgroup') }}" class="sc-button bt-cancel">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,20 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Circle edit'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Circle edit'|trans }}</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'sc-button green' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_scope') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,41 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'List circles'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'List circles'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td><a href="{{ path('admin_scope_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_new') }}">
|
||||
{{ 'Create a new circle'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,20 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Circle creation'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Circle creation'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.submit, { 'attr' : { 'class' : 'sc-button green' } } ) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_scope') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,29 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Circle'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Circle'|trans }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_scope') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}">
|
||||
{{ 'Edit'| trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,46 @@
|
||||
{#
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
|
||||
{% block title title|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div style="margin-right: 2em; margin-left: 2em;">
|
||||
|
||||
<h1>{{ title|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% for f in form %}
|
||||
{% if f.vars.name != 'submit' %}
|
||||
{{ form_row(f) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button bt-create change-icon' } } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,25 @@
|
||||
{#
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% set _search_pattern = pattern %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p class="grid-8 centered error">{{ message }}</p>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,33 @@
|
||||
{#
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% set _search_pattern = pattern %}
|
||||
|
||||
{% block title %}{{ 'Search %pattern%'|trans({ '%pattern%' : pattern }) }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid-12 parent" >
|
||||
<div class="grid-10 push-1 parent">
|
||||
{% for result in results %}
|
||||
{{ result|raw }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
126
src/Bundle/ChillMainBundle/Resources/views/Tabs/README.md
Normal file
126
src/Bundle/ChillMainBundle/Resources/views/Tabs/README.md
Normal file
@@ -0,0 +1,126 @@
|
||||
# Fonctionnalité Tabs sur Chill-Main
|
||||
|
||||
Version 0.2
|
||||
|
||||
(to be translated)
|
||||
|
||||
## Description générale
|
||||
|
||||
**Tabs** est pensé comme une fonctionnalité paramétrique, qui permet de déployer facilement un ou plusieurs groupes d'onglets, avec des options qui permettent de varier son affichage et son comportement.
|
||||
|
||||
Le comportement naturel, ce sont des panneaux qui sont affichés ou cachés en javascript, lorqu'on clique sur l'onglet relatif.
|
||||
|
||||
|
||||
|
||||
## Controller
|
||||
```
|
||||
// in myController.php
|
||||
|
||||
public function myPageAction()
|
||||
{
|
||||
return $this->render('mytemplate.html.twig', [
|
||||
'tabs' => [
|
||||
'myFirstPanel' => [
|
||||
[ 'name' => "Link 1",
|
||||
'content' => "content text"
|
||||
],
|
||||
[ 'name' => "Link 2",
|
||||
'content' => "content text for link 2"
|
||||
]
|
||||
],
|
||||
'mySecondPanel' => [
|
||||
[ 'name' => "Link 1",
|
||||
'content' => "content text"
|
||||
],
|
||||
[ 'name' => "Link 2",
|
||||
'link' => "http://my.url"
|
||||
]
|
||||
]
|
||||
],
|
||||
// ...
|
||||
]);
|
||||
}
|
||||
```
|
||||
#### Description
|
||||
|
||||
* On peut définir plusieurs panneaux d'onglets qui s'afficheront dans une même page ;
|
||||
* Voici la description du tableau passé au template depuis le controller :
|
||||
|
||||
* Au départ on rassemble tous les panneaux d'onglets dans une seule clé, nommée ici `tabs` (la variable est utilisée dans le template, mais son nom peut changer);
|
||||
* Au niveau suivant, chaque clé correspond à l'identifiant(id) d'un panneau d'onglet ;
|
||||
* Au niveau suivant, chaque onglet est défini par un tableau, qui comprends les clés suivantes :
|
||||
|
||||
* la clé `name`, le titre de l'onglet ;
|
||||
* la clé `content`, le contenu du panneau relatif à l'onglet. A ce stade, si `content` contient un tableau, il vous faudra adapter la boucle twig de la macro (voir ci-dessous) ;
|
||||
* une clé `link` (facultative)
|
||||
|
||||
* Lorsque la clé `link` est définie pour un onglet, le comportement est différent : le lien est suivi et on quitte la page. Un panneau d'onglets peut être mixte, avec certains onglets qui sont en réalité des liens.
|
||||
|
||||
|
||||
## Template
|
||||
|
||||
```
|
||||
{# in mytemplate.html.twig #}
|
||||
|
||||
{% block css%}
|
||||
<link rel="stylesheet" href="{{ asset('build/tabs.css') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block js%}
|
||||
<script type="text/javascript">
|
||||
|
||||
let tabParams = [{
|
||||
id : 'myFirstPanel',
|
||||
type: 'tab',
|
||||
initPane: 2,
|
||||
disposition: 'horizontal',
|
||||
fade: true
|
||||
},
|
||||
{
|
||||
id : 'mySecondPanel',
|
||||
type: 'pill',
|
||||
initPane: 5,
|
||||
disposition: 'vertical',
|
||||
fade: false
|
||||
}
|
||||
];
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ asset('build/tabs.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% import '@ChillMain/Tabs/macro.html.twig' as tabsPanel %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{# Display one tabsPanel #}
|
||||
{{ tabsPanel.displayOne(tabs, 'myFirstPanel') }}
|
||||
|
||||
{# Display all tabPanels #}
|
||||
{{ tabsPanel.display(tabs) }}
|
||||
|
||||
{% endblock %}
|
||||
```
|
||||
|
||||
* Il faut commencer par charger la feuille de style `tabs.css` et le script `tabs.js` à l'intérieur des blocs css et js ;
|
||||
* Avant d'appeler `tabs.js`, on définit un tableau d'options pour le script :
|
||||
|
||||
* **id**: string, la clé identifiant du panneau d'onglet (obligatoire)
|
||||
* **type**: [tab|pill] affecte l'affichage (default: tab)
|
||||
* **initPane**: entier, numéro de l'onglet à afficher au chargement de la page (default: 1)
|
||||
* [prévu] **disposition**: [horizontal|vertical] affecte l'affichage (default: horizontal)
|
||||
* [prévu] **fade**: boolean, transition (default: false)
|
||||
|
||||
* Ensuite on peut importer la macro `@ChillMain/Tabs/macro.html.twig` qui permet d'afficher les panneaux d'onglets, soit un par un, soit tous les panneaux ;
|
||||
* Ou on peut s'inspirer des boucles twig de la macro pour en écrire de nouvelles personnalisées ;
|
||||
|
||||
|
||||
## Limitations
|
||||
* On ne peut pas afficher plusieurs fois le même panneau dans la même page
|
||||
|
||||
## Aller plus loin
|
||||
* fixer les options disposition et fade
|
||||
* js, calculer puis fixer la hauteur du panneau suivant le plus long
|
||||
* controller, avec link, on clique il charge une nouvelle page, avec le même panneau d'onglet ?!
|
||||
* insérer le initPane dans les urls en paramètres GET &initPane=xx
|
||||
* quand tab.content n'est pas un string : un bloc de code html, un tableau..
|
@@ -0,0 +1,43 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}Page de test{% endblock %}
|
||||
|
||||
{% block css%}
|
||||
<link rel="stylesheet" href="{{ asset('build/tabs.css') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block js%}
|
||||
<script type="text/javascript">
|
||||
|
||||
let tabParams = [{
|
||||
id : 'test1',
|
||||
type: 'tab',
|
||||
initPane: 2,
|
||||
disposition: 'horizontal',
|
||||
fade: true
|
||||
},
|
||||
{
|
||||
id : 'test2',
|
||||
type: 'pill',
|
||||
initPane: 5,
|
||||
disposition: 'vertical',
|
||||
fade: false
|
||||
}
|
||||
];
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ asset('build/tabs.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% import '@ChillMain/Tabs/macro.html.twig' as tabsPanel %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{# Display one tabsPanel
|
||||
{{ tabsPanel.displayOne(tabs, 'test1') }}
|
||||
#}
|
||||
|
||||
{# Display all tabPanels #}
|
||||
{{ tabsPanel.display(tabs) }}
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,36 @@
|
||||
{#
|
||||
Display only one panel
|
||||
#}
|
||||
{% macro displayOne(tabs, panel) %}
|
||||
<div class="tabs" id="{{ panel }}">
|
||||
<nav>
|
||||
<ul class="nav-tabs" role="tablist">
|
||||
{% for tab in tabs[panel] %}
|
||||
<li class="nav-item">
|
||||
{% set ref = (tab.link is defined )? tab.link : '#' %}
|
||||
<a class="nav-link" href="{{ ref }}">{{ tab.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="tab-content">
|
||||
{% for tab in tabs[panel] %}
|
||||
<div class="tab-pane fade" role="tabpanel">
|
||||
{% if tab.content is defined %}
|
||||
<p>{{ tab.content }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{#
|
||||
Display all panels
|
||||
#}
|
||||
{% macro display(tabs) %}
|
||||
{% import _self as tabsPanel %}
|
||||
{% for panel,array in tabs %}
|
||||
{{ tabsPanel.displayOne(tabs, panel) }}
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -0,0 +1,7 @@
|
||||
<div class="timeline">
|
||||
{% for result in results %}
|
||||
<div class="timeline-item {% if loop.index0 is even %}even{% else %}odd{% endif %}">
|
||||
{% include result.template with result.template_data %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
@@ -0,0 +1 @@
|
||||
{% if nb > 0 %}<span class="notification-counter">{{ nb }}</span>{% endif %}
|
@@ -0,0 +1,78 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'User edit'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'User edit'|trans }}</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
|
||||
{{ form_row(edit_form.username) }}
|
||||
{{ form_row(edit_form.email) }}
|
||||
{{ form_row(edit_form.enabled, { 'label': "User'status"}) }}
|
||||
|
||||
{{ form_widget(edit_form.submit, { 'attr': { 'class' : 'sc-button green center' } } ) }}
|
||||
<a href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" class="sc-button orange">{{ 'Edit password'|trans }}</a>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<h2>{{ 'Permissions granted'|trans }}</h2>
|
||||
|
||||
{% if entity.groupcenters|length > 0 %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Permission group'|trans }}</th>
|
||||
<th>{{ 'Center'|trans }}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for groupcenter in entity.groupcenters %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="user_group permissionsgroup">
|
||||
{{ groupcenter.permissionsgroup.name }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="user_group center">
|
||||
{{ groupcenter.center.name }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ form_start(delete_groupcenter_form[groupcenter.id]) }}
|
||||
{{ form_row(delete_groupcenter_form[groupcenter.id].submit, { 'attr': { 'class': 'sc-button red' } } ) }}
|
||||
{{ form_rest(delete_groupcenter_form[groupcenter.id]) }}
|
||||
{{ form_end(delete_groupcenter_form[groupcenter.id]) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>{{ 'Any permissions granted to this user'|trans }}.</p>
|
||||
{% endif %}
|
||||
|
||||
<h3>{{ 'Grant new permissions'|trans }}</h3>
|
||||
|
||||
{{ form_start(add_groupcenter_form) }}
|
||||
{{ form_row(add_groupcenter_form.composed_groupcenter.center) }}
|
||||
{{ form_row(add_groupcenter_form.composed_groupcenter.permissionsgroup) }}
|
||||
{{ form_row(add_groupcenter_form.submit, { 'attr' : { 'class': 'sc-button green' } } ) }}
|
||||
|
||||
{{ form_end(add_groupcenter_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_user_show', { 'id': entity.id }) }}">
|
||||
{{ 'show'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_user') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,25 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Edit password for %username%'|trans( { '%username%': entity.username } ) }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Edit password for %username%'|trans( { '%username%': entity.username } ) }}</h1>
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.new_password) }}
|
||||
{{ form_widget(edit_form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_user') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_edit', { 'id' : entity.id }) }}">
|
||||
{{ 'Back to the user edition'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,53 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'user list'|trans|capitalize }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'user list'|trans|capitalize }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Username'|trans|capitalize }}</th>
|
||||
<th>{{ 'Actions'|trans|capitalize }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr class="{% if entity.isEnabled == false %}user-disabled{% else %}user-enabled{% endif %}" >
|
||||
<td><a href="{{ path('admin_user_show', { 'id': entity.id }) }}">{{ entity.username }}</a></td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}">{{ 'Edit password'|trans }}</a>
|
||||
</li>
|
||||
|
||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}">
|
||||
{{ 'Impersonate'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_new') }}">
|
||||
{{ 'Add a new user'|trans|capitalize }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock admin_content %}
|
@@ -0,0 +1,22 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'User creation'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'User creation'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.username) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.plainPassword) }}
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'sc-button blue' } }) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_user') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
@@ -0,0 +1,76 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'User %username%'|trans({ '%username%': entity.username }) }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'User %username%'|trans({ '%username%': entity.username }) }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ 'Username' }}</th>
|
||||
<td>{{ entity.username }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ "User'status"|trans }}</th>
|
||||
<td>
|
||||
{%- if entity.enabled -%}
|
||||
{{ 'Enabled, the user is active'|trans }}
|
||||
{%- else -%}
|
||||
{{ 'Disabled, the user is not allowed to login'|trans }}
|
||||
{%- endif -%}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>{{ 'Permissions granted'|trans }}</h2>
|
||||
|
||||
{% if entity.groupcenters|length > 0 %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Permission group'|trans }}</th>
|
||||
<th>{{ 'Center'|trans }}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for groupcenter in entity.groupcenters %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="user_group permissionsgroup">
|
||||
{{ groupcenter.permissionsgroup.name }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="user_group center">
|
||||
{{ groupcenter.center.name }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% else %}
|
||||
<p>{{ 'Any permissions granted to this user'|trans }}.
|
||||
<a href="{{ path('admin_user_edit', { 'id': entity.id }) }}">
|
||||
{{ 'Grant new permissions'|trans }}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_user') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_user_edit', { 'id': entity.id }) }}">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock admin_content %}
|
@@ -0,0 +1,22 @@
|
||||
{% if title is defined %}
|
||||
<h2>{{ title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if confirm_question is defined %}
|
||||
<p class="message-confirm">{{ confirm_question }}</p>
|
||||
{% endif %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path(cancel_route, cancel_parameters|default( { } ) ) }}" class="sc-button bt-cancel">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : "sc-button bt-delete" } } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
162
src/Bundle/ChillMainBundle/Resources/views/layout.html.twig
Normal file
162
src/Bundle/ChillMainBundle/Resources/views/layout.html.twig
Normal file
@@ -0,0 +1,162 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
The basic layout of Chill. All the page / template of Chill must use this template.
|
||||
#}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{{ installation.name }} - {% block title %}{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="stylesheet" href="{{ asset('build/chill.css') }}"/>
|
||||
{#
|
||||
<link rel="stylesheet" href="{{ asset('build/ckeditor5.css') }}" type="text/css"/>
|
||||
#}
|
||||
{% block css%}<!-- nothing added to css -->{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="navigation container">
|
||||
<div class="grid-4 hide-tablet hide-mobile parent">
|
||||
<div class="grid-10 push-2 grid-tablet-12 grid-mobile-12 push-tablet-0 grid-mobile-0 logo-container">
|
||||
<a href="{{ path('chill_main_homepage') }}">
|
||||
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-8 grid-tablet-12 grid-mobile-12 text-right parent">
|
||||
<div class="nav">
|
||||
<ul class="navigation-menu">
|
||||
{% block navigation_section_menu %}
|
||||
{{ chill_menu('section', {
|
||||
'layout': '@ChillMain/Menu/section.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{{ chill_menu('user', {
|
||||
'layout': '@ChillMain/Menu/user.html.twig',
|
||||
}) }}
|
||||
|
||||
{% if available_languages|length == 1 %}
|
||||
<li class="nav-link2 lang-selection">
|
||||
<div class="li-content">
|
||||
<a href="">{{ available_languages[0] | capitalize }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-link2 lang-selection">
|
||||
<div class="li-content">
|
||||
<a href="#" class="more">{{ app.request.locale | capitalize }}</a>
|
||||
</div>
|
||||
<ul class="submenu">
|
||||
{% for lang in available_languages %}
|
||||
<li {% if lang == app.request.locale %}class="active"{% endif %}>
|
||||
<a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale' : lang})) }}">{{ lang | capitalize }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% block navigation_search_bar %}
|
||||
<div class="navigation-search">
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input name="q" type="search" placeholder="{{ 'Search'|trans }}" {% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
||||
<button type="submit" class="sc-button"><i class="fa fa-search fa-flip-horizontal"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% block top_banner %}{# To use if you want to add a banner below the header (ie the menu) #}{% endblock %}
|
||||
|
||||
<div id="content_conainter">
|
||||
{% block sublayout_containter %}
|
||||
<div class="container content">
|
||||
{# Flash messages ! #}
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="grid-8 centered success flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||
<div class="grid-8 centered error flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<div class="grid-8 centered notice flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="grid-8 centered flash_message">
|
||||
<h2>{{ 'Search'|trans }}</h2>
|
||||
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input name="q" type="search" placeholder="{{ 'Search persons, ...'|trans }}" />
|
||||
<center>
|
||||
<button type="submit" class="sc-button orange"><i class="fa fa-search"></i> {{ 'Search'|trans }}</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="homepage_widget">
|
||||
{{ chill_widget('homepage', {} ) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{{ include('@ChillMain/Layout/_footer.html.twig') }}
|
||||
|
||||
<script type="text/javascript" src="{{ asset('build/runtime.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('build/chill.js') }}"></script>
|
||||
<script text="text/javascript" src="{{ asset('build/ckeditor5.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
chill.initPikaday('{{ app.request.locale }}');
|
||||
chill.emulateSticky();
|
||||
chill.checkOtherValueOnChange();
|
||||
$('.select2').select2({allowClear: true});
|
||||
chill.categoryLinkParentChildSelect();
|
||||
</script>
|
||||
|
||||
{% block js%}<!-- nothing added to js -->{% endblock %}
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,65 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
Layout with a vertical menu and a conainer for the content (like admin, export)
|
||||
( for the vertical menu you can extends Menu/veticalMenu.html.twig ).
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block sublayout_containter %}
|
||||
<div class="container content">
|
||||
<div class="grid-8 push-1 grid-mobile-9 grid-tablet-9 push-mobile-0 push-tablet-0">
|
||||
{# Flash messages ! #}
|
||||
<div class="container">
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="grid-8 centered success flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||
<div class="grid-8 centered error flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<div class="grid-8 centered notice flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% block layout_wvm_content %}<!-- content of the layoutWithVerticalMenu is empty -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="grid-3 float-right">
|
||||
{% block vertical_menu_content %}<!-- vertical menu of the layoutWithVerticalMenu is empty -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user