Skip to content
Snippets Groups Projects
Commit 3f249e0e authored by Pierre Fleutot's avatar Pierre Fleutot
Browse files

Ajout Espace de discussion sur page lexique

parent 4c7404c1
No related branches found
Tags 0.5
No related merge requests found
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
.chat-message-own .chat-message-body { .chat-message-own .chat-message-body {
background-color: #05728F; background-color: #05728F;
} }
.chat-message-footer {
color: dimgrey;
}
/* AJAX LOADING */ /* AJAX LOADING */
#overlay { #overlay {
...@@ -174,13 +177,13 @@ table.label-table > tbody > tr > td { ...@@ -174,13 +177,13 @@ table.label-table > tbody > tr > td {
.text-dark-grey { .text-dark-grey {
color: #9a9a9a; color: #9a9a9a;
} }
td:hover .fa.text-grey, p:hover .fa.text-grey, h4:hover .fa.text-grey, h1:hover .fa.text-grey { .links-container:hover .fa.text-grey, td:hover .fa.text-grey, p:hover .fa.text-grey, h4:hover .fa.text-grey, h1:hover .fa.text-grey {
color: dimgrey; color: dimgrey;
} }
.text-light-green { .text-light-green {
color: #d2e8d2; color: #d2e8d2;
} }
td:hover .fa.text-light-green, p:hover .fa.text-light-green, h4:hover .fa.text-light-green, h1:hover .fa.text-light-green { .links-container:hover .fa.text-light-green, td:hover .fa.text-light-green, p:hover .fa.text-light-green, h4:hover .fa.text-light-green, h1:hover .fa.text-light-green {
color: limegreen; color: limegreen;
} }
.fa-fixed-sized { .fa-fixed-sized {
......
...@@ -15,14 +15,16 @@ ...@@ -15,14 +15,16 @@
<div class="ms-1 ps-4 mb-2"> <div class="ms-1 ps-4 mb-2">
{% for key, pronunciation in entry_manager.pronunciations(entry) %} {% for key, pronunciation in entry_manager.pronunciations(entry) %}
{### PRONUNCIATION ######### SET KEY ##########} {### PRONUNCIATION ######### SET KEY ##########}
{% set pronunciationKey = '[Items][0][Sense][Pronunciations]['~key~']' %} <span class="links-container">
{% set pronunciationKey = '[Items][0][Sense][Pronunciations]['~key~']' %}
{% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %}
{{ pronunciation.api }} {% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %}
{{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }} {{ pronunciation.api }}
{{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }} {{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }}
<br> {{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }}
{{ _self.comments(entry, pronunciation, pronunciationKey) }} <br>
{{ _self.comments(entry, pronunciation, pronunciationKey) }}
</span>
{% endfor %} {% endfor %}
</div> </div>
......
...@@ -60,43 +60,41 @@ ...@@ -60,43 +60,41 @@
<div class="col col-md-3 col-sm-12"> <div class="col col-md-3 col-sm-12">
<div id="history" class="grey-panel"> <div id="chatMessages" class="grey-panel mb-3">
<h5>{{ "Discussion"|trans }}</h5> <h5 class="mb-3">{{ "Espace de discussion"|trans }}</h5>
<div id="chatMessages">
{% for chatMessage in entry.chatMessages %}
<div class=" chat-message {{ chatMessage.createdBy == app.user ? 'chat-message-own' }}">
<div class="d-flex justify-content-start"> {% for chatMessage in entry.chatMessages %}
<div class=" chat-message {{ chatMessage.createdBy == app.user ? 'chat-message-own' }}">
<div class=" flex-shrink-0 mt-1 me-2">{% if app.user != chatMessage.createdBy %}{{ app.user|badge }}{% endif %}</div> <div class="d-flex justify-content-start">
<div class="chat-message-content"> <div class=" flex-shrink-0 mt-1 me-2">{% if app.user != chatMessage.createdBy %}{{ app.user|badge }}{% endif %}</div>
<div class="chat-message-body">
{{ chatMessage.content|nl2br|raw }}
</div>
<div class="chat-message-footer"> <div class="chat-message-content">
{{ chatMessage.createdAt|date('d/m/Y à H:i') }} <div class="chat-message-body">
{% if chatMessage.createdBy == app.user %} {{ chatMessage.content|nl2br|raw }}
<a title="{{ "Modifier"|trans }}" href="#" data-url="{{ path('app_chat_message_edit', {id: chatMessage.id}) }}" class="modal-form"> </div>
<i class="fa fa-pencil"></i>
</a>
<div class="d-inline-block">{{ include('chat_message/_delete_form.html.twig') }}</div>
{% endif %}
</div>
<div class="chat-message-footer">
{{ chatMessage.createdAt|date('d/m/Y à H:i') }}
{% if chatMessage.createdBy == app.user %}
<a title="{{ "Modifier"|trans }}" href="#" data-url="{{ path('app_chat_message_edit', {id: chatMessage.id}) }}" class="modal-form">
<i class="fa fa-pencil"></i>
</a>
<div class="d-inline-block">{{ include('chat_message/_delete_form.html.twig') }}</div>
{% endif %}
</div> </div>
</div>
</div>
</div> </div>
{% endfor %}
</div> </div>
{% endfor %}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<a title="{{ "Ajouter un message"|trans }}" href="#" data-url="{{ path('app_chat_message_new', {entryId: entry.id}) }}" class="modal-form"> <a title="{{ "Écrire un message"|trans }}" href="#" data-url="{{ path('app_chat_message_new', {entryId: entry.id}) }}" class="modal-form">
<i class="fa fa-plus-circle text-success"></i> {{ "Ajouter un message"|trans }} <i class="fa fa-plus-circle text-success"></i> {{ "Écrire un message"|trans }}
</a> </a>
</div> </div>
</div> </div>
......
...@@ -124,12 +124,55 @@ ...@@ -124,12 +124,55 @@
</div> </div>
<div class="col col-md-3"> <div class="col col-md-3">
<div id="chatMessages" class="grey-panel mb-3">
<h5 class="mb-3">{{ "Espace de discussion"|trans }}</h5>
{% for chatMessage in lexicon.chatMessages %}
<div class=" chat-message {{ chatMessage.createdBy == app.user ? 'chat-message-own' }}">
<div class="d-flex justify-content-start">
<div class=" flex-shrink-0 mt-1 me-2">{% if app.user != chatMessage.createdBy %}{{ app.user|badge }}{% endif %}</div>
<div class="chat-message-content">
<div class="chat-message-body">
{{ chatMessage.content|nl2br|raw }}
</div>
<div class="chat-message-footer">
{{ chatMessage.createdAt|date('d/m/Y à H:i') }}
{% if chatMessage.createdBy == app.user %}
<a title="{{ "Modifier"|trans }}" href="#" data-url="{{ path('app_chat_message_edit', {id: chatMessage.id}) }}" class="modal-form">
<i class="fa fa-pencil"></i>
</a>
<div class="d-inline-block">{{ include('chat_message/_delete_form.html.twig') }}</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
<div class="row">
<div class="col-md-12">
<a title="{{ "Écrire un message"|trans }}" href="#" data-url="{{ path('app_chat_message_new', {lexiconId: lexicon.id}) }}" class="modal-form">
<i class="fa fa-plus-circle text-success"></i> {{ "Écrire un message"|trans }}
</a>
</div>
</div>
</div>
<div id="history" class="grey-panel"> <div id="history" class="grey-panel">
<h5 class="mb-3">{{ "Historique des modifications"|trans }}</h5> <h5 class="mb-3">{{ "Historique des modifications"|trans }}</h5>
{% for log in log_manager.lastLogsForLexicon(lexicon, app.user) %} {% for log in log_manager.lastLogsForLexicon(lexicon, app.user) %}
<p>{% include "log/_formattedLog.html.twig" %}</p> <p>{% include "log/_formattedLog.html.twig" %}</p>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment