2015-07-24 09:02:49 -04:00
|
|
|
{{template "base/head" .}}
|
|
|
|
<div class="repository labels">
|
|
|
|
{{template "repo/header" .}}
|
2015-08-09 10:45:38 -04:00
|
|
|
<div class="ui container">
|
2015-07-24 09:02:49 -04:00
|
|
|
<div class="navbar">
|
|
|
|
{{template "repo/issue/navbar" .}}
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if .IsRepositoryWriter}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui right">
|
|
|
|
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
|
|
|
|
</div>
|
2015-08-09 10:45:38 -04:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="ui new-label segment hide">
|
|
|
|
<form class="ui form" action="{{$.RepoLink}}/labels/new" method="post">
|
2015-07-24 09:02:49 -04:00
|
|
|
{{.CsrfTokenHtml}}
|
2015-08-09 10:45:38 -04:00
|
|
|
<div class="ui grid">
|
|
|
|
<div class="five wide column">
|
|
|
|
<div class="ui small input">
|
2015-12-07 17:30:52 -05:00
|
|
|
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
2015-07-24 09:02:49 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-09 10:45:38 -04:00
|
|
|
<div class="color picker column">
|
2015-12-07 17:30:52 -05:00
|
|
|
<input class="color-picker" name="color" value="#70c24a" required>
|
2015-07-24 09:02:49 -04:00
|
|
|
</div>
|
2015-08-09 10:45:38 -04:00
|
|
|
<div class="column precolors">
|
2015-07-24 11:13:42 -04:00
|
|
|
{{template "repo/issue/label_precolors"}}
|
2015-07-24 09:02:49 -04:00
|
|
|
</div>
|
2015-08-09 10:45:38 -04:00
|
|
|
<div class="buttons">
|
|
|
|
<div class="ui blue small basic cancel button">{{.i18n.Tr "repo.milestones.cancel"}}</div>
|
|
|
|
<button class="ui green small button">{{.i18n.Tr "repo.issues.create_label"}}</button>
|
|
|
|
</div>
|
2015-07-24 09:02:49 -04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="ui divider"></div>
|
2016-08-29 22:02:49 -04:00
|
|
|
|
2015-08-09 10:45:38 -04:00
|
|
|
{{template "base/alert" .}}
|
|
|
|
<div class="ui black label">{{.i18n.Tr "repo.issues.label_count" .NumLabels}}</div>
|
2016-08-29 23:00:06 -04:00
|
|
|
<div class="label list">
|
|
|
|
{{if and $.IsRepositoryWriter (eq .NumLabels 0)}}
|
2016-08-29 22:02:49 -04:00
|
|
|
<div class="ui centered grid">
|
|
|
|
<div class="twelve wide column eight wide computer column">
|
2016-08-29 23:00:06 -04:00
|
|
|
<div class="ui attached left aligned segment">
|
2016-08-29 22:02:49 -04:00
|
|
|
<h4 class="ui header">
|
|
|
|
{{.i18n.Tr "repo.issues.label_templates.title"}}
|
|
|
|
<a target="_blank"
|
2016-08-29 23:00:06 -04:00
|
|
|
href="https://discuss.gogs.io/t/how-to-use-predefined-label-templates/599">
|
2016-08-29 22:02:49 -04:00
|
|
|
<span class="octicon octicon-question"></span>
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
<p>{{.i18n.Tr "repo.issues.label_templates.info"}}</p>
|
|
|
|
<br/>
|
|
|
|
<form class="ui form center" action="{{.Link}}/initialize" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui selection dropdown">
|
2016-08-29 23:00:06 -04:00
|
|
|
<input type="hidden" name="template_name" value="Default">
|
2016-08-29 22:02:49 -04:00
|
|
|
<div class="default text">{{.i18n.Tr "repo.issues.label_templates.helper"}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .LabelTemplates}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button type="submit" class="ui blue button">{{.i18n.Tr "repo.issues.label_templates.use"}}</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-07-24 09:02:49 -04:00
|
|
|
|
2015-08-09 10:45:38 -04:00
|
|
|
{{range .Labels}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<li class="item">
|
2016-02-27 07:59:11 -05:00
|
|
|
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if $.IsRepositoryWriter}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<a class="ui right delete-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
|
|
|
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
|
|
|
{{end}}
|
|
|
|
<a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
|
|
|
|
</li>
|
2015-08-09 10:45:38 -04:00
|
|
|
{{end}}
|
2015-07-24 09:02:49 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-24 11:13:42 -04:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if .IsRepositoryWriter}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui small basic delete modal">
|
|
|
|
<div class="ui icon header">
|
|
|
|
<i class="trash icon"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.label_deletion"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
|
|
|
|
</div>
|
|
|
|
<div class="actions">
|
|
|
|
<div class="ui red basic inverted cancel button">
|
|
|
|
<i class="remove icon"></i>
|
|
|
|
{{.i18n.Tr "modal.no"}}
|
|
|
|
</div>
|
|
|
|
<div class="ui green basic inverted ok button">
|
|
|
|
<i class="checkmark icon"></i>
|
|
|
|
{{.i18n.Tr "modal.yes"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-24 11:13:42 -04:00
|
|
|
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui small edit-label modal">
|
|
|
|
<div class="header">
|
|
|
|
{{.i18n.Tr "repo.issues.label_modify"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input id="label-modal-id" name="id" type="hidden">
|
|
|
|
<div class="ui grid">
|
|
|
|
<div class="five wide column">
|
|
|
|
<div class="ui small input">
|
|
|
|
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="color picker column">
|
|
|
|
<input class="color-picker" name="color" value="#70c24a" required>
|
|
|
|
</div>
|
|
|
|
<div class="column precolors">
|
|
|
|
{{template "repo/issue/label_precolors"}}
|
2015-08-09 10:45:38 -04:00
|
|
|
</div>
|
2015-07-24 11:13:42 -04:00
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="actions">
|
|
|
|
<div class="ui negative button">
|
|
|
|
{{.i18n.Tr "modal.no"}}
|
2015-07-24 11:13:42 -04:00
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui positive right labeled icon button">
|
|
|
|
{{.i18n.Tr "modal.modify"}}
|
|
|
|
<i class="checkmark icon"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-24 11:13:42 -04:00
|
|
|
{{end}}
|
2015-12-07 17:30:52 -05:00
|
|
|
{{template "base/footer" .}}
|