Export view

This commit is contained in:
Marc Ducobu 2015-02-16 18:09:04 +01:00
parent 10fdc2e072
commit 756a188817
8 changed files with 234 additions and 54 deletions

View File

@ -0,0 +1,39 @@
<?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014-2015, 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/>.
*/
namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* ExportController is the controller use for exporting data.
*
*/
class ExportController extends Controller
{
public function indexAction($menu = 'admin',
$header_title = 'views.Main.admin.index.header_title',
$page_title = 'views.Main.admin.index.page_title')
{
return $this->render('ChillMainBundle:Export:layout.html.twig');
}
}

View File

@ -19,16 +19,26 @@ chill_main_homepage:
label: Homepage
icons: [home]
chill_main_export_index:
pattern: /{_locale}/export
defaults: { _controller: ChillMainBundle:Export:index }
options:
menus:
section:
order: 20
label: Export Menu
icons: [upload]
chill_main_admin_central:
pattern: /{_locale}/admin
defaults: { _controller: ChillMainBundle:Admin:index }
options:
menus:
section:
order: 20
order: 30
label: Admin Menu
icons: [gears]
chill_main_search:
pattern: /{_locale}/search
defaults: { _controller: ChillMainBundle:Search:search }

View File

@ -1,5 +1,6 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
* 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
@ -14,46 +15,17 @@
* 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::layout.html.twig" %}
{% block layout_content %}
{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %}
<div class="container content">
{% block vertical_menu_content %}
{{ chill_menu('admin', {
'layout': 'ChillMainBundle::Menu/admin.html.twig',
}) }}
{% endblock %}
<div class="grid-8">
{# Flash messages ! #}
<div class="container">
{% for flashMessage in app.session.flashbag.get('success') %}
<div class="grid-8 centered success">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('danger') %}
<div class="grid-8 centered error">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('info') %}
<div class="grid-8 centered notice">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
</div>
{% block admin_content %}<!-- block personcontent empty -->
Welcome to the Admin !
{% endblock %}
</div>
</div>
{% endblock %}
{% block layout_wvm_content %}
{% block admin_content %}<!-- block personcontent empty -->
Welcome to the admin section !
{% endblock %}
{% endblock %}

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('export', {
'layout': 'ChillMainBundle::Menu/export.html.twig',
}) }}
{% endblock %}
{% block layout_wvm_content %}
{% block export_content %}<!-- block personcontent empty -->
Welcome to the Export section !
{% endblock %}
{% endblock %}

View File

@ -1,14 +1,20 @@
<div class="grid-4">
<ul class="tab-nav follow-href-path">
<li class="title">{{ 'Admin Menu'|trans }}</li>
{% for route in routes %}
<li class="{% spaceless %}
{% if route.key == activeRouteKey %}
active
{% endif %}
{% endspaceless %} ">
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans }}</a>
</li>
{% endfor %}
</ul>
</div>
{#
* 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 %}{{ 'Admin Menu'|trans }}{% 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 %}{{ 'Export Menu'|trans }}{% endblock %}

View File

@ -0,0 +1,38 @@
{#
* 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.
#}
<div class="grid-4">
<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="{% spaceless %}
{% if route.key == activeRouteKey %}
active
{% endif %}
{% endspaceless %} ">
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans }}</a>
</li>
{% endfor %}
</ul>
</div>

View File

@ -0,0 +1,64 @@
{#
* 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 "ChillMainBundle::layout.html.twig" %}
{% block layout_content %}
<div class="container content">
{% block vertical_menu_content %}<!-- vertical menu of the layoutWithVerticalMenu is empty -->
{% endblock %}
<div class="grid-8">
{# Flash messages ! #}
<div class="container">
{% for flashMessage in app.session.flashbag.get('success') %}
<div class="grid-8 centered success">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('danger') %}
<div class="grid-8 centered error">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('info') %}
<div class="grid-8 centered notice">
<span>
{{ flashMessage|raw }}
</span>
</div>
{% endfor %}
</div>
{% block layout_wvm_content %}<!-- content of the layoutWithVerticalMenu is empty -->
{% endblock %}
</div>
</div>
{% endblock %}