[PLUGINS][Favourite][CSS] Favourite label now shows whether it's favourited or not already.
This commit is contained in:
parent
0cecc67376
commit
681144b380
@ -36,6 +36,7 @@ use App\Util\Nickname;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use function App\Core\I18n\_m;
|
||||
|
||||
class Favourite extends NoteHandlerPlugin
|
||||
{
|
||||
@ -65,7 +66,7 @@ class Favourite extends NoteHandlerPlugin
|
||||
$form_fav = Form::create([
|
||||
['submit_favourite', SubmitType::class,
|
||||
[
|
||||
'label' => ' ',
|
||||
'label' => $is_set ? _m('Note already favourite!.') : _m('Favourite this note.'),
|
||||
'attr' => [
|
||||
'class' => $is_set ? 'note-actions-set' : 'note-actions-unset',
|
||||
],
|
||||
|
@ -320,6 +320,9 @@ summary:hover .icon-details-open {
|
||||
}
|
||||
|
||||
.favourite-button-container button {
|
||||
text-indent: -9999em;
|
||||
text-transform: uppercase;
|
||||
|
||||
-webkit-mask-image: url("../icons/heart.svg") !important;
|
||||
-o-mask-image: url("../icons/heart.svg") !important;
|
||||
-moz-mask-image: url("../icons/heart.svg") !important;
|
||||
|
@ -22,7 +22,8 @@
|
||||
{% for current_action in get_note_actions(note) %}
|
||||
{{ form_start(current_action) }}
|
||||
{% if current_action.submit_favourite is defined %}
|
||||
<span title="Favourite this note." class="button-container favourite-button-container">
|
||||
<span title="Favourite this note." class="button-container favourite-button-container"
|
||||
{% if current_action.submit_favourite is defined %}{% endif %}>
|
||||
{{ form_widget(current_action.submit_favourite) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user