mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Adding customfileds config in the Admin section menu
This commit is contained in:
parent
d21595d306
commit
e2c1a9bb9f
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\CustomFieldsBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
/**
|
||||
* Controller for the custom fields configuration section (in
|
||||
* the admin)
|
||||
*
|
||||
*/
|
||||
class AdminController extends Controller
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
return $this->render('ChillCustomFieldsBundle:Admin:layout.html.twig');
|
||||
}
|
||||
}
|
@ -1,11 +1,21 @@
|
||||
customfield:
|
||||
customfield_section:
|
||||
path: /{_locale}/admin/customfield/
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:Admin:index" }
|
||||
options:
|
||||
menus:
|
||||
admin_section:
|
||||
order: 1000
|
||||
label: "Custom fields configuration"
|
||||
icons: ['asterisk']
|
||||
|
||||
customfield:
|
||||
path: /{_locale}/admin/customfield/list
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:index" }
|
||||
options:
|
||||
menus:
|
||||
admin:
|
||||
admin_custom_fields:
|
||||
order: 1000
|
||||
label: "CustomFields"
|
||||
label: "CustomFields List"
|
||||
|
||||
customfield_show:
|
||||
path: /{_locale}/admin/customfield/{id}/show
|
||||
|
@ -3,7 +3,7 @@ customfieldsdefaultgroup:
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsDefaultGroup:list" }
|
||||
options:
|
||||
menus:
|
||||
admin:
|
||||
admin_custom_fields:
|
||||
order: 1000
|
||||
label: "CustomFields Default Groups : List"
|
||||
|
||||
|
@ -3,7 +3,7 @@ customfieldsgroup:
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:index" }
|
||||
options:
|
||||
menus:
|
||||
admin:
|
||||
admin_custom_fields:
|
||||
order: 1010
|
||||
label: "CustomFields Groups"
|
||||
|
||||
|
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_custom_fields', {
|
||||
'layout': 'ChillCustomFieldsBundle::Admin/menu.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
{% block admin_content %}<!-- block personcontent empty -->
|
||||
<h1>{{ 'CustomFields configuration' |trans }}</h1>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
20
Resources/views/Admin/menu.html.twig
Normal file
20
Resources/views/Admin/menu.html.twig
Normal 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 %}{{ 'Custom fields configuration menu'|trans }}{% endblock %}
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomField edit</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomField list</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomField creation</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomField</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomFieldsDefaultGroup list</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomFieldsGroup edit</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomFieldsGroup list</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomFieldsGroup creation</h1>
|
||||
|
@ -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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>CustomFieldsGroup</h1>
|
||||
|
Loading…
x
Reference in New Issue
Block a user