aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-01-23 17:11:57 -0500
committerThedro Neely <thedroneely@gmail.com>2020-01-23 17:11:57 -0500
commit9a12f678556ef05c3f1af8a222690ee0ade88296 (patch)
tree0e5fb85e9ea0a57341b50e78a3aa725f5be8f62b /templates/repo/header.tmpl
parent8c3b8cbe895be54afdb880e26643a0cf8b0a3c64 (diff)
downloadgitea-templates-9a12f678556ef05c3f1af8a222690ee0ade88296.tar.gz
gitea-templates-9a12f678556ef05c3f1af8a222690ee0ade88296.tar.bz2
gitea-templates-9a12f678556ef05c3f1af8a222690ee0ade88296.zip
templates/repo/header: Move topics editor to header
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r--templates/repo/header.tmpl23
1 files changed, 20 insertions, 3 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index fb48ce3..f79a538 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -55,13 +55,30 @@
</div>
</div>
-
- <div class="ui" id="repo-topics">
+ <div class="ui repo-topics-custom" id="repo-topics">
{{range $.Topics}}<a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
{{if and $.Permission.IsAdmin (not .IsArchived)}}<a id="manage_topic">{{$.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
</div>
-
+ {{if and $.Permission.IsAdmin (not .IsArchived)}}
+ <div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
+ <div class="fourteen wide column">
+ <div class="field">
+ <div class="ui fluid multiple search selection dropdown">
+ <input type="hidden" name="topics" value="{{range $i, $v := $.Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
+ {{range $.Topics}}
+ <div class="ui small label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important; cursor: default;">{{.Name}}<i class="delete icon"></i></div>
+ {{end}}
+ <div class="text"></div>
+ </div>
+ </div>
+ </div>
+ <div class="two wide column">
+ <a class="ui button primary" href="javascript:;" id="save_topic"
+ data-link="{{$.RepoLink}}/topics">{{$.i18n.Tr "repo.topic.done"}}</a>
+ </div>
+ </div>
+ {{end}}
</div><!-- end container -->
{{end}}