ShareDAV/templates/shares.html

47 lines
1.7 KiB
HTML
Raw Normal View History

{{ define "page-styles"}}
<style>
div.share-user {
margin-left: 2em;
margin-top: .5em;
font-style: italic;
}
a.share-add-user {
margin-left: 2em;
margin-top: .5em;
font-style: italic;
}
div.share {
margin-bottom: 2em;
}
:target {
background-color: #c4e1ff;
}
</style>
{{ end }}
{{ define "page-content" }}
<div id="shares">
2020-10-25 12:05:47 +01:00
{{ range $share := .ShareInfos }}
<div id="share-{{$share.UUID}}" class="share">
UUID: {{ $share.UUID }} <form style="display: inline-block;" action="delete-share" method="post">
<input type="hidden" name="share" value="{{ $share.UUID }}"/>
2020-10-25 18:28:27 +01:00
<input type="submit" value="Delete" class="delete"/>
</form>
<br/>
Name: {{ $share.Name }}<br/>
{{ range $user := .Users }}
<div id="user-{{$share.UUID}}-{{$user.Username}}" class="share-user">
User {{ $user.Username }} ({{ $user.Role }})
<form style="display: inline-block;" action="share-delete-user" method="post">
<input type="hidden" name="share" value="{{ $share.UUID }}"/>
<input type="hidden" name="user" value="{{ $user.Username }}"/>
2020-10-25 18:28:27 +01:00
<input type="submit" value="Delete" class="delete"/>
</form>
</div>
{{ end }}
<a href="share-add-user?share={{ $share.UUID }}" class="share-add-user">Add User</a>
</div>
{{ end }}
<a href="create-share" class="create-share">Create Share</a>
</div>
{{ end }}