Merge pull request #80 from ssb-ngi-pointer/css-invite-pages
style the invite-list page
This commit is contained in:
commit
90634b0c96
|
@ -1,6 +1,7 @@
|
|||
GenericConfirm = "Yes"
|
||||
GenericGoBack = "Back"
|
||||
GenericSave = "Save"
|
||||
GenericCreate = "Create"
|
||||
GenericPreview = "Preview"
|
||||
GenericLanguage = "Language"
|
||||
|
||||
|
@ -25,8 +26,14 @@ AdminAllowListRemoveConfirmWelcome = "Are you sure you want to remove this membe
|
|||
AdminAllowListRemoveConfirmTitle = "Confirm member removal"
|
||||
|
||||
AdminInvitesTitle = "Invites"
|
||||
AdminInvitesWelcome = "Create invite tokens for people who are not yet members of this room."
|
||||
AdminInvitesAliasSuggestion = "Suggested alias (optional)"
|
||||
AdminInvitesWelcome = "Create invite tokens for people who are not yet members of this room. At the same time as you create an invite, you can also (optionally) attach an alias to it so that the person who receives the invite can automatically use that claim that alias for themselves."
|
||||
AdminInvitesAliasSuggestion = "(Optional) Alias suggestion"
|
||||
AdminInvitesCount = "{{.Count}} invites still unclaimed"
|
||||
AdminInvitesIDColumn = "ID"
|
||||
AdminInvitesCreatorColumn = "Created by"
|
||||
AdminInvitesAliasColumn = "Alias suggestion"
|
||||
AdminInvitesSummaryFrom = "From"
|
||||
AdminInvitesSummaryTo = "to"
|
||||
AdminInviteRevoke = "Revoke"
|
||||
AdminInviteRevokeConfirmTitle = "Confirm invite revocation"
|
||||
AdminInviteRevokeConfirmWelcome = "Are you sure you want to remove this invite? If you already sent it out, they will not be able to use it."
|
||||
|
|
|
@ -6,51 +6,67 @@
|
|||
|
||||
<p id="welcome" class="my-2">{{i18n "AdminInvitesWelcome"}}</p>
|
||||
|
||||
<p
|
||||
id="inviteListCount"
|
||||
class="text-lg font-bold my-2"
|
||||
>{{i18npl "ListCount" .Count}}</p>
|
||||
|
||||
<ul id="theList" class="divide-y pb-4">
|
||||
<form
|
||||
id="create-invite"
|
||||
action="{{urlTo "admin:invites:create"}}"
|
||||
method="POST"
|
||||
>
|
||||
{{ .csrfField }}
|
||||
<div class="flex flex-row items-center h-12">
|
||||
<input
|
||||
type="text"
|
||||
name="alias_suggestion"
|
||||
placeholder="{{i18n "AdminInvitesAliasSuggestion"}}"
|
||||
class="font-mono truncate flex-auto tracking-wider h-12 text-gray-900 focus:outline-none focus:ring-1 focus:ring-green-500 focus:border-transparent placeholder-gray-300"
|
||||
>
|
||||
<input
|
||||
type="submit"
|
||||
value="{{i18n "GenericSave"}}"
|
||||
class="pl-4 w-20 py-2 text-center text-green-500 hover:text-green-600 font-bold bg-transparent cursor-pointer"
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
{{range .Entries}}
|
||||
<li class="flex flex-row items-center h-12">
|
||||
<span
|
||||
class="font-mono truncate flex-auto text-gray-600 tracking-wider"
|
||||
>
|
||||
<!-- https://github.com/ssb-ngi-pointer/go-ssb-room/issues/60 -->
|
||||
{{i18n "AdminInviteCreatedBy"}} {{.CreatedBy.Name}}
|
||||
{{if ne .AliasSuggestion ""}}
|
||||
({{i18n "AdminInviteSuggestedAliasIsShort"}} {{.AliasSuggestion}})
|
||||
<table class="table-auto w-full self-stretch mt-4 mb-8">
|
||||
<thead class="block sm:table-header-group">
|
||||
<tr class="sm:h-12 sm:table-row flex flex-col items-stretch">
|
||||
<td class="sm:w-3 sm:table-cell block" 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="sm:w-1/2 sm:pl-2 pr-0 sm:table-cell block sm:my-0 my-4" 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="hidden sm:table-row h-8 uppercase text-sm text-gray-400">
|
||||
<th class="w-3 text-center pl-3 pr-6">{{i18n "AdminInvitesIDColumn"}}</th>
|
||||
<th class="w-1/2 text-left px-6">{{i18n "AdminInvitesCreatorColumn"}}</th>
|
||||
<th class="w-1/2 text-left px-6">{{i18n "AdminInvitesAliasColumn"}}</th>
|
||||
<th class="w-0"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y">
|
||||
{{range .Entries}}
|
||||
<tr class="h-12 hidden sm:table-row">
|
||||
<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>
|
||||
<tr class="h-12 table-row sm:hidden">
|
||||
<td class="flex flex-row items-center" colspan="4">
|
||||
<span class="flex-1">{{i18n "AdminInvitesSummaryFrom"}} <b>{{.CreatedBy.Name}}</b> {{i18n "AdminInvitesSummaryTo"}} <b>{{if ne .AliasSuggestion ""}}{{.AliasSuggestion}}{{else}}?{{end}}</b></span>
|
||||
<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>
|
||||
{{end}}
|
||||
</span>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{$pageNums := .Paginator.PageNums}}
|
||||
{{$view := .View}}
|
||||
|
|
Loading…
Reference in New Issue