aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-03-25 16:59:52 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2023-03-25 17:00:57 +0300
commit2a0e925f925c6eca8f564e5dc77343345715da58 (patch)
treee5bc2869fb62db68988e9db29448e5d9f7a14680 /web
parentbump to v1.0.2 (diff)
downloadsoko-2a0e925f925c6eca8f564e5dc77343345715da58.tar.gz
soko-2a0e925f925c6eca8f564e5dc77343345715da58.tar.bz2
soko-2a0e925f925c6eca8f564e5dc77343345715da58.zip
useflags: add new page for all USE expands
A new page at `/useflags/expand` for showing all USE expands. Closes: https://bugs.gentoo.org/902549 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r--web/templates/useflags/browseuseflagsheader.tmpl2
-rw-r--r--web/templates/useflags/listexpand.tmpl58
2 files changed, 59 insertions, 1 deletions
diff --git a/web/templates/useflags/browseuseflagsheader.tmpl b/web/templates/useflags/browseuseflagsheader.tmpl
index fd26f82..65bcaf0 100644
--- a/web/templates/useflags/browseuseflagsheader.tmpl
+++ b/web/templates/useflags/browseuseflagsheader.tmpl
@@ -22,7 +22,7 @@
<a class="nav-link {{if eq .Page "search"}}active{{end}}" href="/useflags/search"><i class="fa fa-search mr-1" aria-hidden="true"></i> Search</a>
<a class="nav-link {{if eq .Page "global"}}active{{end}}" href="/useflags/global"><i class="fa fa-globe mr-1" aria-hidden="true"></i> Global</a>
<a class="nav-link {{if eq .Page "local"}}active{{end}}" href="/useflags/local"><i class="fa fa-map-marker mr-1" aria-hidden="true"></i> Local</a>
-
+ <a class="nav-link {{if eq .Page "expand"}}active{{end}}" href="/useflags/expand"><i class="fa fa-list mr-1" aria-hidden="true"></i> USE Expand</a>
</nav>
</div>
</div>
diff --git a/web/templates/useflags/listexpand.tmpl b/web/templates/useflags/listexpand.tmpl
new file mode 100644
index 0000000..e3068cf
--- /dev/null
+++ b/web/templates/useflags/listexpand.tmpl
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html lang="en">
+{{template "head" .Header}}
+<body>
+{{- template "header" .Header -}}
+
+{{- template "browseuseflagsheader" . -}}
+
+<div class="tab-content" id="myTabContent">
+<div class="container mb-5">
+ <div class="row">
+ <div class="col-12">
+ <div class="row">
+ <div class="col-md-9">
+ {{if .Useflags}}
+ {{- $group := (index .Useflags 0).UseExpand -}}
+ <h3 id="{{$group}}">{{$group}}</h3>
+ <div class="card border-0">
+ <div class="list-group">
+ {{- range .Useflags -}}
+ {{- if ne $group .UseExpand -}}
+ {{- $group = .UseExpand }}
+ </div>
+ </div>
+ <h3 class="mt-4" id="{{$group}}">{{$group}}</h3>
+ <div class="card border-0">
+ <div class="list-group">
+ {{- end }}
+ <a class="list-group-item list-group-item-action text-dark" href="/useflags/{{.Name}}">
+ <h3 class="kk-search-result-header">{{.Name}}</h3>
+ {{.Description}}
+ </a>
+ {{- end -}}
+ </div>
+ </div>
+ {{- end -}}
+ </div>
+ <div class="col-md-3">
+ <dl>
+ <dd class="ml-3 mb-0">
+ {{- $group := "" -}}
+ {{- range .Useflags -}}
+ {{- if ne $group .UseExpand -}}
+ {{- $group = .UseExpand -}}
+ <a href="#{{$group}}" class="text-muted">{{$group}}</a><br>
+ {{- end -}}
+ {{- end -}}
+ </dd>
+ </dl>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+</div>
+{{template "footer" .Application }}
+</body>
+</html>