Commit f77565ae authored by stef's avatar stef

Merge branch 'zorun'

parents 8b4c7e1f 9ffdbd94
......@@ -2,7 +2,7 @@ from django.template import Library, Variable
from django.conf import settings
from django import template
import random
from nnmon.bt.models import COUNTRIES, STATUS
from nnmon.bt.models import COUNTRIES, STATUS, TYPES, MEDIA
register = Library()
......@@ -23,3 +23,13 @@ status_map=dict(STATUS)
@register.filter(name='status')
def status(code):
return status_map[code]
type_map=dict(TYPES)
@register.filter(name='type')
def type(code):
return type_map[code]
media_map=dict(MEDIA)
@register.filter(name='media')
def media(code):
return media_map[code]
......@@ -11,12 +11,12 @@
<li>{% trans "France" %}: <a href="http://www.laquadrature.net/">La Quadrature du Net</a> &ndash; contact[a]laquadrature.net</li>
<li>{% trans "Netherlands" %}: <a href="https://www.bof.nl/">Bits of Freedom</a> &ndash; info[a]bof.nl</li>
</ul>
<h3>Initiators</h3>
<h3>{% trans "Initiators" %}</h3>
<ul>
<li class="logo-org"><img alt="BoF logo" src="{%media_url%}/img/bof.png" /><a href="http://www.bof.nl">Bits of Freedom</a></li>
<li class="logo-org"><img alt="LQDN logo" src="{%media_url%}/img/lqdn.png" /><a href="https://www.laquadrature.net/">La Quadrature du Net</a></li>
</ul>
<h3>Supporters</h3>
<h3>{% trans "Supporters" %}</h3>
<ul>
<li class="logo-org"><img alt="ORG logo" src="{%media_url%}/img/org.png" /><a href="http://www.openrightsgroup.org/">Open Rights Group</a></li>
<li class="logo-org"><img alt="NURPA logo" src="{%media_url%}/img/nurpa.png" width="80" style="text-align: center; background:#446688"/><br /><a href="http://nurpa.be"><small>Net Users' Rights Protection Association</small></a></li>
......
......@@ -257,8 +257,8 @@
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.operator }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.contract }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.resource_name }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.type }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.media }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.type|type }}</a></td>
<td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.media|media }}</a></td>
<td>{{ violation.confirmations }}</td>
<td>
<div class="confirm"><a class="button">{% trans "confirm" %}</a>
......
......@@ -66,8 +66,8 @@ $(document).ready(function() {
</div>
<dl>{%if v.resource_name%}<dt>{% trans "Affected resource" %}</dt><dd>{{v.resource_name}}</dd>{%endif%}
{%if v.type%}<dt>{% trans "Type" %}</dt><dd>{{v.type}}</dd>{%endif%}
{%if v.media%}<dt>{% trans "Media" %}</dt><dd>{{v.media}}</dd>{%endif%}
{%if v.type%}<dt>{% trans "Type" %}</dt><dd>{{v.type|type}}</dd>{%endif%}
{%if v.media%}<dt>{% trans "Media" %}</dt><dd>{{v.media|media}}</dd>{%endif%}
{%if v.state%}<dt>{% trans "Status" %}</dt><dd>{{v.state|status}}</dd>{%endif%}
{%if v.temporary%}<dt>{% trans "Temporary restriction" %}</dt><dd>{{v.temporary}}</dd>{%endif%}
{%if v.loophole%}<dt>{% trans "Another offer provided by the same operator removes this restriction" %}</dt><dd>{% trans "yes" %}</dd>{%endif%}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment