2013-01-06 12:07:37 +01:00
{% extends "base.html" %}
{% load tags %}
{% load i18n %}
2013-05-14 20:20:41 +02:00
{% load staticfiles %}
2013-01-06 12:07:37 +01:00
2013-06-14 20:24:48 +02:00
{% block title %}{% trans "Motions" %} – {{ block.super }}{% endblock %}
2013-01-06 12:07:37 +01:00
2013-05-14 20:20:41 +02:00
{% block header %}
< link href = "{% static 'styles/dataTables/dataTables.bootstrap.css' %}" type = "text/css" rel = "stylesheet" >
{% endblock %}
{% block javascript %}
< script src = "{% static 'javascript/jquery.dataTables.min.js' %}" type = "text/javascript" > < / script >
< script src = "{% static 'javascript/dataTables.bootstrap.js' %}" type = "text/javascript" > < / script >
{% endblock %}
2013-01-06 12:07:37 +01:00
{% block content %}
2013-03-09 14:29:40 +01:00
< h1 >
{% trans "Motions" %}
< small class = "pull-right" >
{% if perms.motion.can_create_motion %}
2013-04-03 00:40:56 +02:00
{% if not 'motion_stop_submitting'|get_config or perms.motion.can_manage_motion %}
< a href = "{% url 'motion_new' %}" class = "btn btn-mini btn-primary" rel = "tooltip" data-original-title = "{% trans 'New motion' %}" > < i class = "icon-plus icon-white" > < / i > {% trans 'New' %}< / a >
{% endif %}
2013-03-09 14:29:40 +01:00
{% endif %}
{% if perms.motion.can_manage_motion %}
2013-06-03 21:54:52 +02:00
< a href = "{% url 'motion_category_list' %}" class = "btn btn-mini" rel = "tooltip" data-original-title = "{% trans 'Manage categories' %}" > < i class = "icon-th-large" > < / i > {% trans 'Categories' %}< / a >
2013-05-12 00:47:49 +02:00
< a href = "{% url 'motion_csv_import' %}" class = "btn btn-mini" rel = "tooltip" data-original-title = "{% trans 'Import motions' %}" > < i class = "icon-import" > < / i > {% trans 'Import' %}< / a >
2013-03-09 14:29:40 +01:00
{% endif %}
2013-05-28 20:49:22 +02:00
< a href = "{% url 'motion_list_pdf' %}" class = "btn btn-mini" rel = "tooltip" data-original-title = "{% trans 'Print all motions as PDF' %}" target = "_blank" > < i class = "icon-print" > < / i > PDF< / a >
2013-03-09 14:29:40 +01:00
< / small >
< / h1 >
2013-05-14 20:20:41 +02:00
< table id = "dataTable" class = "table table-striped table-bordered" >
< thead >
2013-03-09 14:29:40 +01:00
< tr >
2013-05-14 20:20:41 +02:00
< th > {% trans "#" %}< / th >
< th > {% trans "Motion title" %}< / th >
2013-05-06 20:17:13 +02:00
< th class = "optional" > {% trans 'Category' %}< / th >
2013-05-14 20:20:41 +02:00
< th > {% trans "Status" %}< / th >
< th class = "optional" > {% trans "Submitter" %}< / th >
{% if 'motion_min_supporters'|get_config > 0 %}
< th class = "optional" > {% trans "Supporters" %}< / th >
2013-03-09 14:29:40 +01:00
{% endif %}
2013-05-14 20:20:41 +02:00
< th class = "optional" > {% trans "Last changes" %}< / th >
2013-03-09 14:29:40 +01:00
< th class = "mini_width" > {% trans "Actions" %}< / th >
< / tr >
2013-05-14 20:20:41 +02:00
< / thead >
2013-01-06 12:07:37 +01:00
{% for motion in motion_list %}
2013-03-09 14:29:40 +01:00
< tr class = "{% if motion.active %}activeline{% endif %}" >
2013-05-14 20:20:41 +02:00
< td class = "nobr" > {{ motion.identifier|default:'' }}< / td >
2013-05-24 00:31:52 +02:00
< td > < a href = "{% model_url motion %}" > {{ motion }}< / a > < / td >
2013-05-22 23:53:01 +02:00
< td class = "optional" > {% if motion.category %}{{ motion.category }}{% else %}– {% endif %}< / td >
2013-05-14 20:20:41 +02:00
< td > < span class = "label label-info" > {% trans motion.state.name %}< / span > < / td >
2013-03-09 14:29:40 +01:00
< td class = "optional" >
{% for submitter in motion.submitter.all %}
{{ submitter.person }}{% if not forloop.last %}, {% endif %}
{% endfor %}
< / td >
2013-05-14 20:20:41 +02:00
{% if 'motion_min_supporters'|get_config > 0 %}
{% with supporters=motion.supporters|length %}
< td class = "optional" >
{% if supporters >= 'motion_min_supporters'|get_config %}
< a class = "badge badge-success" rel = "tooltip" data-original-title = "{% trans 'Enough supporters' %}" > {{ supporters }}< / a >
{% endif %}
{% if supporters < 'motion_min_supporters'|get_config %}
< a class = "badge badge-warning" rel = "tooltip" data-original-title = "{% trans 'Needs supporters' %}" > {{ supporters }}< / a >
{% endif %}
< / td >
{% endwith %}
{% endif %}
< td class = "optional" > {{ motion.last_version.creation_time }}< / td >
2013-03-09 14:29:40 +01:00
< td >
< span style = "width: 1px; white-space: nowrap;" >
{% if perms.projector.can_manage_projector %}
< a href = "{% url 'projector_activate_slide' motion.sid %}" class = "activate_link btn {% if motion.active %}btn-primary{% endif %} btn-mini" title = "{% trans 'Show' %}" >
< i class = "icon-facetime-video {% if motion.active %}icon-white{% endif %}" > < / i >
< / a >
{% endif %}
{% if perms.motion.can_manage_motion %}
2013-06-03 21:54:52 +02:00
< a href = "{% model_url motion 'edit' %}" rel = "tooltip" data-original-title = "{% trans 'Edit' %}"
class="btn btn-mini">< i class = "icon-pencil" > < / i >
2013-03-09 14:29:40 +01:00
< / a >
2013-06-03 21:54:52 +02:00
< a href = "{% model_url motion 'delete' %}" rel = "tooltip" data-original-title = "{% trans 'Delete' %}"
class="btn btn-mini">< i class = "icon-remove" > < / i >
2013-03-09 14:29:40 +01:00
< / a >
{% endif %}
2013-06-03 21:54:52 +02:00
< a href = "{% url 'motion_detail_pdf' motion.id %}" data-original-title = "{% trans 'Print motion as PDF' %}"
class="btn btn-mini tooltip-left" target="_blank">< i class = "icon-print" > < / i > PDF
2013-03-09 14:29:40 +01:00
< / a >
< / span >
< / td >
< / tr >
2013-01-06 12:07:37 +01:00
{% endfor %}
2013-03-09 14:29:40 +01:00
< / table >
2013-01-06 12:07:37 +01:00
{% endblock %}