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
c9a7c5ab
Commit
c9a7c5ab
authored
Jul 05, 2011
by
stef
Browse files
[enh] improved display of infringement
parent
8409e501
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/view.html
View file @
c9a7c5ab
...
...
@@ -9,6 +9,10 @@
<script
type=
"text/javascript"
src=
"{%media_url%}/js/jquery.1.4.2.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
function
bindPostCommentHandler
()
{
$
(
'
.toggle
'
).
click
(
function
(){
$
(
this
).
hide
();
$
(
this
).
next
().
show
();
});
$
(
'
#comment_form form input.submit-preview
'
).
remove
();
$
(
'
#comment_form form
'
).
submit
(
function
()
{
var
postdata
=
$
(
'
#comment_form form
'
).
serialize
()
+
'
&csrftoken={{csrf_token}}
'
;
...
...
@@ -37,24 +41,16 @@ $(document).ready(function() {
{% endblock %}
{%block content%}
<div
id=
'container'
>
<h2>
{{v.operator}} ({{v.country}}) {{v.contract}}
</h2>
<ul
id=
"report"
>
<li><dl><dt>
{% trans "Operator" %}
</dt><dd>
{{v.operator}} ({{v.country}})
</dd></dl></li>
<li><dl><dt>
{% trans "Contract" %}
</dt><dd>
{{v.contract}}
</dd></dl></li>
{%if v.resource%}
<li><dl><dt>
{% trans "Resource" %}
</dt><dd>
{{v.resource}}
</dd></dl></li>
{%endif%}
{%if v.resource_name%}
<li><dl><dt>
{% trans "Resource name" %}
</dt><dd>
{{v.resource_name}}
</dd></dl></li>
{%endif%}
{%if v.type%}
<li><dl><dt>
{% trans "Type" %}
</dt><dd>
{{v.type}}
</dd></dl></li>
{%endif%}
{%if v.media%}
<li><dl><dt>
{% trans "Media" %}
</dt><dd>
{{v.media}}
</dd></dl></li>
{%endif%}
{%if v.temporary%}
<li><dl><dt>
{% trans "Temporary restriction" %}r
</dt><dd>
{{v.temporary}}
</dd></dl></li>
{%endif%}
{%if v.loophole%}
<li><dl><dt>
{% trans "Loophole offering" %}
</dt><dd>
{{v.loophole}}
</dd></dl></li>
{%endif%}
{%if v.contractual%}
<li><dl><dt>
{% trans "Contractual restriction" %}
</dt><dd>
{{v.Contractual}}
</dd></dl></li>
{%endif%}
{%if v.contract_excerpt%}
<li><dl><dt>
{% trans "Contract excerpt" %}
</dt><dd>
{{v.contract_excerpt|safe}}
</dd></dl></li>
{%endif%}
{%if v.comment_set.all%}
<li
id=
"description"
>
<h3>
{%trans "Description" %}
</h3>
{%for c in v.comment_set.all%}
<div
class=
"description-node"
>
<span
class=
"submitter"
>
{%if c.submitter_name%}{{c.submitter_name}}{%else%}{{c.submitter_email}}{%endif%}
</span>
-
<span
class=
"comment_date"
>
{{c.timestamp|datetimefmt:"short" }}
</span>
<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|datetimefmt:"short" }}
</span>
{%if c.attachment_set.all%}
<div
class=
"attachs"
>
{% trans "Attachments" %}
...
...
@@ -68,18 +64,25 @@ $(document).ready(function() {
</div>
{%endfor%}
</li>
{%if v.resource_name%}
<li><dl><dt>
{% trans "Resource" %}
</dt><dd>
{{v.resource_name}}
</dd></dl></li>
{%endif%}
{%if v.type%}
<li><dl><dt>
{% trans "Type" %}
</dt><dd>
{{v.type}}
</dd></dl></li>
{%endif%}
{%if v.media%}
<li><dl><dt>
{% trans "Media" %}
</dt><dd>
{{v.media}}
</dd></dl></li>
{%endif%}
{%if v.temporary%}
<li><dl><dt>
{% trans "Temporary restriction" %}r
</dt><dd>
{{v.temporary}}
</dd></dl></li>
{%endif%}
{%if v.loophole%}
<li><dl><dt>
{% trans "Loophole offering" %}
</dt><dd>
{% trans "yes" %}
</dd></dl></li>
{%endif%}
{%if v.contractual%}
<li><dl><dt>
{% trans "Contractual restriction" %}
</dt><dd>
{% trans "yes" %}
</dd></dl></li>
{%endif%}
{%if v.contract_excerpt%}
<li><dl><dt>
{% trans "Contract excerpt" %}
</dt><dd
class=
'text'
>
{{v.contract_excerpt|safe}}
</dd></dl></li>
{%endif%}
</ul>
{%endif%}
{% if not key %}
<h3>
{% trans "Comments" %}
</h3>
{% render_comment_list for v %}
<h3>
{% trans "Comment" %}
</h3>
{% get_comment_form for v as form %}
<div
id=
"comment_form"
>
<div
class=
"toggle button"
>
{% trans "Add comment" %}
</div>
<div
id=
"comment_form"
style=
"display: none;"
>
{% render_comment_form for v %}
</div>
{% else %}
<a
href=
'/moderate/?key={{key}}&action=approve'
>
Approve Submission
</a>
<a
href=
'/moderate/?key={{key}}&action=delete'
>
Delete Submission
</a>
<a
class=
"button"
href=
'/moderate/?key={{key}}&action=approve'
>
Approve Submission
</a>
<a
class=
"button"
href=
'/moderate/?key={{key}}&action=delete'
>
Delete Submission
</a>
{% endif %}
</div>
{%endblock%}
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