remove code for custom fields default group CRUD

The CRUD of default groups is handled now by the custom fields index page. The CRUD is not necessary.
This commit is contained in:
Julien Fastré 2015-11-08 18:52:05 +01:00
parent 3e23c1f156
commit 421f54e194
4 changed files with 0 additions and 106 deletions

View File

@ -1,44 +0,0 @@
<?php
namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup;
/**
* CustomFieldsDefaultGroup controller.
*
*/
class CustomFieldsDefaultGroupController extends Controller
{
/**
* Lists all CustomFieldsDefaultGroup entities.
*
*/
public function listAction()
{
$em = $this->getDoctrine()->getManager();
$defaultGroups = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsDefaultGroup')->findAll();
$form = $this->get('form.factory')
->createNamedBuilder(null, 'form', null, array(
'method' => 'GET',
'action' => $this->generateUrl('customfieldsdefaultgroup_set'),
'csrf_protection' => false
))
->add('cFGroup', 'entity', array(
'class' => 'ChillCustomFieldsBundle:CustomFieldsGroup',
'property' => 'name[fr]'
))
->getForm();
return $this->render('ChillCustomFieldsBundle:CustomFieldsDefaultGroup:list.html.twig', array(
'defaultGroups' => $defaultGroups,
'form' => $form->createView()
));
}
}

View File

@ -5,7 +5,3 @@ chill_customfields_customfieldsgroup:
chill_customfields_customfield: chill_customfields_customfield:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfield.yml" resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfield.yml"
prefix: / prefix: /
chill_customfields_customfieldsdefaultgroup:
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfieldsdefaultgroup.yml"
prefix: /

View File

@ -1,12 +0,0 @@
customfieldsdefaultgroup:
path: /{_locale}/admin/customfieldsdefaultgroup/
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsDefaultGroup:list" }
options:
menus:
admin_custom_fields:
order: 1000
label: "CustomFields Default Groups : List"
customfieldsdefaultgroup_set:
path: /{_locale}/admin/customfieldsdefaultgroup/set/group/as/default/
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsDefaultGroup:setAGroupAsDefault" }

View File

@ -1,46 +0,0 @@
{#
* 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 "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
{% block admin_content %}
<h1>CustomFieldsDefaultGroup list</h1>
<table class="records_list">
<thead>
<tr>
<th>Entity</th>
<th>CustomFieldGroup</th>
</tr>
</thead>
<tbody>
{% for defaultGroup in defaultGroups %}
<tr>
<td>{{ defaultGroup.entity }}</td>
<td>{{ defaultGroup.customFieldsGroup.name['fr'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ form_start(form) }}
{{ form_row(form.cFGroup) }}
<button type="submit">
set as Default
</button>
{{ form_end(form) }}
{% endblock %}