]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix #1378: nice display for tags list 1395/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 09:59:53 +0000 (11:59 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 09:59:53 +0000 (11:59 +0200)
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css
src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js

index 31b2c664c17be5439b1f38f7f6014d4d0e6c9573..47ca661aa83d56506bbf3da31b728f0577a01744 100644 (file)
             <div class="collapsible-body"></div>
         </li>
 
+        <li class="bold border-bottom hide-on-med-and-down">
+            <a class="waves-effect collapsible-header" id="nav-btn-add-tag">
+                <i class="mdi-action-label-outline small"></i>
+                <span>{% trans %}Add a tag{% endtrans %}</span>
+            </a>
+            <div class="collapsible-body"></div>
+        </li>
+
         <li class="bold">
             <a class="waves-effect collapsible-header">
                 <i class="mdi-social-share small"></i>
@@ -134,11 +142,17 @@ main {
     <div id="article">
         <header class="mbm">
             <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1>
-            <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.domainName }}</span></a>
         </header>
-        <aside class="tags">
-            {% for tag in entry.tags %}<span class="mdi-action-label-outline">{{ tag.label }}</span>{% endfor %}
-            {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
+        <aside>
+            <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName }}</span></a>
+            <div id="list">
+                {% for tag in entry.tags %}<span><a href="#">{{ tag.label }}</a></span>{% endfor %}
+            </div>
+
+            <div class="input-field nav-panel-add-tag" style="display: none">
+                {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
+            </div>
+
         </aside>
         <article>
             {{ entry.content | raw }}
index 0b5a530de5d04dd96f0a74bea307afbccd262fb5..0534a4cc4c9b834028fbce373775e7aceebbfab8 100644 (file)
@@ -9,7 +9,6 @@
         {% endif %}
 
         {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }}
-        {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'}, 'label': 'add tag' }) }}
 
     <div class="hidden">{{ form_rest(form) }}</div>
 </form>
index a976da100f65b1140548593941d1326ff8afd39a..286fa6414600cf117755569134d7be09b6eb24e0 100755 (executable)
@@ -303,6 +303,30 @@ main ul.row {
     margin: 0;
     z-index: 9999;
 }
+
+#article aside .link {
+    color: #000;
+    font-size: 0.6em;
+    text-decoration: none;
+}
+
+#article aside #list {
+    float: right;
+    margin-right: 15px;
+}
+
+#article aside span a {
+    background-color: #039be5;
+    color: #fff;
+    border-radius: 3px;
+    float: left;
+    font-size: 0.6em;
+    margin-left: 0.5em;
+    margin-bottom: 0.5em;
+    padding: 4px;
+    text-decoration: none;
+}
+
 /* ==========================================================================
    6 = Media queries
    ========================================================================== */
index d397f8e5cb27e31b5e5a2c25f62575303903bb1c..edfdee82a933c8cbc72b8bf769aa2dacc7da86f9 100755 (executable)
@@ -27,6 +27,12 @@ $(document).ready(function(){
     });
     init_filters();
 
+    $('#nav-btn-add-tag').on('click', function(){
+       $(".nav-panel-add-tag").toggle(100);
+       $(".nav-panel-menu").addClass('hidden');
+       $("#tag_label").focus();
+       return false;
+    });
     $('#nav-btn-add').on('click', function(){
        $(".nav-panel-buttom").hide(100);
        $(".nav-panel-add").show(100);