aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/templates/packages/useflag.tmpl')
-rw-r--r--web/templates/packages/useflag.tmpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/templates/packages/useflag.tmpl b/web/templates/packages/useflag.tmpl
index db4bf07..a1940e1 100644
--- a/web/templates/packages/useflag.tmpl
+++ b/web/templates/packages/useflag.tmpl
@@ -26,14 +26,15 @@
{{ if .UseExpands }}
- <!-- TODO group by -->
- <span class="kk-useflag-group">{{ (index .UseExpands 0).UseExpand}} (Use Expand)</span>
- <ul class="kk-useflag-container {{ if ge (len .UseExpands) 10 }}kk-useflag-container-many{{else}}kk-useflag-container-few{{end}}">
- {{range .UseExpands}}
+ {{range $key, $flags := .UseExpands}}
+ <span class="kk-useflag-group">{{ $key }} (Use Expand)</span>
+ <ul class="kk-useflag-container {{ if ge (len $flags) 10 }}kk-useflag-container-many{{else}}kk-useflag-container-few{{end}}">
+ {{range $flags}}
<li class="kk-useflag">
<a title="{{.Description}}" data-toggle="tooltip" href="/useflags/{{.Name}}">{{ replaceall .Name (print .UseExpand "_") "" }}</a>
</li>
{{end}}
</ul>
+ {{end}}
{{end}}
{{end}}