Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
piks3l
Respect My Net
Commits
82dcb3dd
Commit
82dcb3dd
authored
Nov 16, 2011
by
Baptiste Jonglez
Browse files
Merge
https://github.com/stef/nnmon
parents
6f036f30
4d43e6b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
bt/templatetags/bt.py
View file @
82dcb3dd
...
...
@@ -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
from
nnmon.bt.models
import
COUNTRIES
,
STATUS
register
=
Library
()
...
...
@@ -18,3 +18,8 @@ country_map=dict(COUNTRIES)
@
register
.
filter
(
name
=
'country'
)
def
country
(
code
):
return
country_map
[
code
]
status_map
=
dict
(
STATUS
)
@
register
.
filter
(
name
=
'status'
)
def
status
(
code
):
return
status_map
[
code
]
templates/index.html
View file @
82dcb3dd
...
...
@@ -154,6 +154,7 @@ $(document).ready(function(){
<tr>
<td
colspan=
"3"
>
<div
id=
"description"
class=
'round-box'
>
{% trans "Affected Resource" %}: {{violation.resource_name}}
{%for c in violation.comment_set.all%}
<div
class=
"description"
>
{{c.comment|safe}}
</div>
<span
class=
"submitter"
>
{%if c.submitter_name%}{{c.submitter_name}}{%else%}{{c.submitter_email}}{%endif%}
</span>
-
<span
class=
"comment_date"
>
{{c.timestamp|date:"SHORT_DATE_FORMAT" }}
</span>
...
...
templates/list.html
View file @
82dcb3dd
...
...
@@ -249,7 +249,7 @@
<tbody>
{% for violation in violations %}
<tr
class=
"{%if violation.state%}{{violation.state}}{%else%}new{%endif%}-status"
>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{%if violation.state%}{{violation.state}}{%else%}
new
{%endif%}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{%if violation.state%}{{violation.state
|status
}}{%else%}
{% trans "New" %}
{%endif%}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.country|country }}
</a></td>
<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>
...
...
templates/view.html
View file @
82dcb3dd
...
...
@@ -68,7 +68,7 @@ $(document).ready(function() {
<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.state%}
<dt>
{% trans "Status" %}
</dt><dd>
{{v.state}}
</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%}
{%if v.contractual%}
<dt>
{% trans "Contractual restriction" %}
</dt><dd>
{% trans "yes" %}
</dd>
{%endif%}
...
...
@@ -78,7 +78,8 @@ $(document).ready(function() {
{% if v.editorial %}
<div
id=
"editorial"
class=
'round-box'
>
{{v.editorial}}
<h3>
{% trans "RespectMyNet note" %}
</h3>
{{v.editorial|striptags|urlize|linebreaks}}
</div>
{% endif %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment