{{ define "title" }}
    User - {{ .CurrentUser }}
{{ end }}
{{- define "content" -}}
    <h1 class="headline">User: {{ .CurrentUser }}</h1>
    {{ if .LoggedInUserPage }}
    <form action="/create-group" method="post">
        <fieldset class="grid first">
            <input type="text" id="group-name" name="group-name" placeholder="Group name" required>
            <input type="text" id="description" name="description" placeholder="Description">
            <button type="submit">Create Group</button>
        </fieldset>
    </form>
    {{ end }}

    <h3>Owner of groups</h3>
    <div class="user-remove">
        {{- range .OwnerGroups }}
            <a href="/group/{{ .Name }}" role="button" 
                {{ if ne .Description "" }} data-tooltip="{{ .Description }}" data-placement="bottom" {{ end }}>
                {{ .Name }}
            </a>
        {{- end }}
    </div>
    <hr class="divider">

    <h3>Direct member of groups</h3>
    <div class="user-remove">
        {{- range .MembershipGroups }}
            <a href="/group/{{ .Name }}" role="button" 
                {{ if ne .Description "" }} data-tooltip="{{ .Description }}" data-placement="bottom" {{ end }}>
                {{ .Name }}
            </a>
        {{- end }}
    </div>
    <hr class="divider">

    <h3>Transitive member of groups</h3>
    <div class="user-remove">
        {{- range .TransitiveGroups -}}
            <a href="/group/{{ .Name }}" role="button" 
               {{ if ne .Description "" }} data-tooltip="{{ .Description }}" data-placement="bottom" {{ end }}>
               {{ .Name }}
            </a>
        {{- end }}
    </div>
{{- end }}
