manager: use list and icons for exception sources (#38689)

This commit is contained in:
Frédéric Péters 2019-12-23 13:32:51 +01:00
parent 1940044b7a
commit 8d329609ea
2 changed files with 15 additions and 24 deletions

View File

@ -274,3 +274,10 @@ ul#id_weekdays {
width: 10em;
}
}
ul.objects-list.single-links li a.link-action-icon.refresh {
margin-right: 3em;
&::before {
content: "\f021"; /* refresh */
}
}

View File

@ -14,35 +14,19 @@
<form method="post" enctype="multipart/form-data">
{% if exception_sources %}
<table class="main">
<thead>
<tr>
<th>{% trans "Exceptions" %}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<ul class="objects-list single-links">
{% for object in exception_sources %}
<tr>
<td>
<span title="{{ object }}">
{% if object.ics_filename %}{{ object|truncatechars:50 }}{% else %}<a href="{{ object }}">{{ object|truncatechars:50 }}</a>{% endif %}
</span>
</td>
<td>
<li>
<a title="{{ object }}" {% if not object.ics_filename %}href="{{ object }}"{% endif %}>{% if object.ics_filename %}{{ object|truncatechars:50 }}{% else %}{{ object|truncatechars:50 }}{% endif %}</a>
{% if object.ics_filename %}
<a rel="popup" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
<a rel="popup" class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
{% else %}
<a href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
<a class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
{% endif %}
</td>
<td><a rel="popup" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a></td>
</tr>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</tbody>
</table>
<br />
</ul>
{% endif %}
<p class="notice">{% trans "To add new exceptions, you can upload a file or specify an address to a remote calendar." %}</p>