From 6f0060a56f29d2bbc82e7174a2eb12c06e7ff65f Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 21:53:36 +0000 Subject: [PATCH] revert name change --- templates/clanmembers.html | 2 +- templates/clansample.html | 250 ++++++++++++++++++------------------- 2 files changed, 123 insertions(+), 129 deletions(-) diff --git a/templates/clanmembers.html b/templates/clanmembers.html index e80fc69..215ce3d 100644 --- a/templates/clanmembers.html +++ b/templates/clanmembers.html @@ -1,7 +1,7 @@ {{/*### NoCompile=true */}} -{{ define "clan_members" }} +{{ define "clanMembers" }} { with . }}
{{ $teamJSON := teamJSON }} diff --git a/templates/clansample.html b/templates/clansample.html index 10251e1..c47c9a2 100644 --- a/templates/clansample.html +++ b/templates/clansample.html @@ -1,134 +1,128 @@ {{/*### -Include=clanmembers.html +Include=clan_members.html */}} {{ define "tpl" }} -
-{{ if .ClanID }} -{{ $gqm := .Gin.Query "mode" }} -{{ $global := . }} -{{ $favouritemode := $gqm }} -{{ range (.Get "clans?id=%d" .ClanID).clans }} -
-
- {{ if .icon }} -
- icon +
+ + {{ if .ClanID }} + {{ $gqm := .Gin.Query "mode" }} + {{ $global := . }} + {{ $favouritemode := $gqm }} + {{ range (.Get "clans?id=%d" .ClanID).clans }} +
+
+ {{ if .icon }} +
+ icon +
+ {{ end }} +
+

+ + {{ $global.T "%s" .name | html }} +

+
+ {{ $global.T "(%s)" (.tag | htmlescaper) | html }} +
+
+
+ +
+
+
+
+ + {{ $global.T "%s" (.description | htmlescaper) | html }} + {{ end }} +

+ + {{ with (.Get "clans/stats?id=%d&m=%d" .ClanID (.Gin.Query "mode"))}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{end}} + {{ range (.Get "clans?id=%d" .ClanID).clans }} + +
{{ $global.T "Global Rank" }}#{{ humanize .rank }}
{{ $global.T "PP" }}{{ humanize .chosen_mode.pp }}
{{ $global.T "Ranked Score" }}{{ humanize .chosen_mode.ranked_score }}
{{ $global.T "Total Score" }}{{ humanize .chosen_mode.total_score }}
{{ $global.T "Total Playcount" }}{{ humanize .chosen_mode.playcount }}
{{ $global.T "Total Replays Watched" }}{{ humanize .chosen_mode.replays_watched }}
{{ $global.T "Total Hits" }}{{ humanize .chosen_mode.total_hits }}
{{ end }} +
+
+ {{ if $global.Context.User.ID }} + {{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? LIMIT 1" .Context.User.ID }} + {{ $p := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }} + {{ $tc := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND clan = ? LIMIT 1" .Context.User.ID .ClanID }} + {{ $uc := or $d.clan.Int -1 }} + {{ if $d }} + {{ if $tc }} + {{ if $p }} +
+ {{ ieForm .Gin }} +
+ + {{ else }} +
+ {{ ieForm .Gin }} +
+ + {{ end }} + {{ else }} + + {{end}} + {{ else }} + + {{ end }} + {{ else }} + + + {{ end }} +

{{ .T "Clan Owner" }}

+

+ {{ .T "The leader of the clan." }}
+

+ {{ template "clanMembers" (.Get "clans/members?id=%d&r=%d" .ClanID 8) }} +
+
+
+
+

{{ .T "Members" }}

+

+ {{ .T "The members of the clan." }}
+

+ {{ template "clanMembers" (.Get "clans/members?id=%d&r=%d" .ClanID 1) }} +
+
{{ end }} -
-

- - {{ $global.T "%s" .name | html }} -

-
- {{ $global.T "(%s)" (.tag | htmlescaper) | html }} -
-
-
- -
-
-
-
- - {{ $global.T "%s" (.description | htmlescaper) | html }} - {{ end }} -

- - - {{ with (.Get "clans/stats?id=%d&m=%d" .ClanID (.Gin.Query "mode"))}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{end}} - {{ range (.Get "clans?id=%d" .ClanID).clans }} - -
{{ $global.T "Global Rank" }}#{{ humanize .rank }}
{{ $global.T "PP" }}{{ humanize .chosen_mode.pp }}
{{ $global.T "Ranked Score" }}{{ humanize .chosen_mode.ranked_score }}
{{ $global.T "Total Score" }}{{ humanize .chosen_mode.total_score }}
{{ $global.T "Total Playcount" }}{{ humanize .chosen_mode.playcount }}
{{ $global.T "Total Replays Watched" }}{{ humanize .chosen_mode.replays_watched }}
{{ $global.T "Total Hits" }}{{ humanize .chosen_mode.total_hits }}
{{ end }} -
-
- {{ if $global.Context.User.ID }} - {{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? LIMIT 1" .Context.User.ID }} - {{ $p := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }} - {{ $tc := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND clan = ? LIMIT 1" .Context.User.ID .ClanID }} - {{ $uc := or $d.clan.Int -1 }} - {{ if $d }} - {{ if $tc }} - {{ if $p }} -
- {{ ieForm .Gin }} -
- - {{ else }} -
- {{ ieForm .Gin }} -
- - {{ end }} - {{ else }} - - {{end}} - {{ else }} - - {{ end }} - {{ else }} - - - {{ end }} -

{{ .T "Clan Owner" }}

-

- {{ .T "The leader of the clan." }}
-

- {{ template "clan_members" (.Get "clans/members?id=%d&r=%d" .ClanID 8) }} -
-
-
-
-

{{ .T "Members" }}

-

- {{ .T "The members of the clan." }}
-

- {{ template "clan_members" (.Get "clans/members?id=%d&r=%d" .ClanID 1) }} -
-
- {{ end }} -
-{{ end }} \ No newline at end of file + {{ end }} \ No newline at end of file