Trim long tag by next whole word instead of ellipsis.
This commit is contained in:
parent
9302bd627d
commit
c71a45191e
1 changed files with 5 additions and 3 deletions
|
@ -149,11 +149,13 @@
|
|||
{% set tags = photo.sorted_tags() %}
|
||||
{% for tag in tags %}
|
||||
<li>
|
||||
{% set display_name=tag.qualified_name() %}
|
||||
{% set qualified_name=tag.qualified_name() %}
|
||||
{% set display_name=qualified_name %}
|
||||
{% if display_name|length > 30 %}
|
||||
{% set display_name = '...' + display_name[-27:] %}
|
||||
{% set display_name = display_name[-30:] %}
|
||||
{% set display_name = display_name.split(".", 1)[1] %}
|
||||
{% endif %}
|
||||
<a class="tag_object" href="/search?tag_musts={{tag.name}}">{{display_name}}</a><!--
|
||||
<a class="tag_object" href="/search?tag_musts={{tag.name}}" title="{{qualified_name}}">{{display_name}}</a><!--
|
||||
--><button
|
||||
class="remove_tag_button"
|
||||
onclick="remove_photo_tag('{{photo.id}}', '{{tag.name}}', receive_callback);">
|
||||
|
|
Loading…
Reference in a new issue