a
This commit is contained in:
parent
635cc290fe
commit
6370e06879
|
@ -63,7 +63,9 @@
|
||||||
<div class="table element">
|
<div class="table element">
|
||||||
<h1 class="ui header">
|
<h1 class="ui header">
|
||||||
{{ $user := . }}
|
{{ $user := . }}
|
||||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}] </a></td>
|
{{ if $user.clan}}
|
||||||
|
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">{{ $user.clan.tag }} </a></td>
|
||||||
|
{{ end }}
|
||||||
{{ if $super }}
|
{{ if $super }}
|
||||||
<div class="owner">
|
<div class="owner">
|
||||||
{{ .username }}
|
{{ .username }}
|
||||||
|
|
86
templates/settings/clansettings.html
Normal file
86
templates/settings/clansettings.html
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
{{/*###
|
||||||
|
Handler=/settings/clansettings
|
||||||
|
TitleBar=Clan Settings
|
||||||
|
Include=menu.html
|
||||||
|
*/}}
|
||||||
|
{{ define "tpl" }}
|
||||||
|
<div class="ui container">
|
||||||
|
<div class="ui stackable grid">
|
||||||
|
{{ template "settingsSidebar" . }}
|
||||||
|
<div class="twelve wide column">
|
||||||
|
<div class="ui segment">
|
||||||
|
{{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }}
|
||||||
|
{{ $g := or $d.clan.Int -1 }}
|
||||||
|
{{ if $d }}
|
||||||
|
<font size="6">Clan Settings</font>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="ui center aligned segment">
|
||||||
|
{{ $o := (.Get "clans/isclan?uid=%d" .Context.User.ID).clan.clan }}
|
||||||
|
{{ $c := qb "SELECT * FROM clans WHERE id = ? LIMIT 1" $o }}
|
||||||
|
{{ $tag := or $c.tag.String "" }}
|
||||||
|
{{ $desc := or $c.description.String "" }}
|
||||||
|
{{ $icon := or $c.icon.String "" }}
|
||||||
|
{{ $bg := or $c.background.String "" }}
|
||||||
|
<form id="register-form" class="ui form" method="post" action="/settings/clansettings">
|
||||||
|
<div class="field">
|
||||||
|
<label class="left aligned">{{ "Clantag (2 to 6 characters)" }}</label>
|
||||||
|
<input tabindex="1" type="text" name="tag" placeholder="{{ "Clantag" }}" value="{{ $tag }}" pattern="{2,6}$">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="left aligned">{{ "Description (optional)" }}</label>
|
||||||
|
<input tabindex="2" type="text" name="password" placeholder="{{ "Description" }}" value="{{ $desc }}">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="left aligned">{{ "Icon [URL] (optional)" }}</label>
|
||||||
|
<input tabindex="3" type="url" name="email" placeholder="{{ "Icon URL" }}" value="{{ $icon }}">
|
||||||
|
</div>
|
||||||
|
{{ if has .Context.User.Privileges 8388612 }}
|
||||||
|
<div class="field">
|
||||||
|
<label class="left aligned">{{ "Background [URL] (optional)" }}</label>
|
||||||
|
<input tabindex="4" type="url" name="bg" placeholder="{{ "Background URL" }}" value="{{ $bg }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
{{ ieForm .Gin }}
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<button tabindex="5" class="ui primary button" type="submit" form="register-form">{{ .T "Save" }}</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<font size="6">Invite</font>
|
||||||
|
<br>
|
||||||
|
<br><center><div class="ui two item menu" id="join-menu">
|
||||||
|
{{ with .Get "clans/getinvite?id=%d" .Context.User.ID }}
|
||||||
|
<input class="item" type="text" value="https://yozora.pw/clans/invite/{{ .invite }}" href="https://yozora.pw/clans/invite/{{ .invite }}" style="background-color:rgba(0,0,0,.6)" disabled></input>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<br><form action="/settings/clansettings" method="POST">
|
||||||
|
{{ ieForm .Gin }}
|
||||||
|
<button type="submit" class="ui right green button">
|
||||||
|
{{ .T "Generate a new invite!" }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
<font size="6">Members {{ $g }}</font>
|
||||||
|
<br>
|
||||||
|
{{ range (.Get "clans/members?id=%d&r=%d" $g 1).members }}
|
||||||
|
<form id="kick-form" class="ui form" method="post" action="/settings/clansettings/k">
|
||||||
|
<div class="column">
|
||||||
|
<div class="ui left aligned fluid card">
|
||||||
|
<div class="content">
|
||||||
|
<a href="/u/{{ .id }}"><a class="header" href="/u/{{ .id }}">{{ country .country false }}{{ .username }}</a> <button name="member" value="{{ .id }}" class="ui right green button" style="float:right; display:block; margin-right:0px; clear:left; width: 40%;"> Kick </button></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
<font size="3">You haven't joined a clan yet, or you aren't the owner of your current one.</font>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user