| 1 |
{% extends "app.html" %} |
| 2 |
{% comment %} |
| 3 |
# SPDX-License-Identifier: AGPL-3.0-or-later |
| 4 |
{% endcomment %} |
| 5 |
|
| 6 |
{% load i18n %} |
| 7 |
{% load static %} |
| 8 |
{% load extras %} |
| 9 |
|
| 10 |
{% block page_head %} |
| 11 |
<link type="text/css" rel="stylesheet" |
| 12 |
href="{% static 'sharing/sharing.css' %}"> |
| 13 |
{% endblock %} |
| 14 |
|
| 15 |
{% block configuration %} |
| 16 |
{{ block.super }} |
| 17 |
|
| 18 |
<div class="btn-toolbar"> |
| 19 |
<a title="{% trans 'Add share' %}" |
| 20 |
role="button" class="btn btn-primary" |
| 21 |
href="{% url 'sharing:add' %}"> |
| 22 |
{% trans 'Add share' %} |
| 23 |
</a> |
| 24 |
</div> |
| 25 |
|
| 26 |
{% if not shares %} |
| 27 |
<p>{% trans 'No shares currently configured.' %}</p> |
| 28 |
{% else %} |
| 29 |
<div class="table-responsive"> |
| 30 |
<table class="table" id="shares-list"> |
| 31 |
<thead> |
| 32 |
<tr> |
| 33 |
<th>{% trans "Name" %}</th> |
| 34 |
<th>{% trans "Disk Path" %}</th> |
| 35 |
<th>{% trans "Shared Over" %}</th> |
| 36 |
<th>{% trans "With Groups" %}</th> |
| 37 |
<th></th> |
| 38 |
</tr> |
| 39 |
</thead> |
| 40 |
|
| 41 |
<tbody> |
| 42 |
{% for share in shares %} |
| 43 |
<tr id="share-{{ share.name }}" class="share"> |
| 44 |
<td class="share-name">{{ share.name }}</td> |
| 45 |
<td class="share-path">{{ share.path }}</td> |
| 46 |
<td class="share-url"> |
| 47 |
<a href="{{ share.url }}" title="{{ share.url}}"> |
| 48 |
{{ share.url }} |
| 49 |
</a> |
| 50 |
</td> |
| 51 |
<td class="share-groups"> |
| 52 |
{% if not share.groups %} |
| 53 |
<i>{% trans "public access" %}</i> |
| 54 |
{% else %} |
| 55 |
{{ share.groups|join:", " }} |
| 56 |
{% endif %} |
| 57 |
</td> |
| 58 |
<td class="share-operations"> |
| 59 |
<a class="share-edit btn btn-sm btn-default" |
| 60 |
href="{% url 'sharing:edit' share.name %}"> |
| 61 |
{% icon 'pencil-square-o' %} |
| 62 |
</a> |
| 63 |
<form class="form" method="post" |
| 64 |
action="{% url 'sharing:remove' share.name %}"> |
| 65 |
{% csrf_token %} |
| 66 |
<button class="share-remove btn btn-sm btn-default" |
| 67 |
type="submit"> |
| 68 |
{% icon 'trash-o' %} |
| 69 |
</button> |
| 70 |
</form> |
| 71 |
</td> |
| 72 |
</tr> |
| 73 |
{% endfor %} |
| 74 |
</tbody> |
| 75 |
</table> |
| 76 |
</div> |
| 77 |
{% endif %} |
| 78 |
|
| 79 |
{% endblock %} |