From df30af69d2f27914fec5b8d925472d4fdd378bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 7 Nov 2016 09:05:04 +0100 Subject: Added new tag form in mobile view for Material theme Fix #2376 --- src/Wallabag/CoreBundle/Form/Type/NewTagType.php | 11 ++++++++++- .../CoreBundle/Resources/translations/messages.da.yml | 3 +++ .../CoreBundle/Resources/translations/messages.de.yml | 3 +++ .../CoreBundle/Resources/translations/messages.en.yml | 3 +++ .../CoreBundle/Resources/translations/messages.es.yml | 3 +++ .../CoreBundle/Resources/translations/messages.fa.yml | 3 +++ .../CoreBundle/Resources/translations/messages.fr.yml | 3 +++ .../CoreBundle/Resources/translations/messages.it.yml | 3 +++ .../CoreBundle/Resources/translations/messages.oc.yml | 3 +++ .../CoreBundle/Resources/translations/messages.pl.yml | 3 +++ .../CoreBundle/Resources/translations/messages.pt.yml | 3 +++ .../CoreBundle/Resources/translations/messages.ro.yml | 3 +++ .../CoreBundle/Resources/translations/messages.tr.yml | 3 +++ .../Resources/views/themes/material/Entry/entry.html.twig | 14 +++----------- .../Resources/views/themes/material/Tag/new_form.html.twig | 3 ++- 15 files changed, 51 insertions(+), 13 deletions(-) (limited to 'src') 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 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -12,7 +13,15 @@ class NewTagType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('label', TextType::class, ['required' => true]) + ->add('label', TextType::class, [ + 'required' => true, + 'attr' => [ + 'placeholder' => 'tag.new.placeholder', + ], + ]) + ->add('add', SubmitType::class, [ + 'label' => 'tag.new.add', + ]) ; } 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: list: # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: # 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: list: number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' see_untagged_entries: 'Zeige nicht getaggte Einträge' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' see_untagged_entries: 'See untagged entries' + new: + add: 'Add' + placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: 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." see_untagged_entries: "Voir les articles sans tag" + new: + add: 'Ajouter' + placeholder: 'Vous pouvez ajouter plusieurs tags, séparés par une virgule.' import: 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: list: number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." see_untagged_entries: "Afichar las entradas sens pas cap d'etiquetas" + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' see_untagged_entries: 'Zobacz nieotagowane wpisy' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' see_untagged_entries: 'Ver entradas sem tags' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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: list: # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: # 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: list: number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: 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 @@
-
  • +
  • autorenew {{ 'entry.view.left_menu.re_fetch_content'|trans }} @@ -81,7 +81,7 @@
  • -
  • +
  • delete {{ 'entry.view.left_menu.delete'|trans }} @@ -89,7 +89,7 @@
  • -
  • +
  • label_outline {{ 'entry.view.left_menu.add_a_tag'|trans }} @@ -186,14 +186,6 @@
  • -
  • - - delete - {{ 'entry.view.left_menu.delete'|trans }} - -
    -
  • -
  • error 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 @@ {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} - {{ form_rest(form) }} + {{ form_widget(form.add, {'attr': {'class': 'btn waves-effect waves-light hide-on-large-only'}}) }} + {{ form_widget(form._token) }} -- cgit v1.2.3