You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

{{define "body"}}
<section id="wrapper">
<table id="linklist">
{{range .Links}}
<tr>
<td data-id="{{UnwrapOID .ID}}">
<a target="_blank" href="{{.Url}}">{{.Description}}</a>
</td>
{{- if eq $.User.Role "admin"}}
<td>
<button class="btn-delete"></button>
</td>
{{end}}
</tr>
{{end}}
</table>
{{- if eq .User.Role "admin"}}
<form action="/linklist" method="post">
<label for="inp-url">URL</label>
<input id="inp-url" name="url" type="text" value=""/>
<label for="inp-desc">Description</label>
<input id="inp-desc" name="description" type="text" value=""/>
<button>Create</button>
</form>
<div class="hidden" id="general-info"></div>
{{end}}
</section>
{{end}}
{{define "scripts"}}
<script src="/static/js/helper.js"></script>
<script src="/static/js/linklist.js"></script>
{{end}}