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