summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-19 21:55:25 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-19 21:55:25 +0800
commit342baf1ddaa9beb6d856c8f9725093cbbe5d80ac (patch)
treeedb13923946c181d9f7aede6daee2965b8e9fe47 /templates
parentfdc6b64f15cd4467ddf7d4d54db0f1867d9d6a46 (diff)
downloadgitea-342baf1ddaa9beb6d856c8f9725093cbbe5d80ac.tar.gz
gitea-342baf1ddaa9beb6d856c8f9725093cbbe5d80ac.zip
add label edit and manage ui
Diffstat (limited to 'templates')
-rw-r--r--templates/issue/list.tmpl31
1 files changed, 27 insertions, 4 deletions
diff --git a/templates/issue/list.tmpl b/templates/issue/list.tmpl
index 480e047b85..edf855932d 100644
--- a/templates/issue/list.tmpl
+++ b/templates/issue/list.tmpl
@@ -15,19 +15,39 @@
</div>
<div class="label-filter">
<h4>Label</h4>
- <ul class="list-unstyled">
+ <ul class="list-unstyled" id="label-list" data-ajax="/{url}">
{{range .Labels}}
- <li><a href="#"><span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span><span class="color" style="background-color: {{.Color}}"></span>{{.Name}}</a></li>
+ <li class="label-item" id="label-{{.Id}}" data-id="{{.Id}}"><a href="#">
+ <span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span>
+ <span class="color" style="background-color: {{.Color}}" data-color="{{.Color}}"></span>
+ <span class="name">{{.Name}}</span>
+ </a>
+ <a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a>
+ </li>
{{end}}
+ <li class="label-change-li" style="display: none">
+ <form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="input-group label-change-color-picker form-group" style="margin-bottom: 2px">
+ <input type="text" class="form-control" name="title" required="required" id="label-name-change-ipt"/>
+ <input type="hidden" name="color" id="label-color-change-ipt" value="#444444"/>
+ <span class="input-group-addon"><i></i></span>
+ <input type="hidden" name="id" id="label-change-id-ipt" value="0"/>
+ </div>
+ <div class="form-group text-right">
+ <button class="btn btn-default btn-sm">Save</button>
+ </div>
+ </form>
+ </li>
</ul>
- <button class="btn btn-default btn-block label-button">Manage Labels</button>
+ <button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button>
<hr/>
<form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post">
{{.CsrfTokenHtml}}
<h5><strong>New Label</strong></h5>
<div class="input-group label-color-picker form-group">
<input type="text" class="form-control" name="title" required="required" id="label-name-ipt"/>
- <input type="hidden" name="color" id="label-color-ipt"/>
+ <input type="hidden" name="color" id="label-color-ipt" value="#444444"/>
<span class="input-group-addon"><i></i></span>
</div>
<div class="form-group text-right">
@@ -68,6 +88,9 @@
$('.label-color-picker').colorpicker({
input:$('#label-color-ipt')
});
+ $('.label-change-color-picker').colorpicker({
+ input:$('#label-color-change-ipt')
+ });
});
</script>
{{template "base/footer" .}}