diff options
Diffstat (limited to 'templates/home.html')
-rw-r--r-- | templates/home.html | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/templates/home.html b/templates/home.html index 40a0e5c..da3e478 100644 --- a/templates/home.html +++ b/templates/home.html @@ -8,23 +8,34 @@ <a class="ml-auto btn btn-sm btn-dark" href="/logout">Log out</a> </div> -<table class="table mt-4"> - <thead> - <tr> - <th>Account name</th> - <th>Protocol</th> - <th></th> - </tr> - </thead> - <tbody> - {{range $name, $acc := .Accounts}} +{{ if .Accounts }} + <table class="table mt-4"> + <thead> <tr> - <td>{{ $name }}</td> - <td>{{ $acc.Protocol }}</td> - <td>Modifier etc</td> + <th>Account name</th> + <th>Protocol</th> + <th></th> </tr> - {{end}} - </tbody> -</table> + </thead> + <tbody> + {{range $i, $acc := .Accounts}} + <tr> + <td>{{ $acc.AccountName }}</td> + <td>{{ $acc.Protocol }}</td> + <td> + <a class="btn btn-sm btn-primary" href="/edit/{{ $acc.AccountName }}">Modify</a> + <a class="btn btn-sm btn-danger ml-4" href="/delete/{{ $acc.AccountName }}">Delete</a> + </td> + </tr> + {{end}} + </tbody> + </table> +{{end}} + +<h5 class="mt-4">Add account</h5> + +<a class="btn btn-sm btn-dark" href="/add/irc">IRC</a> +<a class="btn btn-sm btn-warning ml-4" href="/add/xmpp">XMPP</a> +<a class="btn btn-sm btn-info ml-4" href="/add/mattermost">Mattermost</a> {{end}} |