Template improvements for tags of agenda items, motions and

assignments.
This commit is contained in:
Emanuel Schuetze 2015-01-03 08:08:09 +01:00
parent d0d674601d
commit 3cfb9b739b
12 changed files with 58 additions and 18 deletions

View File

@ -83,5 +83,8 @@
{% endwith %} {% endwith %}
<a href="{{ node|absolute_url }}">{% if node.type == node.ORGANIZATIONAL_ITEM %}<i>[{% endif %}{{ node }}{% if node.type == node.ORGANIZATIONAL_ITEM %}]</i>{% endif %}</a> <a href="{{ node|absolute_url }}">{% if node.type == node.ORGANIZATIONAL_ITEM %}<i>[{% endif %}{{ node }}{% if node.type == node.ORGANIZATIONAL_ITEM %}]</i>{% endif %}</a>
{{ node.get_title_supplement|safe }} {{ node.get_title_supplement|safe }}
{% for tag in node.tags.all %}
<span class="label">{{ tag }}</span>
{% endfor %}
</div> </div>
</div> </div>

View File

@ -41,7 +41,7 @@
{% endif %} {% endif %}
{% if perms.core.can_manage_tags %} {% if perms.core.can_manage_tags %}
<a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}"> <a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}">
<i class="icon-th"></i> <i class="icon-tags"></i>
<span class="optional-small"> {% trans 'Tags' %}</span> <span class="optional-small"> {% trans 'Tags' %}</span>
</a> </a>
{% endif %} {% endif %}

View File

@ -41,6 +41,13 @@
</div> </div>
</small> </small>
</h1> </h1>
<!-- Tags -->
{% for tag in item.tags.all %}
<span class="label">{{ tag }}</span>
{% endfor %}
<!-- Title -->
<p> <p>
{% if not item.content_object %} {% if not item.content_object %}
{{ item.text|safe }} {{ item.text|safe }}
@ -49,6 +56,7 @@
{% endif %} {% endif %}
</p> </p>
<!-- Comment -->
{% if perms.agenda.can_manage_agenda %} {% if perms.agenda.can_manage_agenda %}
{% if item.comment %} {% if item.comment %}
<h3>{% trans "Comment" %}</h3> <h3>{% trans "Comment" %}</h3>
@ -56,7 +64,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{# List of Speakers #} <!-- List of Speakers -->
<h3>{% trans "List of speakers" %} {% if item.speaker_list_closed %}<span class="label label-important">{% trans 'closed' %}</span>{% endif %}</h3> <h3>{% trans "List of speakers" %} {% if item.speaker_list_closed %}<span class="label label-important">{% trans 'closed' %}</span>{% endif %}</h3>
<p> <p>
{% if perms.agenda.can_manage_agenda %} {% if perms.agenda.can_manage_agenda %}

View File

@ -1,2 +1,3 @@
{{ object.title }} {{ object.title }}
{{ object.text }} {{ object.text }}
{{ object.tags.all }}

View File

@ -50,6 +50,11 @@
</small> </small>
</h1> </h1>
<!-- Tags -->
{% for tag in assignment.tags.all %}
<span class="optional label">{{ tag }}</span>
{% endfor %}
<div class="row-fluid"> <div class="row-fluid">
<div class="span9"> <div class="span9">
<!-- Description --> <!-- Description -->

View File

@ -23,7 +23,7 @@
{% endif %} {% endif %}
{% if perms.core.can_manage_tags %} {% if perms.core.can_manage_tags %}
<a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}"> <a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}">
<i class="icon-th"></i> <i class="icon-tags"></i>
<span class="optional-small"> {% trans 'Tags' %}</span> <span class="optional-small"> {% trans 'Tags' %}</span>
</a> </a>
{% endif %} {% endif %}
@ -46,7 +46,11 @@
</thead> </thead>
{% for object in object_list %} {% for object in object_list %}
<tr class="{% if object.is_active_slide %}activeline{% endif %}"> <tr class="{% if object.is_active_slide %}activeline{% endif %}">
<td><a href="{{ object|absolute_url:'detail' }}">{{ object }}</a></td> <td><a href="{{ object|absolute_url:'detail' }}">{{ object }}</a>
{% for tag in object.tags.all %}
<span class="optional label">{{ tag }}</span>
{% endfor %}
</td>
<td class="optional"> <td class="optional">
<!-- posts --> <!-- posts -->
{% trans "Posts" context "Number of searched candidates for an election" %}: {% trans "Posts" context "Number of searched candidates for an election" %}:

View File

@ -1,3 +1,4 @@
{{ object.name }} {{ object.name }}
{{ object.description }} {{ object.description }}
{{ object.candidates }} {{ object.candidates }}
{{ object.tags.all }}

View File

@ -113,7 +113,7 @@
<hr /> <hr />
<footer> <footer>
<small> <small>
&copy; Copyright 20112014 | Powered by <a href="http://openslides.org" target="_blank">OpenSlides</a> | <a href="{% url 'core_version' %}">Version</a> &copy; Copyright 20112015 | Powered by <a href="http://openslides.org" target="_blank">OpenSlides</a> | <a href="{% url 'core_version' %}">Version</a>
</small> </small>
</footer> </footer>
</div><!--/#content--> </div><!--/#content-->

View File

@ -5,17 +5,23 @@
{% block title %}{% trans "Tags" %} {{ block.super }}{% endblock %} {% block title %}{% trans "Tags" %} {{ block.super }}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Tags" %}</h1> <h1>{% trans "Tags" %}
<small class="pull-right">
<a href="javascript:window.history.back()" class="btn btn-mini">
<i class="icon-chevron-left"></i><span class="optional-small"> {% trans "Back to overview" %}</span>
</a>
</small>
</h1>
<div class="control-group"> <div class="control-group">
<label for="tag-edit">Name:</label> <label for="tag-edit">{% trans 'Enter new tag name' %}:</label>
<input id="tag-edit" name="new"> <input id="tag-edit" name="new">
<a href="#" id="tag-save" class="btn btn-primary">{% trans 'Save' %}</a> <a href="#" id="tag-save" class="btn btn-primary">{% trans 'Save' %}</a>
</div> </div>
<table id="tag-table" class="table table-striped table-bordered"> <table id="tag-table" class="table table-striped table-bordered">
<tr> <tr>
<th>{% trans "Tag name" %}</th> <th>{% trans "Tag" %}</th>
<th class="mini_width">{% trans "Actions" %}</th> <th class="mini_width">{% trans "Actions" %}</th>
</tr> </tr>
<tr id="dummy-tag" class="tag-row" style="display:none"> <tr id="dummy-tag" class="tag-row" style="display:none">
@ -47,6 +53,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
<p>{% trans "You can use these tags for agenda items, motions and elections." %}</p>
{% endblock %} {% endblock %}
{% block javascript %} {% block javascript %}

View File

@ -71,8 +71,6 @@
</small> </small>
</h1> </h1>
{{ motion.tags.all|join:', ' }}
<div class="row-fluid"> <div class="row-fluid">
<div class="span8"> <div class="span8">
{# TODO: show only for workflow with versioning #} {# TODO: show only for workflow with versioning #}
@ -256,7 +254,9 @@
{% block meta_box_poll_extras %}{% endblock %} {% block meta_box_poll_extras %}{% endblock %}
</p> </p>
{% empty %} {% empty %}
{% if not allowed_actions.create_poll %}
{% endif %}
{% endfor %} {% endfor %}
{% if allowed_actions.create_poll %} {% if allowed_actions.create_poll %}
<p> <p>
@ -268,13 +268,19 @@
{% endwith %} {% endwith %}
<!-- Category --> <!-- Category -->
<h5>{% trans "Category" %}:</h5>
{% if motion.category %} {% if motion.category %}
<h5>{% trans "Category" %}:</h5>
{{ motion.category }} {{ motion.category }}
{% else %}
{% endif %} {% endif %}
<!-- Tags -->
{% for tag in motion.tags.all %}
{% if forloop.first %}
<h5>{% trans "Tags" %}:</h5>
{% endif %}
<span class="optional label">{{ tag }}</span>
{% endfor %}
<!-- Creation Time --> <!-- Creation Time -->
<h5> <h5>
{% if motion.versions.count > 1 %} {% if motion.versions.count > 1 %}

View File

@ -38,7 +38,7 @@
{% endif %} {% endif %}
{% if perms.core.can_manage_tags %} {% if perms.core.can_manage_tags %}
<a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}"> <a href="{% url 'core_tag_list' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Manage tags' %}">
<i class="icon-th"></i> <i class="icon-tags"></i>
<span class="optional-small"> {% trans 'Tags' %}</span> <span class="optional-small"> {% trans 'Tags' %}</span>
</a> </a>
{% endif %} {% endif %}
@ -72,15 +72,19 @@
</thead> </thead>
{% for motion in motion_list %} {% for motion in motion_list %}
<tr class="{% if motion.is_active_slide %}activeline{% endif %}"> <tr class="{% if motion.is_active_slide %}activeline{% endif %}">
<td class="nobr">{{ motion.identifier|default:'' }}</td> <td class="nobr">{{ motion.identifier|default:'' }}
<td>
<a href="{{ motion|absolute_url }}">{{ motion.title }}</a>
{% if motion.is_amendment %} {% if motion.is_amendment %}
<a class="label label-success" data-original-title="Amendment" rel="tooltip"> <a class="badge badge-success" data-original-title="Amendment" rel="tooltip">
{{ 'motion_amendments_prefix'|get_config }} {{ 'motion_amendments_prefix'|get_config }}
</a> </a>
{% endif %} {% endif %}
</td> </td>
<td>
<a href="{{ motion|absolute_url }}">{{ motion.title }}</a>
{% for tag in motion.tags.all %}
<span class="optional label">{{ tag }}</span>
{% endfor %}
</td>
<td class="optional">{% if motion.category %}{{ motion.category }}{% else %}{% endif %}</td> <td class="optional">{% if motion.category %}{{ motion.category }}{% else %}{% endif %}</td>
<td class="optional-small"><span class="label label-info">{% trans motion.state.name %}</span></td> <td class="optional-small"><span class="label label-info">{% trans motion.state.name %}</span></td>
<td class="optional"> <td class="optional">

View File

@ -5,3 +5,4 @@
{{ object.submitters }} {{ object.submitters }}
{{ object.supporters }} {{ object.supporters }}
{{ object.category }} {{ object.category }}
{{ object.tags.all }}