rename 'label' to 'name'.

Warning : this commit require to rename some table column, but the
original Version file has been update.

If you do not care to loose your date, you may run :

```
php app/console doctrine:migrations:execute --down 20160318111334
php app/console doctrine:migrations:execute --up 20160318111334
php app/console doctrine:cache:metadata #(if you have a cache for
doctrine meta date)
```
close #20
This commit is contained in:
2016-03-24 23:27:39 +01:00
parent 20c49d5bd0
commit d8de53ca3c
30 changed files with 71 additions and 71 deletions

View File

@@ -8,7 +8,7 @@ Chill\EventBundle\Entity\Event:
generator:
strategy: AUTO
fields:
label:
name:
type: string
length: '150'
date:

View File

@@ -8,7 +8,7 @@ Chill\EventBundle\Entity\EventType:
generator:
strategy: AUTO
fields:
label:
name:
type: json_array
active:
type: boolean

View File

@@ -8,7 +8,7 @@ Chill\EventBundle\Entity\Role:
generator:
strategy: AUTO
fields:
label:
name:
type: json_array
active:
type: boolean

View File

@@ -8,7 +8,7 @@ Chill\EventBundle\Entity\Status:
generator:
strategy: AUTO
fields:
label:
name:
type: json_array
active:
type: boolean

View File

@@ -24,24 +24,24 @@ class Version20160318111334 extends AbstractMigration
$this->addSql('CREATE SEQUENCE chill_event_event_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE chill_event_participation_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE chill_event_event_type ('
. 'id INT NOT NULL, label JSON NOT NULL, '
. 'id INT NOT NULL, name JSON NOT NULL, '
. 'active BOOLEAN NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE chill_event_role ('
. 'id INT NOT NULL, '
. 'type_id INT DEFAULT NULL, '
. 'label JSON NOT NULL, '
. 'name JSON NOT NULL, '
. 'active BOOLEAN NOT NULL, '
. 'PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_AA714E54C54C8C93 ON chill_event_role (type_id)');
$this->addSql('CREATE TABLE chill_event_status (id INT NOT NULL, '
. 'type_id INT DEFAULT NULL, '
. 'label JSON NOT NULL, '
. 'name JSON NOT NULL, '
. 'active BOOLEAN NOT NULL, '
. 'PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_A6CC85D0C54C8C93 ON chill_event_status (type_id)');
$this->addSql('CREATE TABLE chill_event_event ('
. 'id INT NOT NULL, '
. 'label VARCHAR(150) NOT NULL, '
. 'name VARCHAR(150) NOT NULL, '
. 'date DATE NOT NULL, '
. 'center_id INT DEFAULT NULL, '
. 'type_id INT DEFAULT NULL, '

View File

@@ -11,7 +11,7 @@
{% if edit_form.center is defined %}
{{ form_row(edit_form.center) }}
{% endif %}
{{ form_row(edit_form.label) }}
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.date) }}
{{ form_row(edit_form.type, { 'label': 'Event type' }) }}

View File

@@ -7,7 +7,7 @@
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Name</th>
<th>Date</th>
<th>Actions</th>
</tr>
@@ -16,7 +16,7 @@
{% for entity in entities %}
<tr>
<td><a href="{{ path('chill_event__event_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.name }}</td>
<td>{% if entity.date %}{{ entity.date|date('Y-m-d H:i:s') }}{% endif %}</td>
<td>
<ul>

View File

@@ -16,9 +16,9 @@
<tbody>
{% for event in events %}
<tr>
<td>{{ event.label }}</td>
<td>{{ event.name }}</td>
<td>{{ event.date|localizeddate('long', 'none') }}</td>
<td>{{ event.type.label|localize_translatable_string }}</td>
<td>{{ event.type.name|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>

View File

@@ -9,7 +9,7 @@
{{ form_errors(form) }}
{{ form_row(form.circle) }}
{{ form_row(form.center) }}
{{ form_row(form.label) }}
{{ form_row(form.name) }}
{{ form_row(form.date) }}
{{ form_row(form.type, { 'label': 'Event type' }) }}

View File

@@ -1,6 +1,6 @@
{% extends 'ChillEventBundle::layout.html.twig' %}
{% block title 'Event : %label%'|trans({ '%label%' : event.label } ) %}
{% block title 'Event : %label%'|trans({ '%label%' : event.name } ) %}
{% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %}
@@ -11,7 +11,7 @@
<tbody>
<tr>
<th>{{ 'Name'|trans }}</th>
<td>{{ event.label }}</td>
<td>{{ event.name }}</td>
</tr>
<tr>
<th>{{ 'Date'|trans }}</th>
@@ -19,7 +19,7 @@
</tr>
<tr>
<th>{{ 'Event type'|trans }}</th>
<td>{{ event.type.label|localize_translatable_string }}</td>
<td>{{ event.type.name|localize_translatable_string }}</td>
</tr>
<tr>
<th>{{ 'Circle'|trans }}</th>
@@ -55,9 +55,9 @@
{% for participation in event.participations %}
<tr>
<td>{{ person_macro.render(participation.person) }}</td>
<td>{{ participation.role.label|localize_translatable_string }}</td>
<td>{{ participation.status.label|localize_translatable_string }}</td>
<td>{{ participation.lastUpdate|time_diff }} <i class="fa fa-calendar-o" title="{{ participation.lastUpdate|localizeddate("long", "medium")|escape('html_attr') }}"></i></td>
<td>{{ participation.role.name|localize_translatable_string }}</td>
<td>{{ participation.status.name|localize_translatable_string }}</td>
<td>{{ participation.lastUpdate|time_diff }} <i class="fa fa-info-circle" title="{{ participation.lastUpdate|localizeddate("long", "medium")|escape('html_attr') }}"></i></td>
<td>
<ul class="record_actions">
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}

View File

@@ -16,7 +16,7 @@
{% for entity in entities %}
<tr>
<td><a href="{{ path('{_locale}_admin_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.name }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>

View File

@@ -10,8 +10,8 @@
<td>{{ entity.id }}</td>
</tr>
<tr>
<th>Label</th>
<td>{{ entity.label }}</td>
<th>Name</th>
<td>{{ entity.name }}</td>
</tr>
<tr>
<th>Active</th>

View File

@@ -13,7 +13,7 @@
</tr>
<tr>
<th>{{ 'Associated event'|trans }} </th>
<td>{{ participation.event.label }}</td>
<td>{{ participation.event.name }}</td>
</tr>
<tr>
<th>{{ 'Date'|trans }} </th>

View File

@@ -15,7 +15,7 @@
</tr>
<tr>
<th>{{ 'Associated event'|trans }} </th>
<td>{{ participation.event.label }}</td>
<td>{{ participation.event.name }}</td>
</tr>
</tbody>
</table>

View File

@@ -7,7 +7,7 @@
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Name</th>
<th>Active</th>
<th>Actions</th>
</tr>
@@ -16,7 +16,7 @@
{% for entity in entities %}
<tr>
<td><a href="{{ path('{_locale}_admin_role_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.name }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>

View File

@@ -10,8 +10,8 @@
<td>{{ entity.id }}</td>
</tr>
<tr>
<th>Label</th>
<td>{{ entity.label }}</td>
<th>Name</th>
<td>{{ entity.name }}</td>
</tr>
<tr>
<th>Active</th>

View File

@@ -7,7 +7,7 @@
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Name</th>
<th>Active</th>
<th>Actions</th>
</tr>
@@ -16,7 +16,7 @@
{% for entity in entities %}
<tr>
<td><a href="{{ path('fr_admin_event_status_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.name }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>

View File

@@ -10,8 +10,8 @@
<td>{{ entity.id }}</td>
</tr>
<tr>
<th>Label</th>
<td>{{ entity.label }}</td>
<th>Name</th>
<td>{{ entity.name }}</td>
</tr>
<tr>
<th>Active</th>