a lot of enhancements related to tags: tags list is now sorted, shows number of articles, autocomplete added according to #477, #542

This commit is contained in:
Maryana Rozhankivska
2014-03-10 16:28:47 +02:00
parent 17b2afefad
commit fb26cc9375
27 changed files with 3225 additions and 25 deletions

8
themes/baggy/edit-tags.twig Normal file → Executable file
View File

@ -4,6 +4,11 @@
{% include '_menu.twig' %}
{% endblock %}
{% block content %}
<script src="{{ poche_url }}/themes/default/js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="{{ poche_url }}/themes/default/js/autoCompleteTags.js"></script>
<link rel="stylesheet" href="{{ poche_url }}/themes/default/css/jquery-ui-1.10.4.custom.min.css" media="all">
<div id="article">
<h2>{{ entry.title|raw }}</21>
</div>
@ -17,7 +22,8 @@
<input type="hidden" name="entry_id" value="{{ entry_id }}" />
<label for="value">Add tags: </label><input type="text" placeholder="interview, editorial, video" id="value" name="value" required="required" />
<input type="submit" value="Tag" />
<p>{% trans "You can enter multiple tags, separated by commas." %}</p>
<p>{% trans "Start typing for auto complete." %}<br>
{% trans "You can enter multiple tags, separated by commas." %}</p>
</form>
<a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a>
{% endblock %}

2
themes/baggy/tags.twig Normal file → Executable file
View File

@ -6,7 +6,7 @@
{% block content %}
<h2>{% trans "Tags" %}</h2>
<ul class="list-tags">
{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a>
{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> ({{ tag.entriescount }})
</li>
{% endfor %}
</ul>