ShareDAV/templates/shares.html

52 lines
1.9 KiB
HTML

{{ 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">
{{ 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 }}"/>
<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="source" value="shares"/>
<input type="hidden" name="share" value="{{ $share.UUID }}"/>
<input type="hidden" name="user" value="{{ $user.Username }}"/>
<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 }}