diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-11-07 09:05:04 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-11-08 14:24:00 +0100 |
commit | df30af69d2f27914fec5b8d925472d4fdd378bf2 (patch) | |
tree | e9b5a3601ab2dd10dbb1dd1f95bbdca48e325215 | |
parent | 41c2178685a93999a48842ab79b08091c0345c59 (diff) | |
download | wallabag-df30af69d2f27914fec5b8d925472d4fdd378bf2.tar.gz wallabag-df30af69d2f27914fec5b8d925472d4fdd378bf2.tar.zst wallabag-df30af69d2f27914fec5b8d925472d4fdd378bf2.zip |
Added new tag form in mobile view for Material theme
Fix #2376
15 files changed, 51 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index 3db4105f..e830ade4 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\TextType; | 7 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
7 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
8 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
@@ -12,7 +13,15 @@ class NewTagType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 13 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 14 | { |
14 | $builder | 15 | $builder |
15 | ->add('label', TextType::class, ['required' => true]) | 16 | ->add('label', TextType::class, [ |
17 | 'required' => true, | ||
18 | 'attr' => [ | ||
19 | 'placeholder' => 'tag.new.placeholder', | ||
20 | ], | ||
21 | ]) | ||
22 | ->add('add', SubmitType::class, [ | ||
23 | 'label' => 'tag.new.add', | ||
24 | ]) | ||
16 | ; | 25 | ; |
17 | } | 26 | } |
18 | 27 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 14b528f9..b66aa3ea 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 336 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | # page_title: 'Import' | 343 | # page_title: 'Import' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 5eae8b86..9e19dcc4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' | 336 | number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' |
337 | see_untagged_entries: 'Zeige nicht getaggte Einträge' | 337 | see_untagged_entries: 'Zeige nicht getaggte Einträge' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Importieren' | 343 | page_title: 'Importieren' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 45d7fd8c..7516bbd5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 336 | number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
337 | see_untagged_entries: 'See untagged entries' | 337 | see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | add: 'Add' | ||
340 | placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Import' | 343 | page_title: 'Import' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 8b555cc2..208982d9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' | 336 | number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Importar' | 343 | page_title: 'Importar' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 3d7e8078..c443b21c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' | 336 | number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'درونریزی' | 343 | page_title: 'درونریزی' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 833f97bb..ea759dd3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: "{0} Il n’y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags." | 336 | number_on_the_page: "{0} Il n’y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags." |
337 | see_untagged_entries: "Voir les articles sans tag" | 337 | see_untagged_entries: "Voir les articles sans tag" |
338 | new: | ||
339 | add: 'Ajouter' | ||
340 | placeholder: 'Vous pouvez ajouter plusieurs tags, séparés par une virgule.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: "Importer" | 343 | page_title: "Importer" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 197d5e07..b3bc573b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." | 336 | number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Importa' | 343 | page_title: 'Importa' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 75268e00..97b5f4a9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." | 336 | number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." |
337 | see_untagged_entries: "Afichar las entradas sens pas cap d'etiquetas" | 337 | see_untagged_entries: "Afichar las entradas sens pas cap d'etiquetas" |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Importar' | 343 | page_title: 'Importar' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 40ded0be..36f93042 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' | 336 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' |
337 | see_untagged_entries: 'Zobacz nieotagowane wpisy' | 337 | see_untagged_entries: 'Zobacz nieotagowane wpisy' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Import' | 343 | page_title: 'Import' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index ed371cbc..d8fc9d5c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' | 336 | number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' |
337 | see_untagged_entries: 'Ver entradas sem tags' | 337 | see_untagged_entries: 'Ver entradas sem tags' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'Importar' | 343 | page_title: 'Importar' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index a3c0e266..d130e431 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' | 336 | # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | # page_title: 'Import' | 343 | # page_title: 'Import' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a6d2e137..f67d8bee 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -335,6 +335,9 @@ tag: | |||
335 | list: | 335 | list: |
336 | number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' | 336 | number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' |
337 | # see_untagged_entries: 'See untagged entries' | 337 | # see_untagged_entries: 'See untagged entries' |
338 | new: | ||
339 | # add: 'Add' | ||
340 | # placeholder: 'You can add several tags, separated by a comma.' | ||
338 | 341 | ||
339 | import: | 342 | import: |
340 | page_title: 'İçe Aktar' | 343 | page_title: 'İçe Aktar' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 5188eb01..37a29d03 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -53,7 +53,7 @@ | |||
53 | <div class="collapsible-body"></div> | 53 | <div class="collapsible-body"></div> |
54 | </li> | 54 | </li> |
55 | 55 | ||
56 | <li class="bold hide-on-med-and-down"> | 56 | <li class="bold"> |
57 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload"> | 57 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload"> |
58 | <i class="material-icons small">autorenew</i> | 58 | <i class="material-icons small">autorenew</i> |
59 | <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span> | 59 | <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span> |
@@ -81,7 +81,7 @@ | |||
81 | </a> | 81 | </a> |
82 | <div class="collapsible-body"></div> | 82 | <div class="collapsible-body"></div> |
83 | </li> | 83 | </li> |
84 | <li class="bold border-bottom hide-on-med-and-down"> | 84 | <li class="bold border-bottom"> |
85 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> | 85 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> |
86 | <i class="material-icons small">delete</i> | 86 | <i class="material-icons small">delete</i> |
87 | <span>{{ 'entry.view.left_menu.delete'|trans }}</span> | 87 | <span>{{ 'entry.view.left_menu.delete'|trans }}</span> |
@@ -89,7 +89,7 @@ | |||
89 | <div class="collapsible-body"></div> | 89 | <div class="collapsible-body"></div> |
90 | </li> | 90 | </li> |
91 | 91 | ||
92 | <li class="bold border-bottom hide-on-med-and-down"> | 92 | <li class="bold border-bottom"> |
93 | <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> | 93 | <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> |
94 | <i class="material-icons small">label_outline</i> | 94 | <i class="material-icons small">label_outline</i> |
95 | <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span> | 95 | <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span> |
@@ -186,14 +186,6 @@ | |||
186 | </div> | 186 | </div> |
187 | </li> | 187 | </li> |
188 | 188 | ||
189 | <li class="bold hide-on-large-only"> | ||
190 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> | ||
191 | <i class="material-icons small">delete</i> | ||
192 | <span>{{ 'entry.view.left_menu.delete'|trans }}</span> | ||
193 | </a> | ||
194 | <div class="collapsible-body"></div> | ||
195 | </li> | ||
196 | |||
197 | <li class="bold"> | 189 | <li class="bold"> |
198 | <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}"> | 190 | <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}"> |
199 | <i class="material-icons small">error</i> | 191 | <i class="material-icons small">error</i> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig index 6e552560..b702c4b6 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig | |||
@@ -9,5 +9,6 @@ | |||
9 | 9 | ||
10 | {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} | 10 | {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} |
11 | 11 | ||
12 | {{ form_rest(form) }} | 12 | {{ form_widget(form.add, {'attr': {'class': 'btn waves-effect waves-light hide-on-large-only'}}) }} |
13 | {{ form_widget(form._token) }} | ||
13 | </form> | 14 | </form> |