Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Respect My Net
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
piks3l
Respect My Net
Commits
6597853a
Commit
6597853a
authored
Sep 22, 2011
by
stef
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[enh] full country names displayed
parent
5eacb3b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
bt/templatetags/bt.py
bt/templatetags/bt.py
+5
-0
bt/views.py
bt/views.py
+1
-1
templates/index.html
templates/index.html
+1
-1
templates/list.html
templates/list.html
+1
-1
No files found.
bt/templatetags/bt.py
View file @
6597853a
...
...
@@ -2,6 +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
register
=
Library
()
...
...
@@ -13,3 +14,7 @@ def root_url():
def
media_url
():
return
settings
.
MEDIA_URL
country_map
=
dict
(
COUNTRIES
)
@
register
.
filter
(
name
=
'country'
)
def
country
(
code
):
return
country_map
[
code
]
bt/views.py
View file @
6597853a
...
...
@@ -9,7 +9,7 @@ from django.core.exceptions import ObjectDoesNotExist
from
django.contrib
import
messages
from
django.contrib.auth.models
import
User
from
django.utils.translation
import
ugettext_lazy
as
_
from
models
import
Violation
,
Attachment
,
Comment
,
Confirmation
,
COUNTRIES
from
models
import
Violation
,
Attachment
,
Comment
,
Confirmation
from
tempfile
import
mkstemp
from
datetime
import
datetime
import
hashlib
,
os
,
re
,
json
,
smtplib
...
...
templates/index.html
View file @
6597853a
...
...
@@ -131,7 +131,7 @@ $(document).ready(function(){
<tbody>
{% for violation in violations %}
<tr>
<td><a
href=
"/view/{{violation.pk}}"
>
{{ violation.operator }} ({{ violation.country }}) {{ violation.contract }}
</a>
<td><a
href=
"/view/{{violation.pk}}"
>
{{ violation.operator }} ({{ violation.country
|country
}}) {{ violation.contract }}
</a>
<div
class=
"info-validate"
>
<form
method=
"get"
id=
"{{ violation.pk }}"
class=
"confirm_form"
>
<label>
{% trans "In order to
<strong>
validate your action
</strong>
, please enter your email address" %}
</label>
...
...
templates/list.html
View file @
6597853a
...
...
@@ -52,7 +52,7 @@
<tbody>
{% for violation in violations %}
<tr>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.country }}
</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>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.resource }}
</a></td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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