diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-08-24 11:59:53 +0200 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-08-24 11:59:53 +0200 |
commit | a754db33c9f1df9f4b6e8b2f580d51b6f3925c02 (patch) | |
tree | dd0bdc75b7585ab1b6880e559c00e1fa1ba22fad /src | |
parent | 7083d183b9df11f350be0d7039f5f0e33536b94b (diff) | |
download | wallabag-a754db33c9f1df9f4b6e8b2f580d51b6f3925c02.tar.gz wallabag-a754db33c9f1df9f4b6e8b2f580d51b6f3925c02.tar.zst wallabag-a754db33c9f1df9f4b6e8b2f580d51b6f3925c02.zip |
fix #1378: nice display for tags list
Diffstat (limited to 'src')
4 files changed, 48 insertions, 5 deletions
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 31b2c664..47ca661a 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 | |||
@@ -74,6 +74,14 @@ | |||
74 | <div class="collapsible-body"></div> | 74 | <div class="collapsible-body"></div> |
75 | </li> | 75 | </li> |
76 | 76 | ||
77 | <li class="bold border-bottom hide-on-med-and-down"> | ||
78 | <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> | ||
79 | <i class="mdi-action-label-outline small"></i> | ||
80 | <span>{% trans %}Add a tag{% endtrans %}</span> | ||
81 | </a> | ||
82 | <div class="collapsible-body"></div> | ||
83 | </li> | ||
84 | |||
77 | <li class="bold"> | 85 | <li class="bold"> |
78 | <a class="waves-effect collapsible-header"> | 86 | <a class="waves-effect collapsible-header"> |
79 | <i class="mdi-social-share small"></i> | 87 | <i class="mdi-social-share small"></i> |
@@ -134,11 +142,17 @@ main { | |||
134 | <div id="article"> | 142 | <div id="article"> |
135 | <header class="mbm"> | 143 | <header class="mbm"> |
136 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1> | 144 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1> |
137 | <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.domainName }}</span></a> | ||
138 | </header> | 145 | </header> |
139 | <aside class="tags"> | 146 | <aside> |
140 | {% for tag in entry.tags %}<span class="mdi-action-label-outline">{{ tag.label }}</span>{% endfor %} | 147 | <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> |
141 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | 148 | <div id="list"> |
149 | {% for tag in entry.tags %}<span><a href="#">{{ tag.label }}</a></span>{% endfor %} | ||
150 | </div> | ||
151 | |||
152 | <div class="input-field nav-panel-add-tag" style="display: none"> | ||
153 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | ||
154 | </div> | ||
155 | |||
142 | </aside> | 156 | </aside> |
143 | <article> | 157 | <article> |
144 | {{ entry.content | raw }} | 158 | {{ entry.content | raw }} |
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 0b5a530d..0534a4cc 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,7 +9,6 @@ | |||
9 | {% endif %} | 9 | {% endif %} |
10 | 10 | ||
11 | {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} | 11 | {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} |
12 | {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'}, 'label': 'add tag' }) }} | ||
13 | 12 | ||
14 | <div class="hidden">{{ form_rest(form) }}</div> | 13 | <div class="hidden">{{ form_rest(form) }}</div> |
15 | </form> | 14 | </form> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css index a976da10..286fa641 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css | |||
@@ -303,6 +303,30 @@ main ul.row { | |||
303 | margin: 0; | 303 | margin: 0; |
304 | z-index: 9999; | 304 | z-index: 9999; |
305 | } | 305 | } |
306 | |||
307 | #article aside .link { | ||
308 | color: #000; | ||
309 | font-size: 0.6em; | ||
310 | text-decoration: none; | ||
311 | } | ||
312 | |||
313 | #article aside #list { | ||
314 | float: right; | ||
315 | margin-right: 15px; | ||
316 | } | ||
317 | |||
318 | #article aside span a { | ||
319 | background-color: #039be5; | ||
320 | color: #fff; | ||
321 | border-radius: 3px; | ||
322 | float: left; | ||
323 | font-size: 0.6em; | ||
324 | margin-left: 0.5em; | ||
325 | margin-bottom: 0.5em; | ||
326 | padding: 4px; | ||
327 | text-decoration: none; | ||
328 | } | ||
329 | |||
306 | /* ========================================================================== | 330 | /* ========================================================================== |
307 | 6 = Media queries | 331 | 6 = Media queries |
308 | ========================================================================== */ | 332 | ========================================================================== */ |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js index d397f8e5..edfdee82 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js | |||
@@ -27,6 +27,12 @@ $(document).ready(function(){ | |||
27 | }); | 27 | }); |
28 | init_filters(); | 28 | init_filters(); |
29 | 29 | ||
30 | $('#nav-btn-add-tag').on('click', function(){ | ||
31 | $(".nav-panel-add-tag").toggle(100); | ||
32 | $(".nav-panel-menu").addClass('hidden'); | ||
33 | $("#tag_label").focus(); | ||
34 | return false; | ||
35 | }); | ||
30 | $('#nav-btn-add').on('click', function(){ | 36 | $('#nav-btn-add').on('click', function(){ |
31 | $(".nav-panel-buttom").hide(100); | 37 | $(".nav-panel-buttom").hide(100); |
32 | $(".nav-panel-add").show(100); | 38 | $(".nav-panel-add").show(100); |