mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Add Chill context for event admins pages
This commit is contained in:
parent
3274ddb496
commit
7ac7def366
37
Controller/AdminController.php
Normal file
37
Controller/AdminController.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
* Copyright (C) 2015 Champs Libres <info@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/>.
|
||||
*/
|
||||
|
||||
namespace Chill\EventBundle\Controller;
|
||||
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
/**
|
||||
* Controller for the event configuration section (in
|
||||
* the admin)
|
||||
*
|
||||
*/
|
||||
class AdminController extends Controller
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
return $this->render('ChillEventBundle:Admin:layout.html.twig');
|
||||
}
|
||||
}
|
@ -2,7 +2,24 @@ chill_event_event:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/event.yml"
|
||||
prefix: /{_locale}/event/event
|
||||
|
||||
chill_event_fr_admin_event_status:
|
||||
chill_event_participation:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/participation.yml"
|
||||
prefix: /{_locale}/event/participation
|
||||
|
||||
|
||||
## ADMIN
|
||||
|
||||
chill_event_admin:
|
||||
path: /{_locale}/admin/event
|
||||
defaults: { _controller: "ChillEventBundle:Admin:index" }
|
||||
options:
|
||||
menus:
|
||||
admin_section:
|
||||
order: 1000
|
||||
label: "Events configuration"
|
||||
icons: ['calendar']
|
||||
|
||||
chill_event_admin_status:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/status.yml"
|
||||
prefix: /{_locale}/admin/event/status
|
||||
|
||||
@ -14,6 +31,3 @@ chill_event_admin_event_type:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/eventtype.yml"
|
||||
prefix: /{_locale}/admin/event/event_type
|
||||
|
||||
chill_event_participation:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/participation.yml"
|
||||
prefix: /{_locale}/event/participation
|
||||
|
@ -1,6 +1,11 @@
|
||||
chill_eventtype_admin:
|
||||
path: /
|
||||
defaults: { _controller: "ChillEventBundle:EventType:index" }
|
||||
options:
|
||||
menus:
|
||||
admin_events:
|
||||
order: 90
|
||||
label: "Event types"
|
||||
|
||||
chill_eventtype_admin_show:
|
||||
path: /{id}/show
|
||||
|
@ -1,6 +1,11 @@
|
||||
chill_event_admin_role:
|
||||
path: /
|
||||
defaults: { _controller: "ChillEventBundle:Role:index" }
|
||||
options:
|
||||
menus:
|
||||
admin_events:
|
||||
order: 110
|
||||
label: "Event roles"
|
||||
|
||||
chill_event_admin_role_show:
|
||||
path: /{id}/show
|
||||
|
@ -1,6 +1,11 @@
|
||||
chill_event_admin_status:
|
||||
path: /
|
||||
defaults: { _controller: "ChillEventBundle:Status:index" }
|
||||
options:
|
||||
menus:
|
||||
admin_events:
|
||||
order: 100
|
||||
label: "Event status"
|
||||
|
||||
chill_event_admin_status_show:
|
||||
path: /{id}/show
|
||||
|
@ -73,4 +73,23 @@ Pick a type of event: Choisir un type d'événement
|
||||
Pick a moderator: Choisir un animateur
|
||||
|
||||
Select a format: Choisir un format
|
||||
Export: Exporter
|
||||
Export: Exporter
|
||||
|
||||
|
||||
Events configuration: Événements
|
||||
Events configuration menu: Menu des événements
|
||||
Event status: Statuts
|
||||
Event roles: Rôles
|
||||
Event types: Types d'événements
|
||||
EventType list: Liste des types d'événements
|
||||
EventType: Types d'événements
|
||||
EventType creation: Nouveau type d'événement
|
||||
EventType edit: Modifier le type d'événement
|
||||
Status list: Liste des statuts
|
||||
Status: Statuts
|
||||
Status creation: Nouveau statut
|
||||
Status edit: Modifier un statut
|
||||
Role list: Liste des rôles
|
||||
Role: Rôles
|
||||
Role creation: Nouveau rôle
|
||||
Role edit: Modifier un rôle
|
||||
|
31
Resources/views/Admin/layout.html.twig
Normal file
31
Resources/views/Admin/layout.html.twig
Normal 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::Admin/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block vertical_menu_content %}
|
||||
{{ chill_menu('admin_events', {
|
||||
'layout': 'ChillEventBundle::Admin/menu.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
{% block admin_content %}<!-- block personcontent empty -->
|
||||
<h1>{{ 'Events configuration' |trans }}</h1>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
23
Resources/views/Admin/menu.html.twig
Normal file
23
Resources/views/Admin/menu.html.twig
Normal file
@ -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/>.
|
||||
#}
|
||||
|
||||
{% extends "ChillMainBundle::Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}
|
||||
{{ 'Events configuration menu'|trans }}
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>EventType edit</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'EventType edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>EventType list</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'EventType list'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
@ -40,4 +41,4 @@
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>EventType creation</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'EventType creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>EventType</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'EventType'|trans }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Role edit</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Role edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Role list</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Role list'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
@ -17,6 +19,7 @@
|
||||
<tr>
|
||||
<td><a href="{{ path('chill_event_admin_role_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
<td>{{ entity.type.name|localize_translatable_string }}</td>
|
||||
<td>{{ entity.active }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Role creation</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Role creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Role</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Role'|trans }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Status edit</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Status edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Status list</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Status list'|trans }}</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Status creation</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Status creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Status</h1>
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Status'|trans }}</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user