mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
outdent Twig control structures
This commit is contained in:
@@ -46,9 +46,9 @@
|
||||
<br />Last action: {{ torrent.lastActiveDate|default('Never') }}
|
||||
<br /><span class="report_torrent_file_ext">Audio files present:
|
||||
{% for ext, total in torrent.fileListPrimaryMap -%}
|
||||
{%- if loop.first %}<span class="file_ext_map">{% else %}, {% endif -%}
|
||||
{%- if loop.first %}<span class="file_ext_map">{% else %}, {% endif -%}
|
||||
{{ ext }}: {{ total|number_format }}
|
||||
{%- if loop.last %}</span>{% endif -%}
|
||||
{%- if loop.last %}</span>{% endif -%}
|
||||
{% else %}
|
||||
<span class="file_ext_none">none</span>
|
||||
{% endfor %}
|
||||
@@ -58,38 +58,38 @@
|
||||
<br /><div class="report_torrent_info" title="Release description of reported torrent">Release info: {{ torrent.description|bb_format }}</div>
|
||||
{% endif %}
|
||||
{% if report.status != 'resolved' %}
|
||||
{% if total_group > 1 %}
|
||||
{% set total_group = total_group - 1 %}
|
||||
{% if total_group > 1 %}
|
||||
{% set total_group = total_group - 1 %}
|
||||
<div style="text-align: right;">
|
||||
<a href="reportsv2.php?view=group&id={{ torrent.groupId }}">There
|
||||
{%- if total_group > 1 %} are {{ total_group }} other reports {% else %} is 1 other report {% endif -%}
|
||||
{%- if total_group > 1 %} are {{ total_group }} other reports {% else %} is 1 other report {% endif -%}
|
||||
for torrents in this group</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if total_uploader > 1 %}
|
||||
{% set total_uploader = total_uploader - 1 %}
|
||||
{% endif %}
|
||||
{% if total_uploader > 1 %}
|
||||
{% set total_uploader = total_uploader - 1 %}
|
||||
<div style="text-align: right;">
|
||||
<a href="reportsv2.php?view=uploader&id={{ torrent.uploaderId }}">There
|
||||
{%- if total_uploader > 1 %} are {{ total_uploader }} other reports {% else %} is 1 other report {% endif -%}
|
||||
{%- if total_uploader > 1 %} are {{ total_uploader }} other reports {% else %} is 1 other report {% endif -%}
|
||||
for torrents uploaded by this user</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if total_torrent > 1 %}
|
||||
{% set total_torrent = total_torrent - 1 %}
|
||||
{% endif %}
|
||||
{% if total_torrent > 1 %}
|
||||
{% set total_torrent = total_torrent - 1 %}
|
||||
<div style="text-align: right;">
|
||||
<strong class="important_text">
|
||||
<a href="reportsv2.php?view=torrent&id={{ torrent.id }}">There
|
||||
{%- if total_torrent > 1 %} are {{ total_torrent }} other reports {% else %} is 1 other report {% endif -%}
|
||||
{%- if total_torrent > 1 %} are {{ total_torrent }} other reports {% else %} is 1 other report {% endif -%}
|
||||
for this torrent</a>
|
||||
</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for request in request_list %}
|
||||
{% endif %}
|
||||
{% for request in request_list %}
|
||||
<div style="text-align: right;">
|
||||
<strong class="important_text">{{ request.fillerId|user_url }} used this torrent to fill <a href="{{
|
||||
request.location }}">this request</a> {{ request.fillDate|time_diff }}</strong>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -100,14 +100,14 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for link in report.externalLink %}
|
||||
{% if loop.first %}
|
||||
{% if loop.first %}
|
||||
<tr>
|
||||
<td class="label">Relevant links:</td>
|
||||
<td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ link|linkify }}
|
||||
{% if loop.last %}
|
||||
{% if loop.last %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="header">
|
||||
<h2>New reports, auto assigned</h2>
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
</div>
|
||||
<div class="buttonbox pad center">
|
||||
<input type="button" onclick="AddMore();" value="Add more" /> <input type="text" name="repop_amount" id="repop_amount" size="2" value="10" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ header('Reports V2', {'js': 'reportsv2'}) }}
|
||||
<div class="header">
|
||||
<h2>Search Reports</h2>
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
</div>
|
||||
{% if list %}
|
||||
{{ paginator.linkbox|raw }}
|
||||
@@ -27,14 +27,14 @@
|
||||
<td>{{ r.reporter.username ?? '<i>unknown</i>'|raw }}</td>
|
||||
<td>{{ r.resolver.username ?? '<i>unclaimed</i>'|raw }}</td>
|
||||
<td>
|
||||
{% if r.torrent.isDeleted %}<i>Deleted {% endif %}
|
||||
{% if r.torrent.hasTGroup %}
|
||||
{{ r.torrent.groupLink|raw }} {{ r.torrent.edition}}
|
||||
{% else %}
|
||||
{% if r.torrent.isDeleted %}<i>Deleted {% endif %}
|
||||
{% if r.torrent.hasTGroup %}
|
||||
{{ r.torrent.groupLink|raw }} {{ r.torrent.edition}}
|
||||
{% else %}
|
||||
<i>Deleted/Merged Group #{{ r.torrent.groupId }}</i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br />{{ r.torrent.label|raw }}
|
||||
{% if r.torrent.isDeleted %}</i>{% endif %}
|
||||
{% if r.torrent.isDeleted %}</i>{% endif %}
|
||||
</td>
|
||||
<td class="nowrap">{{ name_cache[r.Type] }}</td>
|
||||
<td>{{ r.ReportedTime|time_diff }}</td>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
|
||||
<div class="header">
|
||||
<h2>Torrent Report Information</h2>
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
{%- include 'reportsv2/linkbox.twig' with {'viewer': viewer} only %}
|
||||
</div>
|
||||
|
||||
<div class="thin float_clear">
|
||||
<div class="two_columns pad">
|
||||
{% for interval, summary in resolved %}
|
||||
<h3>
|
||||
{%- if interval == 'total' -%}
|
||||
{%- if interval == 'total' -%}
|
||||
Total reports resolved
|
||||
{%- else -%}
|
||||
{%- else -%}
|
||||
Reports resolved in the last {{ interval }}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</h3>
|
||||
{% for entry in summary %}
|
||||
{% if loop.first %}
|
||||
{% for entry in summary %}
|
||||
{% if loop.first %}
|
||||
<table class="box border">
|
||||
<tr class="colhead">
|
||||
<td class="colhead_dark">Username</td>
|
||||
<td class="colhead_dark number_column">Reports</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<tr{% if entry.user_id == viewr.user_id %} class="rowa"{% endif %}>
|
||||
<td><a href="reportsv2.php?view=resolver&id={{ entry.user_id }}">{{ entry.user.username }}</a></td>
|
||||
<td class="number_column">{{ entry.total|number_format }}</td>
|
||||
</tr>
|
||||
{% if loop.last %}
|
||||
{% if loop.last %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div>No activity<br /><br /></div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<h3>Different view modes by person</h3>
|
||||
@@ -98,46 +98,45 @@
|
||||
<div class="two_columns pad">
|
||||
<h3>Currently assigned reports by staff member</h3>
|
||||
{% for entry in in_progress %}
|
||||
{% if loop.first %}
|
||||
{% if loop.first %}
|
||||
<table class="box border">
|
||||
<tr class="colhead">
|
||||
<td class="colhead_dark">Staff Member</td>
|
||||
<td class="colhead_dark number_column">Open</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<tr class="{% if entry.user_id == viewer.id %}rowa{% else %}rowb{% endif %}">
|
||||
<td>
|
||||
<a href="reportsv2.php?view=staff&id={{ entry.user_id }}">{{ entry.user.username }}</a>
|
||||
</td>
|
||||
<td class="number_column">{{ entry.total|number_format }}</td>
|
||||
</tr>
|
||||
{% if loop.last %}
|
||||
{% if loop.last %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>There are no claimed reports</p>
|
||||
{% endfor %}
|
||||
|
||||
<h3>Different view modes by report type</h3>
|
||||
{% for entry in new %}
|
||||
{% if loop.first %}
|
||||
{% if loop.first %}
|
||||
<table class="box border">
|
||||
<tr class="colhead">
|
||||
<td class="colhead_dark">Type</td>
|
||||
<td class="colhead_dark number_column">Current Count</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<tr{% if entry.type == 'urgent' %} class="rowa" style="font-weight: bold;"{% endif %}>
|
||||
<td><a href="reportsv2.php?view=type&id={{ entry.type }}">{{ entry.name }}</a></td>
|
||||
<td class="number_column">{{ entry.total|number_format }} </td>
|
||||
</tr>
|
||||
{% if loop.last %}
|
||||
{% if loop.last %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>No open reports</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ footer() }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user