Split static files in application specific directories and use django 1.4 staticfiles app.

This commit is contained in:
René Köcher 2012-04-14 14:51:56 +02:00
parent fbdcc5e0b4
commit f674897505
66 changed files with 151 additions and 121 deletions

View File

@ -1,4 +1,5 @@
{% extends '!layout.html' %}
{% load staticfiles %}
{% block extrahead %}
{{ super() }}
@ -37,14 +38,14 @@ name="keywords">
<div id="sidebar">
<div id="logo">
<a href="{{ pathto('index') }}" title="Home" style="border: none;"><img src="_static/images/logo.png"></a>
<a href="{{ pathto('index') }}" title="Home" style="border: none;"><img src="{% static 'images/logo.png' %}"></a>
</div>
<div id="language">
{%- for lng in languages.split(' ') %}
{%- if lng != language %}
<a href="{{ pathto('../'+lng+'/'+pagename) }}">
{%- endif %}
<img src="{{ pathto('_static/images/'+lng+'.png', 1) }}" alt="{{ lng }}" title="{{ lng }}" {%- if lng == language %} width="18px" height="13px" {%- endif %} />
<img src="{% static {{ 'images/'+lng+'.png' }} %}" alt="{{ lng }}" title="{{ lng }}" {%- if lng == language %} width="18px" height="13px" {%- endif %} />
{%- if lng != language %}
</a>

View File

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 783 B

View File

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

View File

@ -1,5 +1,5 @@
a.close_link.closed span {
background-image: url(/static/images/icons/user-offline.png);
background-image: url(../images/icons/user-offline.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -7,7 +7,7 @@ a.close_link.closed span {
display: inline-block;
}
a.close_link.open span {
background-image: url(/static/images/icons/user-online.png);
background-image: url(../images/icons/user-online.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -16,7 +16,7 @@ a.close_link.open span {
}
a.hidelink.hide span {
background-image: url(/static/images/icons/layer-visible-off.png);
background-image: url(../images/icons/layer-visible-off.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -24,7 +24,7 @@ a.hidelink.hide span {
display: inline-block;
}
a.hidelink.show span {
background-image: url(/static/images/icons/layer-visible-on.png);
background-image: url(../images/icons/layer-visible-on.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;

View File

@ -1,10 +1,11 @@
{% load i18n %}
{% load staticfiles %}
<tr class="draggable{% cycle ' odd' '' %}
{% if item.active %}activeline{% endif %}">
<td>
{% if item.closed %}
<img src="/static/images/icons/task-complete.png" title="{% trans 'Item closed' %}">
<img src="{% static 'images/icons/task-complete.png' %}" title="{% trans 'Item closed' %}">
{% endif %}
</td>
<td>
@ -18,10 +19,10 @@
</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>
<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 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>

View File

@ -3,18 +3,19 @@
{% load tags %}
{% load i18n %}
{% load mptt_tags %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {% trans "Agenda" %}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/tabledrag.css" />
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/agenda.css" />
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/tabledrag.css' %}" />
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />
{% if perms.agenda.can_manage_agenda %}
<script type="text/javascript" src="/static/javascript/jquery.once.js"></script>
<script type="text/javascript" src="/static/javascript/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/javascript/jquery.tmpl.js"></script>
<script type="text/javascript" src="/static/javascript/tabledrag.js"></script>
<script type="text/javascript" src="/static/javascript/agenda.js"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.once.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.cookie.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.tmpl.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/tabledrag.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/agenda.js' %}"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--

View File

@ -2,6 +2,7 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block submenu %}
{% url application_overview as url_applicationoverview %}
@ -14,6 +15,6 @@
{% if perms.application.can_manage_application %}
<li class="{% active request '/application/import' %}"><a href="{% url application_import %}">{%trans 'Import applications' %}</a></li>
{% endif %}
<li><a href="{% url print_applications %}"><img src="/static/images/icons/application-pdf.png"> {%trans 'Print all applications' %}</a></li>
<li><a href="{% url print_applications %}"><img src="{% static 'images/icons/application-pdf.png' %}"> {%trans 'Print all applications' %}</a></li>
</ul>
{% endblock %}

View File

@ -1,6 +1,7 @@
{% extends 'application/base_application.html' %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {{ poll }}{% endblock %}
@ -10,7 +11,7 @@
<br>
<h3>{%trans "Application No." %} {{ poll.application.number }}</h3>
<ul>
<li><a href="{% url print_application_poll poll.id %}"><img src="/static/images/icons/application-pdf.png"> {%trans 'Print vote' %}</a></li>
<li><a href="{% url print_application_poll poll.id %}"><img src="{% static 'images/icons/application-pdf.png' %}"> {%trans 'Print vote' %}</a></li>
</ul>
{% endblock %}
{% endif %}

View File

@ -2,6 +2,7 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {% trans "Application" %} "{{ version.title }}"{% endblock %}
@ -13,14 +14,14 @@
<h4 style="float:left;">{% trans "Submitter" %}:</h4>
<h4 style="text-align: right;">
{% if "delete" in actions %}
<a href="{% url application_delete application.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Delete Application' %}"></a>
<a href="{% url application_delete application.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Application' %}"></a>
{% endif %}
<a href="{% url print_application application.id %}"><img src="/static/images/icons/application-pdf.png" title="{% trans 'Print Application' %}"></a>
<a href="{% url print_application application.id %}"><img src="{% static 'images/icons/application-pdf.png' %}" title="{% trans 'Print Application' %}"></a>
</h4>
<span clear="all"></span>
{{ application.submitter.profile }}
{% if user == application.submitter %}
<img src="/static/images/icons/user-information.png" title="{% trans 'You!' %}">
<img src="{% static 'images/icons/user-information.png' %}" title="{% trans 'You!' %}">
{% endif %}
{% if min_supporters > 0 %}
@ -70,18 +71,18 @@
<b>{{ forloop.counter }}. {% trans "Vote" %}:</b>
{% if perms.application.can_manage_application %}
{% if poll.has_vote %}</a>{% endif %}
<a href="{% url application_poll_delete poll.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Delete Vote' %}"></a>
<a href="{% url application_poll_delete poll.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Vote' %}"></a>
{% endif %}
<a href="{% url application_poll_activate poll.id %}">{% trans 'project' %}</a>
<br>
{% if poll.has_votes %}
{% with poll.get_options.0 as option %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {{ option.yes }}<br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {{ option.no }}<br>
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {{ option.contained }}<br>
<img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.yes }}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.no }}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.contained }}<br>
<img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<div style="border-top: 1px solid; padding-top: 5px; margin: 5px 0; width: 10em;">
<img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
<img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
</div>
{% endwith %}
{% if perms.application.can_manage_application %}
@ -256,17 +257,17 @@
<td style="white-space:nowrap;">
{% if application.status != "pub" %}
{% if revision == application.permitted %}
<img title="{%trans 'Version accepted' %}" src="/static/images/icons/task-accepted.png">
<img title="{%trans 'Version accepted' %}" src="{% static 'images/icons/task-accepted.png' %}">
{% else %}
{% if perms.application.can_manage_application %}
<a href="{% url application_version_permit revision.id %}"><img title="{%trans 'Accept Version' %}" src="/static/images/icons/task-accepted-grey.png"></a>
<a href="{% url application_version_permit revision.id %}"><img title="{%trans 'Accept Version' %}" src="{% static 'images/icons/task-accepted-grey.png' %}"></a>
{% endif %}
{% if not revision.rejected and revision.id > application.permitted.id and perms.application.can_manage_application %}
<a href="{% url application_version_reject revision.id %}"><img title="{%trans 'Reject Version' %}" src="/static/images/icons/task-reject-grey.png"></a>
<a href="{% url application_version_reject revision.id %}"><img title="{%trans 'Reject Version' %}" src="{% static 'images/icons/task-reject-grey.png' %}"></a>
{% endif %}
{% endif %}
{% if revision.rejected %}
<img title="{%trans 'Version rejected' %}" src="/static/images/icons/task-reject.png">
<img title="{%trans 'Version rejected' %}" src="{% static 'images/icons/task-reject.png' %}">
{% endif %}
{% endif %}
</td>

View File

@ -2,6 +2,7 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
@ -30,12 +31,12 @@
{{forloop.counter}}. {% trans "Vote" %}:<br>
{% endif %}
{% for option in p.options %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {{ option.yes }} <br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {{ option.no }} <br>
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {{ option.undesided }}<br>
<img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ p.votesinvalidf }}<br>
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.yes }} <br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.no }} <br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.undesided }}<br>
<img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ p.votesinvalidf }}<br>
<div style="border-top: 1px solid; padding-top: 5px; margin: 5px 0; width: 10em;">
<img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> {{ p.votescastf }}
<img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ p.votescastf }}
</div>
{% endfor %}
<br>

View File

@ -3,7 +3,7 @@ td.elected {
}
td.elected a.election_link {
background-image: url(/static/images/icons/voting-yes.png);
background-image: url(../images/icons/voting-yes.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -14,7 +14,7 @@ td.elected a.election_link {
}
td a.election_link {
background-image: url(/static/images/icons/voting-yes-grey.png);
background-image: url(../images/icons/voting-yes-grey.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;

View File

@ -2,10 +2,11 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />
<script type="text/javascript" src="/static/javascript/assignment.js"></script>
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/assignment.css' %}" />
<script type="text/javascript" src="{% static 'javascript/assignment.js' %}"></script>
{% endblock %}
{% block submenu %}
@ -16,6 +17,6 @@
{% if perms.assignment.can_manage_assignment %}
<li class="{% active request '/assignment/new' %}"><a href="{% url assignment_new %}">{%trans "New election" %}</a></li>
{% endif %}
<li><a href="{% url print_assignment %}"><img src="/static/images/icons/application-pdf.png"> {%trans 'Print all elections' %}</a></li>
<li><a href="{% url print_assignment %}"><img src="{% static 'images/icons/application-pdf.png' %}"> {%trans 'Print all elections' %}</a></li>
</ul>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "assignment/base_assignment.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {%trans "Elections" %}{% endblock %}
@ -35,8 +35,8 @@
<td>{{ assignment.profile.count }} / {{ assignment.posts }}</td>
<td>{{ assignment.get_status_display }}</td>
{% if perms.assignment.can_manage_assignment %}
<td><a href="{% url assignment_edit assignment.id %}"><img src="/static/images/icons/document-edit.png" title="{%trans 'Edit assignment' %}"></a>
<a href="{% url assignment_delete assignment.id %}"><img src="/static/images/icons/edit-delete.png" title="{%trans 'Delete assignment' %}"></a>
<td><a href="{% url assignment_edit assignment.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{%trans 'Edit assignment' %}"></a>
<a href="{% url assignment_delete assignment.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{%trans 'Delete assignment' %}"></a>
</td>
{% endif %}
</tr>

View File

@ -1,7 +1,7 @@
{% extends "assignment/base_assignment.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {% trans "Assignment" %} "{{ assignment }}"{% endblock %}
@ -11,7 +11,7 @@
<div class="box">
<h4 style="float:left;">{% trans "Status" %}:</h4>
<h4 style="text-align: right;">
<a href="{% url print_assignment assignment.id %}"><img src="/static/images/icons/application-pdf.png" title="{% trans 'Print Election' %}"></a>
<a href="{% url print_assignment assignment.id %}"><img src="{% static 'images/icons/application-pdf.png' %}" title="{% trans 'Print Election' %}"></a>
</h4>
<span clear="all"></span>
{% trans assignment.get_status_display %}
@ -64,7 +64,7 @@
<li>{{ profile }}
{% if perms.assignment.can_manage_assignment %}
{% if assignment.status == "sea" or assignment.status == "vot" %}
<a href="{% url assignment_delother assignment.id profile.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Remove candidate' %}"></a>
<a href="{% url assignment_delother assignment.id profile.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Remove candidate' %}"></a>
{% endif %}
{% endif %}
</li>
@ -101,7 +101,7 @@
<label>{{ field.label }}:</label>
<nobr>{{ field }}
{% if perms.participant.can_see_participant and perms.participant.can_manage_participant %}
<a href="{% url user_new %}" target="_blank"><img src="/static/images/icons/list-add-user.png" title="{% trans 'Add new participant' %}"></a>
<a href="{% url user_new %}" target="_blank"><img src="{% static 'images/icons/list-add-user.png' %}" title="{% trans 'Add new participant' %}"></a>
{% endif %}
</nobr>
{% endfor %}
@ -138,14 +138,14 @@
</a>
{% if poll.published %}
<a href={% url assignment_poll_notpublish poll.id %}><img
src="/static/images/icons/user-online.png"
src="%{ static 'images/icons/user-online.png' %}"
title="{% trans 'Unpublish results' %}"></a>
{% else %}
<a href={% url assignment_poll_publish poll.id %}><img
src="/static/images/icons/user-offline.png"
src="{% static 'images/icons/user-offline.png' %}"
title="{% trans 'Publish results' %}"></a>
{% endif %}
<a href="{% url assignment_poll_delete poll.id %}"><img src="/static/images/icons/edit-delete.png" title="{% trans 'Delete Poll' %}"></a>
<a href="{% url assignment_poll_delete poll.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Poll' %}"></a>
{% endif %}
</th>
{# endif #}
@ -169,7 +169,7 @@
{% if perms.assignment.can_manage_assignment %}
<a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a>
{% else %}
<a class="elected"><img src="/static/images/icons/voting-yes.png" title="{% trans 'Candidate is elected' %}"></a>
<a class="elected"><img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}"></a>
{% endif %}
{% else %}
{% if perms.assignment.can_manage_assignment %}
@ -183,11 +183,11 @@
<td style="white-space:nowrap;">
{% if v %}
{% if v|length == 3 %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
{% else %}
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
{% if v != "-" %}<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% else %}
@ -204,7 +204,7 @@
<td>{%trans 'Invalid votes' %}</td>
{% for poll in polls %}
{% if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}</td>
<td style="white-space:nowrap;"><img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}</td>
{% endif %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
@ -215,7 +215,7 @@
<td><b>{%trans 'Votes cast' %}</b></td>
{% for poll in polls %}
{% if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> <b>{{ poll.print_votescast }}</b></td>
<td style="white-space:nowrap;"><img src="{% static images/icons/voting-total.png %}" title="{% trans 'Votes cast' %}"> <b>{{ poll.print_votescast }}</b></td>
{% endif %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}

View File

@ -2,11 +2,12 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />
<script type="text/javascript" src="/static/javascript/assignment.js"></script>
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/assignment.css' %}" />
<script type="text/javascript" src="{% static 'javascript/assignment.js' %}"></script>
{% endblock %}
{% block content %}
<h1>{% trans "Election" %}: {{ assignment }}</h1>
@ -61,18 +62,18 @@
{% with vote|first as candidate %}
<td class="candidate {% if candidate.1 %}elected{% endif %}">
{% if candidate.1 %}
<a class="elected"><img src="/static/images/icons/voting-yes.png" title="{% trans 'Candidate is elected' %}"></a>
<a class="elected"><img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}"></a>
{% endif %}
{{ candidate.0 }}
</td>
{% for v in vote|last %}
<td style="white-space:nowrap;" {% if candidate.1 %}class="elected"{% endif %}>{% if v %}
{% if v|length == 3 %}
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
{% else %}
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
{% if v != "-" %}<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% endif %}
@ -89,7 +90,7 @@
<td>{%trans 'Invalid votes' %}</td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-invalid.png" title="{% trans 'Invalid' %}"> {{ p.votesinvalidf }}</td>
<td style="white-space:nowrap;"><img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ p.votesinvalidf }}</td>
{% endif %}
{% endfor %}
</tr>
@ -97,7 +98,7 @@
<td><b>{%trans 'Votes cast' %}</b></td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="/static/images/icons/voting-total.png" title="{% trans 'Votes cast' %}"> <b>{{ p.votescastf }}</b></td>
<td style="white-space:nowrap;"><img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}"> <b>{{ p.votescastf }}</b></td>
{% endif %}
{% endfor %}
</tr>

View File

@ -61,8 +61,20 @@ MEDIA_ROOT = ''
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# Absolute path to the directory that holds static media from ``collectstatic``
# Example: "/home/media/static.lawrence.com/"
STATIC_ROOT = os.path.join(SITE_ROOT, '../site-static')
STATIC_DOC_ROOT = os.path.join(SITE_ROOT, 'static')
# URL that handles the media served from STATIC_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://static.lawrence.com", "http://example.com/static/"
STATIC_URL = '/static/'
# Additional directories containing static files (not application specific)
# Examples: "/home/media/lawrence.com/extra-static/"
STATICFILES_DIRS = (
os.path.join(SITE_ROOT, 'static'),
)
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
@ -95,6 +107,7 @@ INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mptt',
'utils',
'poll',
@ -111,6 +124,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'django.core.context_processors.i18n',
'django.core.context_processors.static',
'utils.utils.revision',
'openslides.utils.auth.anonymous_context_additions',
)

View File

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

View File

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 752 B

View File

@ -1,5 +1,5 @@
a.status_link.active span {
background-image: url(/static/images/icons/user-online.png);
background-image: url(../images/icons/user-online.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -7,7 +7,7 @@ a.status_link.active span {
display: inline-block;
}
a.status_link.inactive span {
background-image: url(/static/images/icons/user-offline.png);
background-image: url(../images/icons/user-offline.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -16,7 +16,7 @@ a.status_link.inactive span {
}
a.superuser_link.superuser span {
background-image: url(/static/images/icons/meeting-chair.png);
background-image: url(../images/icons/meeting-chair.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -24,7 +24,7 @@ a.superuser_link.superuser span {
display: inline-block;
}
a.superuser_link.normaluser span {
background-image: url(/static/images/icons/im-user.png);
background-image: url(../images/icons/im-user.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;

View File

@ -2,6 +2,7 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block submenu %}
{% url user_overview as url_users %}
@ -20,10 +21,10 @@
<li class="{% if request.path == url_userimport %}selected{% endif %}"><a href="{% url user_import %}"> {%trans 'Import participants' %}</a></li>
{% endif %}
{% if perms.participant.can_see_participant %}
<li><a href="{% url user_print %}"><img src="/static/images/icons/application-pdf.png"> {%trans 'Print participant list' %}</a></li>
<li><a href="{% url user_print %}"><img src="{% static 'images/icons/application-pdf.png' %}"> {%trans 'Print participant list' %}</a></li>
{% endif %}
{% if perms.participant.can_manage_participant %}
<li><a href="{% url print_passwords %}"><img src="/static/images/icons/application-pdf.png"> {% trans 'Print first time passwords' %}</a></li>
<li><a href="{% url print_passwords %}"><img src="{% static 'images/icons/application-pdf.png' %}"> {% trans 'Print first time passwords' %}</a></li>
{% endif %}
</ul>
{% endblock %}

View File

@ -1,6 +1,7 @@
{% extends "participant/base_participant.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {%trans "Groups" %}{% endblock %}
@ -14,9 +15,9 @@
{% for group in groups %}
<tr class="{% cycle '' 'odd' %}">
<td>{{ group.name }}</td>
<td><a href="{% url user_group_edit group.id %}"><img src="/static/images/icons/document-edit.png" title="{%trans 'Edit group' %}"></a>
<td><a href="{% url user_group_edit group.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{%trans 'Edit group' %}"></a>
{% if group.name != 'Anonymous' %}
<a href="{% url user_group_delete group.id %}"><img src="/static/images/icons/edit-delete.png" title="{%trans 'Delete group' %}"></a>
<a href="{% url user_group_delete group.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{%trans 'Delete group' %}"></a>
{% endif %}
</td>
</tr>

View File

@ -1,6 +1,7 @@
{% extends "participant/base_participant.html" %}
{% load i18n %}
{% load staticfiles %}
{% block mainmenu %}
<ul>
@ -17,7 +18,7 @@
{% if form.errors %}
<div class="notification error">
<a class="close" href="#">
<img alt="close" title="{% trans 'Close this notification' %}" src="/static/images/icons/cross.png">
<img alt="close" title="{% trans 'Close this notification' %}" src="{% static 'images/icons/cross.png' %}">
</a>
<em>{%trans "Your username and password didn't match. Please try again." %}</em>
</div>

View File

@ -1,13 +1,14 @@
{% extends "participant/base_participant.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} - {%trans "Participants" %}{% endblock %}
{% block header %}
{% if perms.agenda.can_manage_agenda %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/participant.css" />
<script type="text/javascript" src="/static/javascript/participant.js"></script>
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/participant.css' %}" />
<script type="text/javascript" src="{% static 'javascript/participant.js' %}"></script>
{% endif %}
{% endblock %}
@ -83,8 +84,8 @@
{{ user.last_login }}
{% endif %}</td>
<td><span style="width: 1px; white-space: nowrap;">
<a href="{% url user_edit user.id %}"><img src="/static/images/icons/document-edit.png" title="{%trans 'Edit participant' %}"></a>
<a href="{% url user_delete user.id %}"><img src="/static/images/icons/edit-delete.png" title="{%trans 'Delete participant' %}"></a>
<a href="{% url user_edit user.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{%trans 'Edit participant' %}"></a>
<a href="{% url user_delete user.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{%trans 'Delete participant' %}"></a>
<a class="status_link {% if user.is_active %}active{% else %}inactive{% endif %}"
href="{% if user.is_active %}{% url user_inactive user.id %}{% else %}{% url user_active user.id %}{% endif %}"
title="{%trans 'Change status (active/inactive)' %}">

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 562 B

View File

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 532 B

View File

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 484 B

View File

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 501 B

View File

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 511 B

View File

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

View File

Before

Width:  |  Height:  |  Size: 867 B

After

Width:  |  Height:  |  Size: 867 B

View File

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 884 B

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -50,7 +50,7 @@
}
/* countdown */
a.countdown_visible_link.closed div {
background-image: url(/static/images/icons/user-offline.png);
background-image: url(../images/icons/user-offline.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -58,7 +58,7 @@ a.countdown_visible_link.closed div {
display: inline-block;
}
a.countdown_visible_link.open div {
background-image: url(/static/images/icons/user-online.png);
background-image: url(../images/icons/user-online.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -67,7 +67,7 @@ a.countdown_visible_link.open div {
}
/* activate link */
a.activate_link div {
background-image: url(/static/images/icons/task-accepted-grey.png);
background-image: url(../images/icons/task-accepted-grey.png);
background-repeat: no-repeat;
float: left;
width: 16px;
@ -78,5 +78,5 @@ a.activate_link div {
left: 4px;
}
a.activate_link.active div {
background-image: url(/static/images/icons/task-accepted.png);
background-image: url(../images/icons/task-accepted.png);
}

View File

@ -1,14 +1,15 @@
{% load tags %}
{% load staticfiles %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link type="text/css" rel="stylesheet" href="/static/styles/projector.css">
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/png" />
<script type="text/javascript" src="/static/javascript/jquery.js"></script>
<script type="text/javascript" src="/static/javascript/projector.js"></script>
<link type="text/css" rel="stylesheet" href="{% static 'styles/projector.css' %}">
<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" type="image/png" />
<script type="text/javascript" src="{% static 'javascript/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/projector.js' %}"></script>
<title>{% block title %} {% get_config 'event_name' %} {% endblock %}</title>
{% block header %}
{% endblock %}
@ -20,7 +21,7 @@
<div id="ajaxswitcher"></div>
<div id="header">
<div id="logo"><img src="/static/images/logo-projector.png"></div>
<div id="logo"><img src="{% static 'images/logo-projector.png' %}"></div>
<div class="event_name">{% get_config 'event_name' %}</div>
<div class="event_description">{% get_config 'event_description' %}</div>
</div>

View File

@ -2,6 +2,7 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super}} {% trans 'Projector' %} {% endblock %}
@ -23,7 +24,7 @@
<a href="{% url projector_new %}">{% trans 'New Slide' %}</a>
</li>
<li>
<a href="{% url projector_show %}"><img src="/static/images/icons/video-projector.png"> {% trans 'Projector view' %}</a>
<a href="{% url projector_show %}"><img src="{% static 'images/icons/video-projector.png' %}"> {% trans 'Projector view' %}</a>
</li>
{% endif %}
</ul>

View File

@ -2,13 +2,14 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% block header %}
<link type="text/css" href="/static/styles/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/projector-control.css" />
<script type="text/javascript" src="/static/javascript/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="/static/javascript/projector-control.js"></script>
<script type="text/javascript" src="/static/javascript/jquery.cookie.js"></script>
<link type="text/css" href="{% static 'styles/ui-lightness/jquery-ui-1.8.18.custom.css' %}" rel="stylesheet" />
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/projector-control.css' %}" />
<script type="text/javascript" src="{% static javascript/jquery-ui-1.8.18.custom.min.js' %}"></script>
<script type="text/javascript" src="{% static javascript/projector-control.js %}"></script>
<script type="text/javascript" src="{% static javascript/jquery.cookie.js %}"></script>
<script type="text/javascript">
$(function() {
$( ".column" ).sortable({
@ -39,32 +40,32 @@
{% trans "Countdown" %} (<a href="{% url config_agenda %}">{{countdown_time}}{% trans "sec" %}</a>)
{% if countdown_visible %}:
<a class="projector_countdown" href="{% url countdown_reset %}" title="{% trans 'Reset countdown' %}">
<img src="/static/images/icons/media-skip-backward.png" />
<img src="{% static 'images/icons/media-skip-backward.png' %}" />
</a>
<a class="projector_countdown" href="{% url countdown_start %}" title="{% trans 'Start countdown' %}">
<img src="/static/images/icons/media-playback-start.png" />
<img src="{% static 'images/icons/media-playback-start.png' %}" />
</a>
<a class="projector_countdown" href="{% url countdown_stop %}" title="{% trans 'Stop countdown' %}">
<img src="/static/images/icons/media-playback-pause.png" />
<img src="{% static 'images/icons/media-playback-pause.png' %}" />
</a>
{% endif %}
<p></p>
<!-- projector control -->
{% trans "Adjust projector view" %}:
<a class="projector_edit" href="{% url projector_bigger %}" title="{% trans 'Zoom in' %}">
<img src="/static/images/icons/zoom-in.png" />
<img src="{% static 'images/icons/zoom-in.png' %}" />
</a>
<a class="projector_edit" href="{% url projector_smaller %}" title="{% trans 'Zoom out' %}">
<img src="/static/images/icons/zoom-out.png" />
<img src="{% static 'images/icons/zoom-out.png' %}" />
</a>
<a class="projector_edit" href="{% url projector_up %}" title="{% trans 'Scroll text up' %}">
<img src="/static/images/icons/go-up.png" />
<img src="{% static 'images/icons/go-up.png' %}" />
</a>
<a class="projector_edit" href="{% url projector_down %}" title="{% trans 'Scroll text down' %}">
<img src="/static/images/icons/go-down.png" />
<img src="{% static 'images/icons/go-down.png' %}" />
</a>
<a class="projector_edit" href="{% url projector_clean %}" title="{% trans 'Reset projector view' %}">
<img src="/static/images/icons/view-restore.png" />
<img src="{% static 'images/icons/view-restore.png' %}" />
</a>
</div>
@ -84,7 +85,7 @@
{% for i in slide.get_ancestors %}&nbsp;&nbsp;&nbsp;{% endfor %}
<a href="{% url projector_edit_slide slide.id %}">{{ slide }}</a>
{% if slide.children.exists %}
<a href="{% url projector_activate_summary slide.sid %}"><img src="/static/images/icons/view-list-tree.png" title="{% trans 'Select item overview' %}"></a>
<a href="{% url projector_activate_summary slide.sid %}"><img src="{% static 'images/icons/view-list-tree.png' %}" title="{% trans 'Select item overview' %}"></a>
{% endif %}
</li>
{% endfor %}

View File

@ -539,28 +539,28 @@ ul.results {
padding: 10px 20px 10px 36px;
}
.notification.success {
background: url("/static/images/icons/task-complete.png") repeat scroll 0 0 #D5FFCE;
background: url("../images/icons/task-complete.png") repeat scroll 0 0 #D5FFCE;
border-color: #9ADF8F;
color: #556652;
}
.notification.error {
background: url("/static/images/icons/task-reject.png") repeat scroll 0 0 #FFCECE;
background: url("../images/icons/task-reject.png") repeat scroll 0 0 #FFCECE;
border-color: #DF8F8F;
color: #665252;
}
.notification.warning {
background: url("/static/images/icons/task-attention.png") repeat scroll 0 0 #FFFBCC;
background: url("../images/icons/task-attention.png") repeat scroll 0 0 #FFFBCC;
border-color: #E6DB55;
color: #666452;
}
.notification.info {
background: url("/static/images/icons/dialog-information.png") repeat scroll 0 0 #DBE3FF;
background: url("../images/icons/dialog-information.png") repeat scroll 0 0 #DBE3FF;
border-color: #A2B4EE;
color: #585B66;
}
.pdficon span {
background-image: url("/static/images/icons/application-pdf.png");
background-image: url("../images/icons/application-pdf.png");
background-repeat: no-repeat;
background-position: center;
width: 16px;

View File

@ -21,7 +21,7 @@ a.tabledrag-handle:hover {
text-decoration: none;
}
a.tabledrag-handle .handle {
background: url("/static/images/draggable.png") no-repeat scroll 0 0 transparent;
background: url("../images/draggable.png") no-repeat scroll 0 0 transparent;
height: 13px;
margin-top: 4px;
width: 13px;
@ -37,13 +37,13 @@ div.indentation {
width: 10px;
}
div.tree-child {
background: url(/static/images/tree.png) no-repeat 11px center; /* LTR */
background: url(../images/tree.png) no-repeat 11px center; /* LTR */
}
div.tree-child-last {
background: url(/static/images/tree-bottom.png) no-repeat 11px center; /* LTR */
background: url(../images/tree-bottom.png) no-repeat 11px center; /* LTR */
}
div.tree-child-horizontal {
background: url(/static/images/tree.png) no-repeat -11px center;
background: url(../images/tree.png) no-repeat -11px center;
}
.tabledrag-toggle-weight-wrapper {
text-align: right; /* LTR */

View File

@ -1,5 +1,6 @@
{% load tags %}
{% load i18n %}
{% load staticfiles %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
@ -7,15 +8,15 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>{% block title %}{% get_config 'event_name' %}{% endblock %}</title>
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/base.css" />
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/png" />
<script type="text/javascript" src="/static/javascript/jquery.js"></script>
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/base.css' %}" />
<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" type="image/png" />
<script type="text/javascript" src="{% static 'javascript/jquery.js' %}"></script>
{% block header %}
{% endblock %}
</head>
<body>
<div id="header">
<a href="/" title="{% trans 'Home' %}"><div id="logo"><img src="/static/images/logo.png"></div></a>
<a href="/" title="{% trans 'Home' %}"><div id="logo"><img src="{% static 'images/logo.png' %}"></div></a>
<div id="header_title">{% get_config 'event_name' %}</div>
<div id="header_subtitle">{% get_config 'event_description' %}</div>
<div id="header_userprofile">
@ -51,7 +52,7 @@
{% for message in messages %}
<div class="notification {% if message.tags %}{{ message.tags }}{% endif %}">
<a class="close" href="#">
<img alt="close" title="{% trans 'Close this notification' %}" src="/static/images/icons/cross.png">
<img alt="close" title="{% trans 'Close this notification' %}" src="{% static 'images/icons/cross.png' %}">
</a>
<em>{{ message|safe }}</em>
</div>

View File

@ -31,7 +31,6 @@ urlpatterns = patterns('',
(r'^participant/', include('participant.urls')),
(r'^config/', include('config.urls')),
(r'^projector/', include('projector.urls')),
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}),
(r'^i18n/', include('django.conf.urls.i18n')),
)