debianmemberportfolio/debianmemberportfolio/templates/showurls.html

62 lines
2.1 KiB
HTML

{% extends "base.html" %}
{#
Template for the url output page.
Copyright © 2009-2015 Jan Dittberner <jan@dittberner.info>
This file is part of Debian Member Portfolio Service.
Debian Member Portfolio Service is free software: you can redistribute it
and/or modify it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Debian Member Portfolio Service is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}{{ super() }} - {{ _('Your personal links') }}{% endblock %}
{% block body %}{{ super() }}
{% if urldata %}
<fieldset id="portfolio">
<legend>{{ _('Debian Member Porfolio') }}</legend>
<table id="urltable">
<thead>
<tr><th>{{ _('Usage') }}</th><th>{{ _('URL') }}</th></tr>
</thead>
<tbody>
{% for row in urldata %}
{% if row[0] == 'section' %}
<tr class="section"><th class="sectionlabel" colspan="2">{{ row[2] }}</th></tr>
{% set urlclass = 'odd' %}
{% elif row[0] == 'error' %}
<tr class="error">
<td>{{ row[4] }}</td>
<td>{{ _('Error during URL creation:') }}
<span class="errormsg">{{ row[3]|replace("\n", "<br />") }}</span></td>
</tr>
{% else %}
<tr class="url {{ urlclass }}">
<td>{{ row[4]|safe }}</td>
<td>
{% if row[2].type == 'url' %}
<a href="{{ row[3] }}">{{ row[3]|truncate(120) }}</a>
{% else %}
<tt>{{ row[3] }}</tt>
{% endif %}
</td>
</tr>
{% if urlclass == "odd" %}{% set urlclass = "even" %}{% else %}{% set urlclass = "odd" %}{% endif %}
{% endif %}
{% endfor %}
</tbody>
</table>
</fieldset>
{% endif %}
<p><a href="{{ url_for('urllist') }}">{{ _('Restart') }}</a></p>
{% endblock body %}