summaryrefslogtreecommitdiffstats
path: root/templates/shared/label_filter.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/shared/label_filter.tmpl
parentInitial commit. (diff)
downloadforgejo-upstream.tar.xz
forgejo-upstream.zip
Adding upstream version 9.0.0.upstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/shared/label_filter.tmpl')
-rw-r--r--templates/shared/label_filter.tmpl50
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/shared/label_filter.tmpl b/templates/shared/label_filter.tmpl
new file mode 100644
index 0000000..2269271
--- /dev/null
+++ b/templates/shared/label_filter.tmpl
@@ -0,0 +1,50 @@
+<!-- Label -->
+<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
+ <span class="text">
+ {{ctx.Locale.Tr "repo.issues.filter_label"}}
+ </span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_label"}}">
+ </div>
+ <div class="ui checkbox compact archived-label-filter">
+ <input name="archived" type="checkbox"
+ id="archived-filter-checkbox"
+ {{if .ShowArchivedLabels}}checked{{end}}
+ >
+ <label for="archived-filter-checkbox">
+ {{ctx.Locale.Tr "repo.issues.label_archived_filter"}}
+ <i class="tw-ml-1" data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}>
+ {{svg "octicon-info"}}
+ </i>
+ </label>
+ </div>
+ <span class="info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span>
+ <div class="divider"></div>
+ <a rel="nofollow" class="{{if .AllLabels}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
+ <a rel="nofollow" class="{{if .NoLabel}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
+ {{$previousExclusiveScope := "_no_scope"}}
+ {{range .Labels}}
+ {{$exclusiveScope := .ExclusiveScope}}
+ {{if and (ne $previousExclusiveScope $exclusiveScope)}}
+ <div class="divider"></div>
+ {{end}}
+ {{$previousExclusiveScope = $exclusiveScope}}
+ <a rel="nofollow" class="item label-filter-item tw-flex tw-items-center" {{if .IsArchived}}data-is-archived{{end}} href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&labels={{.QueryString}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}&fuzzy={{$.IsFuzzy}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}">
+ {{if .IsExcluded}}
+ {{svg "octicon-circle-slash"}}
+ {{else if .IsSelected}}
+ {{if $exclusiveScope}}
+ {{svg "octicon-dot-fill"}}
+ {{else}}
+ {{svg "octicon-check"}}
+ {{end}}
+ {{end}}
+ {{RenderLabel $.Context ctx.Locale .}}
+ <p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
+ </a>
+ {{end}}
+ </div>
+</div>