aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
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}}