2021-03-03 12:58:06 +00:00
|
|
|
{{ define "title" }}{{i18n "AdminInvitesTitle"}}{{ end }}
|
|
|
|
{{ define "content" }}
|
|
|
|
<h1
|
|
|
|
class="text-3xl tracking-tight font-black text-black mt-2 mb-4"
|
|
|
|
>{{i18n "AdminInvitesTitle"}}</h1>
|
|
|
|
|
|
|
|
<p id="welcome" class="my-2">{{i18n "AdminInvitesWelcome"}}</p>
|
|
|
|
|
2021-03-12 11:25:27 +00:00
|
|
|
<table class="table-fixed self-stretch mt-4 mb-8">
|
|
|
|
<thead>
|
|
|
|
<tr class="h-12">
|
|
|
|
<td class="w-3" colspan="2">
|
|
|
|
<div class="inline ml-0 rounded-full px-3 py-1 tracking-tight font-black text-white bg-gradient-to-r from-pink-400 to-red-400">{{i18npl "AdminInvitesCount" .Count}}</div>
|
|
|
|
</td>
|
|
|
|
<td class="w-1/2 pl-2 pr-0" colspan="2">
|
|
|
|
<form
|
|
|
|
id="create-invite"
|
|
|
|
action="{{urlTo "admin:invites:create"}}"
|
|
|
|
method="POST"
|
|
|
|
>
|
|
|
|
{{ .csrfField }}
|
|
|
|
<div class="h-10 flex flex-row items-center rounded-full ring-2 ring-green-400 bg-white">
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
name="alias_suggestion"
|
|
|
|
placeholder="{{i18n "AdminInvitesAliasSuggestion"}}"
|
|
|
|
class="h-10 ml-4 w-1/2 truncate flex-auto tracking-wider text-gray-900 focus:outline-none placeholder-gray-300"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
type="submit"
|
|
|
|
value="{{i18n "GenericCreate"}}"
|
|
|
|
class="pl-4 pr-3 w-20 py-2 text-center text-green-500 hover:text-green-600 font-bold bg-transparent cursor-pointer"
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="h-8 uppercase text-sm text-gray-400">
|
|
|
|
<th class="w-3 text-center pl-3 pr-6">ID</th>
|
|
|
|
<th class="w-1/2 text-left px-6">Created by</th>
|
|
|
|
<th class="w-1/2 text-left px-6">Alias suggestion</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="divide-y">
|
|
|
|
{{range .Entries}}
|
|
|
|
<tr class="h-12">
|
|
|
|
<td class="pl-3 pr-6 text-gray-400 text-center">#{{.ID}}</td>
|
|
|
|
<td class="px-6">{{.CreatedBy.Name}}</td>
|
|
|
|
<td class="px-6">{{if ne .AliasSuggestion ""}}{{.AliasSuggestion}}{{end}}</td>
|
|
|
|
<td class="pl-6 pr-3">
|
|
|
|
<a
|
|
|
|
href="{{urlTo "admin:invites:revoke:confirm" "id" .ID}}"
|
|
|
|
class="pl-4 w-20 py-2 text-center text-gray-400 hover:text-red-600 font-bold cursor-pointer"
|
|
|
|
>{{i18n "AdminInviteRevoke"}}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-03-04 14:09:14 +00:00
|
|
|
{{end}}
|
2021-03-12 11:25:27 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-03-03 12:58:06 +00:00
|
|
|
|
|
|
|
{{$pageNums := .Paginator.PageNums}}
|
|
|
|
{{$view := .View}}
|
|
|
|
{{if gt $pageNums 1}}
|
|
|
|
<div class="flex flex-row justify-center">
|
|
|
|
{{if not .FirstInView}}
|
|
|
|
<a
|
|
|
|
href="{{urlTo "admin:invites:overview"}}?page=1"
|
|
|
|
class="rounded px-3 py-2 text-pink-600 border-transparent hover:border-pink-400 border-2"
|
|
|
|
>1</a>
|
|
|
|
<span
|
|
|
|
class="px-3 py-2 text-gray-400 border-2 border-transparent"
|
|
|
|
>..</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{range $view.Pages}}
|
|
|
|
{{if le . $pageNums}}
|
|
|
|
{{if eq . $view.Current}}
|
|
|
|
<span
|
|
|
|
class="px-3 py-2 cursor-default text-gray-500 border-2 border-transparent"
|
|
|
|
>{{.}}</span>
|
|
|
|
{{else}}
|
|
|
|
<a
|
|
|
|
href="{{urlTo "admin:invites:overview"}}?page={{.}}"
|
|
|
|
class="rounded px-3 py-2 mx-1 text-pink-600 border-transparent hover:border-pink-400 border-2"
|
|
|
|
>{{.}}</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if not .LastInView}}
|
|
|
|
<span
|
|
|
|
class="px-3 py-2 text-gray-400 border-2 border-transparent"
|
|
|
|
>..</span>
|
|
|
|
<a
|
|
|
|
href="{{urlTo "admin:invites:overview"}}?page={{$view.Last}}"
|
|
|
|
class="rounded px-3 py-2 text-pink-600 border-transparent hover:border-pink-400 border-2"
|
|
|
|
>{{$view.Last}}</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|