From 3886449b2c6b387dc623b4543a8353950563be85 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Fri, 20 Apr 2012 22:43:12 +0200 Subject: [PATCH] #106: Action column for applications. #121 (partly): Activate links for agenda and applications table. --- openslides/agenda/static/javascript/agenda.js | 19 ---------------- openslides/agenda/static/styles/agenda.css | 13 ----------- .../agenda/templates/agenda/item_row.html | 5 +---- .../agenda/templates/agenda/overview.html | 3 +++ .../application/base_application.html | 2 +- .../templates/application/overview.html | 16 ++++++++++++-- .../templates/projector/Application.html | 8 ++++++- openslides/static/javascript/utils.js | 20 +++++++++++++++++ openslides/static/styles/base.css | 22 +++++++++++++++---- 9 files changed, 64 insertions(+), 44 deletions(-) diff --git a/openslides/agenda/static/javascript/agenda.js b/openslides/agenda/static/javascript/agenda.js index f834c5e69..39d239a82 100644 --- a/openslides/agenda/static/javascript/agenda.js +++ b/openslides/agenda/static/javascript/agenda.js @@ -46,25 +46,6 @@ $(function() { } }); }); - // activate an element to show it on projector - $('.activate_link').click(function(event) { - event.preventDefault(); - link = $(this); - $.ajax({ - type: 'GET', - url: $(this).attr('href'), - dataType: 'json', - data: '', - success: function(data) { - $('.activate_link').removeClass('active'); - //$('li').removeClass('activeline'); - link.addClass('active'); - }, - error: function () { - alert("Ajax Error"); - } - }); - }); // filter to show/hide closed items $('#hide_closed_items').click(function(event) { // show all items diff --git a/openslides/agenda/static/styles/agenda.css b/openslides/agenda/static/styles/agenda.css index 3983d3826..760e57598 100644 --- a/openslides/agenda/static/styles/agenda.css +++ b/openslides/agenda/static/styles/agenda.css @@ -10,16 +10,3 @@ a.close_link span { a.close_link.closed span { background-image: url(../images/icons/task-complete.png); } - -/* agenda item inactive/active */ -a.activate_link span { - background-image: url(../images/icons/task-accepted-grey.png); - background-repeat: no-repeat; - background-position: center; - width: 16px; - height: 16px; - display: inline-block; -} -a.activate_link.active span { - background-image: url(../images/icons/task-accepted.png); -} diff --git a/openslides/agenda/templates/agenda/item_row.html b/openslides/agenda/templates/agenda/item_row.html index 166a33eb5..d9f58e873 100644 --- a/openslides/agenda/templates/agenda/item_row.html +++ b/openslides/agenda/templates/agenda/item_row.html @@ -1,8 +1,6 @@ {% load i18n %} {% load staticfiles %} - {% if perms.agenda.can_manage_agenda %} @@ -24,7 +22,7 @@ {% if perms.agenda.can_manage_agenda %} - + @@ -39,4 +37,3 @@ {% endwith %} {% endif %} - diff --git a/openslides/agenda/templates/agenda/overview.html b/openslides/agenda/templates/agenda/overview.html index 71bd62ad7..5161a11f5 100644 --- a/openslides/agenda/templates/agenda/overview.html +++ b/openslides/agenda/templates/agenda/overview.html @@ -78,7 +78,10 @@ {% for item in items %} + {% include "agenda/item_row.html" %} + {% endfor %} {% else %} diff --git a/openslides/application/templates/application/base_application.html b/openslides/application/templates/application/base_application.html index ad14ad6a0..5a134da4b 100644 --- a/openslides/application/templates/application/base_application.html +++ b/openslides/application/templates/application/base_application.html @@ -43,7 +43,7 @@ {% endif %} {# PDF #}
  • {%trans 'Application as PDF' %}
  • - {# application polls #} + {# activate and polls #} {% if perms.projector.can_manage_projector %}
  • {%trans 'Show Application' %}
  • {% if "genpoll" in actions %} diff --git a/openslides/application/templates/application/overview.html b/openslides/application/templates/application/overview.html index b9104e972..32981b48b 100644 --- a/openslides/application/templates/application/overview.html +++ b/openslides/application/templates/application/overview.html @@ -2,6 +2,7 @@ {% load tags %} {% load i18n %} +{% load staticfiles %} {% block title %}{{ block.super }} - {%trans "Applications" %}{% endblock %} @@ -39,9 +40,11 @@ {%trans "Status" %} {%trans "Submitter" %} {%trans "Creation Time" %} + {% trans "Actions" %} {% for application in applications %} - + {% if application.number %}{{ application.number }}{% else %}-{% endif %} {{ application }} {% if min_supporters > 0 %} @@ -57,10 +60,19 @@ {{ application.submitter.profile }} {{ application.creation_time }} + + + + + + + + + {% empty %} - {%trans "No applications available." %} + {%trans "No applications available." %} {% endfor %} diff --git a/openslides/application/templates/projector/Application.html b/openslides/application/templates/projector/Application.html index 9e832ea6e..5fbc094db 100644 --- a/openslides/application/templates/projector/Application.html +++ b/openslides/application/templates/projector/Application.html @@ -50,7 +50,13 @@ -

    {% trans "Application No." %} {{ application.number }}

    +

    + {% if application.number != None %} + {% trans "Application No." %} {{ application.number }} + {% else %} + {% trans "Application" %} [{% trans "no number" %}] + {% endif %} +

    {{ application.title }}

    {{ application.title }}

    diff --git a/openslides/static/javascript/utils.js b/openslides/static/javascript/utils.js index aeeff3d4c..554e07b25 100644 --- a/openslides/static/javascript/utils.js +++ b/openslides/static/javascript/utils.js @@ -10,6 +10,26 @@ $(function () { }, 1000); } }); + // activate an element to show it on projector + $('.activate_link').click(function(event) { + event.preventDefault(); + var link = $(this); + $.ajax({ + type: 'GET', + url: $(this).attr('href'), + dataType: 'json', + data: '', + success: function(data) { + $('.activate_link').removeClass('active'); + $('tr').removeClass('activeline'); + link.parent().parent().parent().addClass('activeline'); + link.addClass('active'); + }, + error: function () { + alert("Ajax Error"); + } + }); + }); }); diff --git a/openslides/static/styles/base.css b/openslides/static/styles/base.css index c60525fbd..b29815eb6 100644 --- a/openslides/static/styles/base.css +++ b/openslides/static/styles/base.css @@ -230,9 +230,6 @@ table a.table_edit { .agendatable td.dragcell { padding: 0px 0 0px 10px; } -.agendatable tr.activeline td, .activeline { - background-color: #bed4de; -} .agendatable td img.center { margin-left: 10px; } @@ -588,4 +585,21 @@ ul.results { } .poll { background:url("../images/icons/view-statistics.png") no-repeat 0px 0px; -} \ No newline at end of file +} + + +/* inactive/active */ +a.activate_link span { + background-image: url(../images/icons/task-accepted-grey.png); + background-repeat: no-repeat; + background-position: center; + width: 16px; + height: 16px; + display: inline-block; +} +a.activate_link.active span { + background-image: url(../images/icons/task-accepted.png); +} +tr.activeline td, .activeline { + background-color: #bed4de !important; +}