mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
#198 issue fixes: mostly template fixes and translations
This commit is contained in:
parent
f6376118a0
commit
39e8af48b4
@ -17,15 +17,19 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final class AsideActivityFormType extends AbstractType
|
||||
{
|
||||
protected array $timeChoices;
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
private TokenStorageInterface $storage;
|
||||
|
||||
public function __construct (TranslatableStringHelper $translatableStringHelper, array $timeChoices){
|
||||
public function __construct (TranslatableStringHelper $translatableStringHelper, array $timeChoices, TokenStorageInterface $storage){
|
||||
$this->timeChoices = $timeChoices;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->storage = $storage;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
@ -48,7 +52,8 @@ final class AsideActivityFormType extends AbstractType
|
||||
'label' => 'Agent',
|
||||
'required' => true,
|
||||
'class' => User::class,
|
||||
//translate
|
||||
'data' => $this->storage->getToken()->getUser(),
|
||||
'attr' => array('class' => 'select2 '),
|
||||
'placeholder' => 'Choose the agent for whom this activity is created',
|
||||
'choice_label' => 'username'
|
||||
])
|
||||
|
@ -1,12 +1,14 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'Aside activity list' |trans }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl asideactivity-list">
|
||||
<h2>{{ 'My aside activities' |trans }}</h2>
|
||||
|
||||
{% if entities|length == 0 %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ "There isn't any activities."|trans }}
|
||||
{{ "There aren't any aside activities."|trans }}
|
||||
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create button-small"></a>
|
||||
</p>
|
||||
{% else %}
|
||||
@ -30,13 +32,13 @@
|
||||
{% if entity.date %}
|
||||
<p>{{ entity.date|format_date('long') }}</p>
|
||||
{% endif %}
|
||||
{#
|
||||
|
||||
<div class="duration">
|
||||
<p>
|
||||
<i class="fa fa-fw fa-hourglass-end"></i>
|
||||
{{ entity.duration|date('H:i') }}
|
||||
</p>
|
||||
</div> #}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-col">
|
||||
@ -66,9 +68,9 @@
|
||||
<div class="item-col">
|
||||
<ul class="list-content">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{# <li>
|
||||
<a href="{{ path('chill_crud_aside_activity_view', { 'id': entity.id} ) }}" class="btn btn-show "></a>
|
||||
</li>
|
||||
</li> #}
|
||||
{# TOOD
|
||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
|
||||
#}
|
||||
@ -91,18 +93,15 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create">
|
||||
{{ 'Add a new aside activity' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{# TODO set this condition in configuration #}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create">
|
||||
{{ 'Add a new activity' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_activity_type_new') }}" class="btn btn-create">
|
||||
{{ 'Create a new activity type'|trans }}
|
||||
<a href="{{ path('chill_crud_aside_activity_category_new') }}" class="btn btn-create">
|
||||
{{ 'Create a new aside activity type'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -5,5 +5,6 @@ services:
|
||||
arguments:
|
||||
- "@chill.main.helper.translatable_string"
|
||||
- "%chill_activity.form.time_duration%"
|
||||
- "@security.token_storage"
|
||||
tags:
|
||||
- { name: form.type, alias: chill_asideactivitybundle_asideactivity }
|
@ -8,7 +8,7 @@ user_username: nom de l'utilisateur
|
||||
Remark: Commentaire
|
||||
No comments: Aucun commentaire
|
||||
Add a new aside activity: Ajouter une nouvelle activité annexe
|
||||
Aside activity list: Liste des activités annexes
|
||||
Aside activity list: Activités annexes
|
||||
present: présent
|
||||
not present: absent
|
||||
Delete: Supprimer
|
||||
@ -32,7 +32,7 @@ location: Lieu
|
||||
crud:
|
||||
aside_activity:
|
||||
title_view: Détail de l'activité annexe
|
||||
title_new: Nouveau activité annexe
|
||||
title_new: Nouvelle activité annexe
|
||||
title_edit: Edition d'une activité annexe
|
||||
title_delete: Supprimation d'une activité annexe
|
||||
button_delete: Supprimer
|
||||
@ -43,14 +43,20 @@ crud:
|
||||
|
||||
#forms
|
||||
Activity creation: Nouvelle activité annexe
|
||||
Create a new aside activity type: Nouvelle categorie d'activité annexe
|
||||
Create: Créer
|
||||
Back to the list: Retour à la liste
|
||||
Save activity: Sauver l'activité
|
||||
Reset form: Remise à zéro du formulaire
|
||||
Choose the agent for whom this activity is created: Choissisez l'agent pour qui l'activitée est creeé.
|
||||
Choose the agent for whom this activity is created: Choissisez l'utilisateur pour qui l'activité est creéé.
|
||||
Choose the activity category: Choissisez le type d'activité
|
||||
Choose the duration: Choisir la durée
|
||||
Choose a category: Choisir un categorie
|
||||
Is active: Actif
|
||||
Agent: Utilisateur
|
||||
date: Date
|
||||
Duration: Durée
|
||||
Note: Note
|
||||
5 minutes: 5 minutes
|
||||
10 minutes: 10 minutes
|
||||
15 minutes: 15 minutes
|
||||
|
Loading…
x
Reference in New Issue
Block a user