Commit c9a7c5ab authored by stef's avatar stef
Browse files

[enh] improved display of infringement

parent 8409e501
......@@ -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%}
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