mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-12 00:09:44 +00:00
Adding CustomFieldsDefaultGroup Entity for specifying that a group is a default group ref #307
This commit is contained in:
20
Resources/config/doctrine/CustomFieldsDefaultGroup.orm.yml
Normal file
20
Resources/config/doctrine/CustomFieldsDefaultGroup.orm.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup:
|
||||
type: entity
|
||||
table: null
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
entity:
|
||||
type: string
|
||||
length: 255
|
||||
manyToOne:
|
||||
customFieldsGroup:
|
||||
targetEntity: Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
|
||||
inversedBy: customFields
|
||||
uniqueConstraints:
|
||||
unique_entity:
|
||||
columns: [ entity ]
|
@@ -1,20 +1,23 @@
|
||||
cl_custom_fields_customfieldsgroup:
|
||||
chill_customfields_customfieldsgroup:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfieldsgroup.yml"
|
||||
prefix: /
|
||||
|
||||
cl_custom_fields_blopentity2:
|
||||
chill_customfields_blopentity2:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/blopentity2.yml"
|
||||
prefix: /blopentity2
|
||||
|
||||
cl_custom_fields_adress:
|
||||
chill_customfields_adress:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/adress.yml"
|
||||
prefix: /adress
|
||||
|
||||
cl_custom_fields_customfield:
|
||||
chill_customfields_customfield:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfield.yml"
|
||||
prefix: /
|
||||
|
||||
cl_custom_fields_blopentity:
|
||||
chill_customfields_blopentity:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/blopentity.yml"
|
||||
prefix: /
|
||||
|
||||
chill_customfields_customfieldsdefaultgroup:
|
||||
resource: "@ChillCustomFieldsBundle/Resources/config/routing/customfieldsdefaultgroup.yml"
|
||||
prefix: /
|
7
Resources/config/routing/customfieldsdefaultgroup.yml
Normal file
7
Resources/config/routing/customfieldsdefaultgroup.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
customfieldsdefaultgroup:
|
||||
path: /{_locale}/admin/customfieldsdefaultgroup/
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsDefaultGroup:list" }
|
||||
|
||||
customfieldsdefaultgroup_set:
|
||||
path: /{_locale}/admin/customfieldsdefaultgroup/set/group/as/default/
|
||||
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsDefaultGroup:setAGroupAsDefault" }
|
30
Resources/views/CustomFieldsDefaultGroup/list.html.twig
Normal file
30
Resources/views/CustomFieldsDefaultGroup/list.html.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
<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 %}
|
Reference in New Issue
Block a user