layout of index page for customfieldsgroup

- add a "default" column (according to chill-project/custom-fields#3 )
- translation
This commit is contained in:
2015-10-31 17:55:10 +01:00
parent 7cf270cee4
commit 9d65ca5088
4 changed files with 89 additions and 14 deletions

View File

@@ -10,6 +10,10 @@ customfieldsgroup:
customfieldsgroup_show:
path: /{_locale}/admin/customfieldsgroup/{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:show" }
customfieldsgroup_makedefault:
path: /{_locale}/admin/customfieldsgroup/make_default
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:makeDefault" }
customfieldsgroup_new:
path: /{_locale}/admin/customfieldsgroup/new

View File

@@ -1,3 +1,14 @@
'Not available in your language': 'Traduction pas disponible dans votre langue'
'Other value': 'Autre valeur'
'None': 'Pas spécifié'
Custom fields configuration: Configuration des champs personnalisés
CustomFieldsGroup list: Groupes de champs personnalisés
Entity: Entité
"Is default ?": "Par défaut ?"
"Some module select default groups for some usage. Example: the default person group is shown under person page.": "Certains modules sélectionnent en priorité les formulaires par défaut. Exemple: le formulaire par défaut pour une personne est affiché sur la page principale pour la personne"
Make default: Assigner comme formulaire par défaut
Create a new group: Créer un nouveau groupe
CustomFields List: Liste des champs personnalisés
CustomFields Groups: Groupe de champs personnalisés

View File

@@ -17,30 +17,38 @@
{% extends "ChillCustomFieldsBundle::Admin/layout.html.twig" %}
{% block admin_content %}
<h1>CustomFieldsGroup list</h1>
<h1>{{ 'CustomFieldsGroup list'|trans }}</h1>
<table class="records_list">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Entity</th>
<th>Actions</th>
<th>{{ 'Name'|trans }}</th>
<th>{{ 'Entity'|trans }}</th>
<th>{{ 'Is default ?'|trans }} <i class="fa fa-info-circle" title="{{ 'Some module select default groups for some usage. Example: the default person group is shown under person page.'|trans|escape('html_attr') }}"></i></th>
<th>{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.name['fr'] }}</td>
<td>{{ entity.entity }}</td>
<td><a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>{{ entity.entity|trans }}</td>
<td style="text-align: center;">
{%- if entity.id in default_groups -%}
<i class="fa fa-star"></i>
{%- else -%}
{{ form_start(make_default_forms[entity.id]) }}
{{ form_widget(make_default_forms[entity.id].submit, { 'attr' : { 'class' : 'sc-button bt-action' } } ) }}
{{ form_end(make_default_forms[entity.id]) }}
{%- endif -%}
</td>
<td>
<ul>
<li>
<a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}">show</a>
<a href="{{ path('customfieldsgroup_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
</li>
<li>
<a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}">edit</a>
<a href="{{ path('customfieldsgroup_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
</li>
</ul>
</td>
@@ -52,7 +60,7 @@
<ul>
<li>
<a href="{{ path('customfieldsgroup_new') }}">
Create a new entry
{{ 'Create a new group'|trans }}
</a>
</li>
</ul>