initial commit'n push

This commit is contained in:
2019-06-11 11:49:27 +02:00
parent 3cc282f4a3
commit 98ecd72bea
44 changed files with 2880 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title 'List of third parties'|trans %}
{% block content %}
<div class="grid-10 centered">
<h1>{{ 'List of third parties'|trans }}</h1>
{% if third_parties|length == 0 %}
<p class="chill-no-data-statement">{{ 'No third parties'|trans }}</p>
{% else %}
<table>
<thead>
<tr>
<th>{{ 'Name'|trans }}</th>
<th>{{ 'Active'|trans }}</th>
<th>{{ 'type'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for tp in third_parties %}
<tr>
<td>{{ tp.name }}</td>
<td>{{ (tp.active ? '<i class="fa fa-check-square-o">' : '<i class="fa fa-square-o">')|raw }}</td>
{% set types = [] %}
{% for t in tp.type %}
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
{% endfor %}
<td>{{ types|join(', ') }}</td>
<td>
<ul class="record_actions">
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
<li>
<a href="{{ chill_path_add_return_path('chill_3party_3party_update', { 'thirdparty_id': tp.id }) }}" class="sc-button bt-update"></a>
</li>
{% endif %}
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
<li>
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': tp.id }) }}" class="sc-button bt-show"></a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_3party_3party_new') }}" class="sc-button bt-create">
{{ "New third party"|trans }}
</a>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,34 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title 'Create third party'|trans %}
{% block content %}
<div class="grid-10 centered">
<h1>{{ 'Create third party'|trans }}</h1>
{{ form_start(form) }}
{{ form_row(form.name) }}
{{ form_row(form.type) }}
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
{{ form_row(form.address) }}
{{ form_row(form.active) }}
{{ form_row(form.centers) }}
{{ form_row(form.comment) }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ chill_return_path_or('chill_3party_3party_index') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_widget(form.submit, {'label': 'Create', 'attr': {'class': 'sc-button bt-new' }}) }}
</li>
</ul>
{{ form_end(form) }}
</div>
{% endblock %}

View File

@@ -0,0 +1,67 @@
{% extends "@ChillMain/layout.html.twig" %}
{% import '@ChillMain/Address/macro.html.twig' as address %}
{% set title_ = 'Show third party %name%'|trans({'%name%' : thirdParty.name }) %}
{% block title title_ %}
{% block content %}
<div class="grid-10 centered">
<h1>
{{ title_ }}
<span class="chill__box {{ thirdParty.active ? 'green' : 'red' }}">{{ (thirdParty.active ? 'Active, shown to users' : 'Inactive, not shown to users')|trans }}</span>
</h1>
<dl class="chill_view_data">
<dt>{{ 'Name'|trans }}</dt>
<dd>{{ thirdParty.name }}</dd>
<dt>{{ 'Type'|trans }}</dt>
{% set types = [] %}
{% for t in thirdParty.type %}
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
{% endfor %}
<dd>{{ types|join(', ') }}</dd>
<dt>{{ 'Centers'|trans }}</dt>
<dd>{{ 'The party is visible in those centers'|trans }}&nbsp;: {{ thirdParty.centers|join(', ') }}</dd>
<dt>{{ 'Phonenumber'|trans }}</dt>
<dd>{{ thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}</dd>
<dt>{{ 'email'|trans }}<dt>
<dd>{{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }}</dd>
<dt>{{ 'Address'|trans }}</dt>
<dd>
{% if thirdParty.address == null %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{% else %}
{{ address._render(thirdParty.address, {'with_valid_from': false }) }}
{% endif %}
</dd>
<dt>{{ 'Comment'|trans }}</dt>
<dd>{{ thirdParty.comment|chill_print_or_message("thirdparty.No_comment") }}</dd>
</dl>
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_3party_3party_index') }}">
{{ 'Cancel'|trans }}
</a>
</li>
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', thirdParty) %}
<li>
<a class="sc-button bt-update" href="{{ chill_path_forward_return_path('chill_3party_3party_update', { 'thirdparty_id': thirdParty.id }) }}">
{{ 'Update'|trans }}
</a>
</li>
{% endif %}
</ul>
</div>
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title 'Update third party %name%'|trans({ '%name%': thirdParty.name }) %}
{% block content %}
<div class="grid-10 centered">
<h1>
{{ 'Update third party %name%'|trans({ '%name%': thirdParty.name }) }}
<span class="chill__box {{ thirdParty.active ? 'green' : 'red' }}">{{ (thirdParty.active ? 'Active, shown to users' : 'Inactive, not shown to users')|trans }}</span>
</h1>
{{ form_start(form) }}
{{ form_row(form.name) }}
{{ form_row(form.type) }}
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
{{ form_row(form.address) }}
{{ form_row(form.active) }}
{{ form_row(form.centers) }}
{{ form_row(form.comment) }}
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_path_forward_return_path('chill_3party_3party_index') }}">
{{ 'Back to the list'|trans }}
</a>
<li>
{{ form_row(form.submit, {'label': 'Update', 'attr': {'class': 'sc-button bt-update' }}) }}
</li>
</ul>
{{ form_end(form) }}
</div>
{% endblock %}