We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

invite.hamlet 3.24 KB
Newer Older
1 2 3
$maybe link <- maybe_link
    <p>
        Your invitation code has been generated.
4
        The code adds a new project role to an existing snowdrift.coop account.
5 6 7 8 9 10 11 12 13 14
    <p>
        <strong>Send the code below to the invitee along with a personal note.
    <p>
        <em>
            Note: each code can only be used once.
            You must generate a new code for each invitation.
    <blockquote>
        $maybe invite_role <- maybe_invite_role
            $case invite_role
                $of Admin
15
                    You are invited to be an administrator for #{projectName project}.
David L. L. Thomas's avatar
David L. L. Thomas committed
16

17
                $of TeamMember
18
                    You are invited to be a member of the #{projectName project} team.
David L. L. Thomas's avatar
David L. L. Thomas committed
19

20
                $of Moderator
21
                    You are invited to be a moderator for #{projectName project}.
22

David L. L. Thomas's avatar
David L. L. Thomas committed
23
        $nothing
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
            <strong>
                No role selected?  This is almost certainly an error!

        <p>
            <strong>
                Use this link to redeem your invitation:
                <br>
                @{link}
    <hr>
$nothing
    <p>
        Our invitation system generates private codes which users can redeem to gain further roles on the site.
    <p>
        Permissions are project-specific, so users can have different roles for different projects.
    <p>
        To invite others:
    <ul>
        <li>
            Enter information below about who you are inviting and why.
        <li>
            After you click "generate", you will be given a link to send.
        <li>
            Note: each invitation can only be used once. You must generate a new link for each person you wish to invite.
David L. L. Thomas's avatar
David L. L. Thomas committed
47

48 49 50
<form method=post action=@{InviteR project_handle}>
    ^{invite_form}
    <input type=submit value="generate invitation">
David L. L. Thomas's avatar
David L. L. Thomas committed
51

52 53 54 55 56 57 58 59 60 61 62 63 64 65
<hr>
$if null outstanding_invites
    no outstanding invites
$else
    outstanding invitations:
    <table>
        <tr>
            <th>Created
            <th>Invited By
            <th>Info
            <th>Role
            <th>Code
        $forall Entity _ invite <- outstanding_invites
            <tr>
Jochem Raat's avatar
Jochem Raat committed
66
                <td>^{renderTime (inviteCreatedTs invite)}
67 68 69 70 71 72 73
                $with user_id <- inviteUser invite
                    <td>
                        <a href="@{UserR user_id}">
                            #{format_inviter user_id}
                <td>#{inviteTag invite}
                <td>#{roleAbbrev (inviteRole invite)}
                <td>@{InvitationR project_handle (inviteCode invite)}
David L. L. Thomas's avatar
David L. L. Thomas committed
74

75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
<hr>
$if null redeemed_invites
    no recently redeemed invites
$else
    recent redemptions:
    <table>
        <tr>
            <th>Redeemed
            <th>Redeemed By
            <th>Invited By
            <th>Info
            <th>Role
            <th>Code
        $forall Entity _ invite <- redeemed_invites
            <tr>
Jochem Raat's avatar
Jochem Raat committed
90
                <td>^{renderTime (fromMaybe now (inviteRedeemedTs invite))}
91 92 93 94 95
                <td>#{format_user (inviteRedeemedBy invite)}
                $with user_id <- inviteUser invite
                    <td>
                        <a href="@{UserR user_id}">
                            #{format_inviter user_id}
96

97 98 99
                <td>#{inviteTag invite}
                <td>#{roleAbbrev (inviteRole invite)}
                <td>@{InvitationR project_handle (inviteCode invite)}
100