fix layout and menu for activity configuration

close #614 1h00
This commit is contained in:
2015-09-29 17:18:29 +02:00
parent 3dcbec4b87
commit 0ecfcae98b
21 changed files with 180 additions and 58 deletions

View File

@@ -14,19 +14,23 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReason edit</h1>
<h1>{{ 'ActivityReason edit'|trans }}</h1>
{{ form(edit_form) }}
{{ form_start(edit_form) }}
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.active) }}
{{ form_row(edit_form.category) }}
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button orange' } } ) }}
{{ form_end(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
Back to the list
{{ 'Back to the list'|trans }}
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -14,33 +14,29 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReason list</h1>
<h1>{{ 'ActivityReason list'|trans }}</h1>
<table class="records_list">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Active</th>
<th>Actions</th>
<th>{{ 'Name'|trans }}</th>
<th>{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.name|localize_translatable_string }}</td>
<td>{{ entity.active }}</td>
<tr class="{% if entity.active %}active{% else %}inactive{% endif %}">
<td><a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>
<ul>
<li>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">show</a>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">edit</a>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
</li>
</ul>
</td>
@@ -52,7 +48,7 @@
<ul>
<li>
<a href="{{ path('chill_activity_activityreason_new') }}">
Create a new entry
{{ 'Create a new activity reason'|trans }}
</a>
</li>
</ul>

View File

@@ -14,17 +14,22 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReason creation</h1>
<h1>{{ 'ActivityReason creation'|trans }}</h1>
{{ form(form) }}
{{ form_start(form) }}
{{ form_row(form.name) }}
{{ form_row(form.active) }}
{{ form_row(form.category) }}
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button green' } } ) }}
{{ form_end(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
Back to the list
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>

View File

@@ -14,24 +14,26 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReason</h1>
<h1>{{ 'ActivityReason'|trans }}</h1>
<table class="record_properties">
<tbody>
<tr>
<th>Id</th>
<td>{{ entity.id }}</td>
</tr>
<tr>
<th>Name</th>
<th>{{ 'Name'|trans }}</th>
<td>{{ entity.name|localize_translatable_string }}</td>
</tr>
<tr>
<th>Active</th>
<td>{{ entity.active }}</td>
<th>{{ 'Active' }}</th>
<td>
{% if entity.active %}
<p>{{ 'The entity is active and will be proposed'|trans }}</p>
{% else %}
<p>{{ "The entity is inactive and won't be proposed"|trans }}</p>
{% endif %}
</td>
</tr>
</tbody>
</table>
@@ -39,14 +41,13 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
Back to the list
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">
Edit
{{ 'Edit'|trans }}
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReasonCategory edit</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReasonCategory list</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReasonCategory creation</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityReasonCategory</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityType edit</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityType list</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityType creation</h1>

View File

@@ -14,7 +14,7 @@
* 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 "ChillMainBundle::Admin/layout.html.twig" %}
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>ActivityType</h1>

View File

@@ -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 "ChillMainBundle::layoutWithVerticalMenu.html.twig" %}
{% block vertical_menu_content %}
{{ chill_menu('admin_activity', {
'layout': 'ChillActivityBundle::Admin/menu_activity.html.twig',
}) }}
{% endblock %}
{% block layout_wvm_content %}
{% block admin_content %}<!-- block personcontent empty -->
<h1>{{ 'Activity configuration' |trans }}</h1>
{% endblock %}
{% endblock %}

View File

@@ -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 "ChillMainBundle::Menu/verticalMenu.html.twig" %}
{% block v_menu_title %}{{ 'Activity configuration menu'|trans }}{% endblock %}