put some lines in agenda template in seperate File

This commit is contained in:
Oskar Hahn 2012-03-18 15:11:01 +01:00
parent f5414b18d2
commit ad38a8eead
4 changed files with 109 additions and 94 deletions

View File

@ -0,0 +1,58 @@
{% load i18n %}
<tr id="item_row_{{ item.id }}" class="draggable{% cycle ' odd' '' %}
{% if item.active %} activeline{% else %}
{% if perms.agenda.can_manage_agenda %} inactiveline{% endif %}
{% endif %}">
{% if perms.agenda.can_manage_agenda %}
<td class="select">
<a id="activate_link_{{ item.id }}" class="activate_link" href="{% url item_activate item.id %}">
<div></div>
</a>
</td>
{% else %}
<td>
{% if item.closed %}
<img src="/static/images/icons/task-complete.png" title="{% trans 'Item closed' %}">
{% endif %}
</td>
{% endif %}
<td>
{% for p in item.get_ancestors %}
<div class="indentation">&nbsp;</div>
{% endfor %}
{% if perms.agenda.can_manage_agenda %}
<div class="dragcell"></div>
{% endif %}
{{ item }}
</td>
<td>
<span style="width: 1px;white-space: nowrap;">
<a href="{{ item.get_absolute_url }}"><img src="/static/images/icons/document-preview.png" title="{% trans 'Show projector preview' %}"></a>
{% if perms.agenda.can_manage_agenda %}
<a href="{% url item_edit item.id %}"><img src="/static/images/icons/document-edit.png" title="{% trans 'Edit item' %}"></a>
<a href="{% url item_delete item.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Delete item' %}"></a>
<a class="close_link {% if item.closed %}closed{% else %}open{% endif %}" href="{% if item.closed %}{% url item_open item.id %}{% else %}{% url item_close item.id %}{% endif %}">
<span></span>
</a>
{% if item.children.exists %}
<a href="{% url item_activate_summary item.id %}"><img src="/static/images/icons/view-list-tree.png" title="{% trans 'Select item overview' %}"></a>
{% endif %}
{% endif %}
</span>
</td>
{% if perms.agenda.can_manage_agenda %}
<td class="tabledrag-hide">
{% with form=item.weight_form %}
{{ form.weight }}
{{ form.self }}
{{ form.parent }}
{% endwith %}
</td>
{% endif %}
</tr>

View File

@ -36,6 +36,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Agenda" %}</h1> <h1>{% trans "Agenda" %}</h1>
{% if items %} {% if items %}
@ -62,7 +63,7 @@
<th class="tabledrag-hide">{% trans "Weight" %}</th> <th class="tabledrag-hide">{% trans "Weight" %}</th>
{% endif %} {% endif %}
</tr> </tr>
<tr id="item_row_0" class="topline {% if overview %} activeline {% else %}{% if perms.agenda.can_manage_agenda %} inactiveline {% endif %}{% endif %}"> <tr id="item_row_0" class="topline{% if overview %} activeline{% else %}{% if perms.agenda.can_manage_agenda %} inactiveline {% endif %}{% endif %}">
{% if perms.agenda.can_manage_agenda %} {% if perms.agenda.can_manage_agenda %}
<td class="select"> <td class="select">
<a href="{% url item_activate 0 %}" class="activate_link"> <a href="{% url item_activate 0 %}" class="activate_link">
@ -78,67 +79,15 @@
<td> <td>
<span id="action_field" style="width: 1px;white-space: nowrap;"> <span id="action_field" style="width: 1px;white-space: nowrap;">
<span></span> <span></span>
<a href="{% url print_agenda %}" title="{%trans 'Print agenda' %}"><img src="/static/images/icons/application-pdf.png"></a>
</span> </span>
</td> <a href="{% url print_agenda %}" title="{%trans 'Print agenda' %}" class="pdficon">
</tr>
{% for item in items %}
<tr id="item_row_{{ item.id }}" class="draggable{% cycle ' odd' '' %}
{% if item.active %} activeline{% else %}
{% if perms.agenda.can_manage_agenda %} inactiveline{% endif %}
{% endif %}">
{% if perms.agenda.can_manage_agenda %}
<td class="select">
<a id="activate_link_{{ item.id }}" class="activate_link" href="{% url item_activate item.id %}">
<div></div>
</a>
</td>
{% else %}
<td>
{% if item.closed %}
<img src="/static/images/icons/task-complete.png" title="{% trans 'Item closed' %}">
{% endif %}
</td>
{% endif %}
<td>
{% for p in item.get_ancestors %}
<div class="indentation">&nbsp;</div>
{% endfor %}
{% if perms.agenda.can_manage_agenda %}
<div class="dragcell"></div>
{% endif %}
{{ item }}
</td>
<td>
<span style="width: 1px;white-space: nowrap;">
<a href="{{ item.get_absolute_url }}"><img src="/static/images/icons/document-preview.png" title="{% trans 'Show projector preview' %}"></a>
{% if perms.agenda.can_manage_agenda %}
<a href="{% url item_edit item.id %}"><img src="/static/images/icons/document-edit.png" title="{% trans 'Edit item' %}"></a>
<a href="{% url item_delete item.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Delete item' %}"></a>
<a class="close_link {% if item.closed %}closed{% else %}open{% endif %}" href="{% if item.closed %}{% url item_open item.id %}{% else %}{% url item_close item.id %}{% endif %}">
<span></span> <span></span>
</a> </a>
{% if item.children.exists %}
<a href="{% url item_activate_summary item.id %}"><img src="/static/images/icons/view-list-tree.png" title="{% trans 'Select item overview' %}"></a>
{% endif %}
{% endif %}
</span>
</td> </td>
{% if perms.agenda.can_manage_agenda %}
<td class="tabledrag-hide">
{% with form=item.weight_form %}
{{ form.weight }}
{{ form.self }}
{{ form.parent }}
{% endwith %}
</td>
{% endif %}
</tr> </tr>
{% for item in items %}
{% include "agenda/item_row.html" %}
{% endfor %} {% endfor %}
</table> </table>
</form> </form>

View File

@ -553,3 +553,11 @@ ul.results {
border-color: #A2B4EE; border-color: #A2B4EE;
color: #585B66; color: #585B66;
} }
.pdficon span {
background-image: url("/static/images/icons/application-pdf.png");
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: inline-block;