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

Fix régression création label public. Amélioration CSS audio player et bloc commentaires

parent 94bdd425
No related branches found
No related tags found
No related merge requests found
...@@ -335,8 +335,11 @@ table.label-table > tbody > tr > td { ...@@ -335,8 +335,11 @@ table.label-table > tbody > tr > td {
.text-grey { .text-grey {
color:lightgrey; color:lightgrey;
} }
.text-dark-grey { .text-grey {
color: #9a9a9a; color:lightgrey;
}
.text-dimgrey {
color: dimgrey;
} }
.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 { .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;
...@@ -559,4 +562,33 @@ li.nav-item { ...@@ -559,4 +562,33 @@ li.nav-item {
} }
.example-source a { .example-source a {
color: #0A53BE; color: #0A53BE;
} }
\ No newline at end of file
/* Specifies the size of the audio container */
audio {
width: 95px;
height: 25px;
margin-bottom: -7px;
}
audio::-webkit-media-controls-panel {
-webkit-justify-content: center;
height: 25px;
}
/* Removes the timeline */
audio::-webkit-media-controls-timeline {
display: none !important;
}
/* Removes the time stamp */
audio::-webkit-media-controls-current-time-display {
display: none;
}
audio::-webkit-media-controls-time-remaining-display {
display: none;
}
/* Removes mute-button */
audio::-webkit-media-controls-mute-button {
display: none;
}
...@@ -66,6 +66,7 @@ class LabelController extends AppBaseController ...@@ -66,6 +66,7 @@ class LabelController extends AppBaseController
*/ */
public function new(ManagerRegistry $doctrine, Request $request, $masterType, $category, LabelRepository $labelRepository, LabelManager $labelManager): Response public function new(ManagerRegistry $doctrine, Request $request, $masterType, $category, LabelRepository $labelRepository, LabelManager $labelManager): Response
{ {
$owner = null;
if ($masterType === Label::MASTER_PERSONAL) { if ($masterType === Label::MASTER_PERSONAL) {
$owner = $this->getUser(); $owner = $this->getUser();
} }
......
...@@ -84,17 +84,24 @@ ...@@ -84,17 +84,24 @@
<div class="arrow-link comment-block" id="comment{{ parent.id }}" data-parent-id="{{ parent.id }}"> <div class="arrow-link comment-block" id="comment{{ parent.id }}" data-parent-id="{{ parent.id }}">
<a class="text-black" data-bs-toggle="collapse" href="#{{ discriminator }}-{{ key }}" role="button" aria-expanded="false" aria-controls="collapseExample"> <a class="text-black" data-bs-toggle="collapse" href="#{{ discriminator }}-{{ key }}" role="button" aria-expanded="false" aria-controls="collapseExample">
<i class="fa fa-comment fa-2x"></i> <i class="fa fa-comment fa-2x pe-2"></i>
<div class=" d-none d-sm-inline-block">
<span class="fst-italic text-dark-grey">
{{ comment.user }} - {{ comment.date }}
</span>
{{ _self.actions(entry, commentKey, ['edit', 'delete'], '', 'Comments') }}
</div>
</a> </a>
<div class="collapse" id="{{ discriminator }}-{{ key }}"> <div class="collapse" id="{{ discriminator }}-{{ key }}">
{{ comment.text|nl2br }} <div class="d-sm-none">
<div class=" pt-2"> <span class="fst-italic text-dark-grey">
<span class="fst-italic text-dark-grey"> {{ comment.user }} - {{ comment.date }}
{{ "Par"|trans }} {{ comment.user }} {{ "le"|trans }} {{ comment.date }} </span>
</span>
{{ _self.actions(entry, commentKey, ['edit', 'delete'], '', 'Comments') }} {{ _self.actions(entry, commentKey, ['edit', 'delete'], '', 'Comments') }}
</div> </div>
{{ comment.text|nl2br }}
</div> </div>
</div> </div>
...@@ -104,12 +111,12 @@ ...@@ -104,12 +111,12 @@
{% macro actions(entry, key, operations, title, category) %} {% macro actions(entry, key, operations, title, category) %}
{% if 'edit' in operations %} {% if 'edit' in operations %}
<a href="#" data-url="{{ path('app_entry_edit_block', {id: entry.id, blockId: key, blockCategory: category}) }}" class="modal-form"><i class="fa fa-pencil-square fa-fixed-sized text-grey" title=""></i></a> <a href="#" data-url="{{ path('app_entry_edit_block', {id: entry.id, blockId: key, blockCategory: category}) }}" class="modal-form"><i class="fa fa-pencil-square fa-fixed-sized text-dimgrey" title=""></i></a>
{% endif %} {% endif %}
{% if 'delete' in operations %} {% if 'delete' in operations %}
<a href="#" data-href="{{ path('app_entry_delete_block', {id: entry.id, blockId: key, blockCategory: category}) }}" <a href="#" data-href="{{ path('app_entry_delete_block', {id: entry.id, blockId: key, blockCategory: category}) }}"
data-confirm="{{ "Confirmer la suppression ?"|trans }}" data-bs-toggle="modal" data-bs-target="#confirm-dialog"><i class="fa fa-trash fa-fixed-sized text-grey" title=""></i></a> data-confirm="{{ "Confirmer la suppression ?"|trans }}" data-bs-toggle="modal" data-bs-target="#confirm-dialog"><i class="fa fa-trash fa-fixed-sized text-dimgrey" title=""></i></a>
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
\ No newline at end of file
...@@ -39,23 +39,25 @@ ...@@ -39,23 +39,25 @@
{### PRONUNCIATION ######### SET KEY ##########} {### PRONUNCIATION ######### SET KEY ##########}
{% set pronunciationKey = '[Items][0][Sense][Pronunciations]['~key~']' %} {% set pronunciationKey = '[Items][0][Sense][Pronunciations]['~key~']' %}
<li id="{{ pronunciation.id }}"> <li id="{{ pronunciation.id }}">
<div class="links-container">
<div class="links-container">
{% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %} {% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %}
{{ pronunciation.api }} {{ pronunciation.api }}
{% for sound in pronunciation.sounds|default([]) %} {% for sound in pronunciation.sounds|default([]) %}
<div> <div class="d-inline-block">
<audio controls style="scale: 75%"> {{ sound.accent }}
<source src="{{ sound.url }}" type="audio/ogg"> <audio controls>
{# <source src="horse.mp3" type="audio/mpeg">#} <source src="{{ sound.url }}" type="audio/ogg">
Your browser does not support the audio element. {# <source src="horse.mp3" type="audio/mpeg">#}
</audio> Your browser does not support the audio element.
</div> </audio>
</div>
{% endfor %} {% endfor %}
{{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }} {{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }}
{{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }} {{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }}
<br> <br>
</div> </div>
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
......
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