0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 16:16:35 -05:00

Merge pull request #297 from nuss-justin/issue/288

Fix issue #288. Only show label form if repository collaborator/admin
This commit is contained in:
无闻 2014-07-22 16:13:22 -04:00
commit 8e4debe99d

View file

@ -26,6 +26,7 @@
<a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a> <a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a>
</li> </li>
{{end}} {{end}}
{{if or .IsRepositoryOwner .IsAdmin}}
<li class="label-change-li" style="display: none"> <li class="label-change-li" style="display: none">
<form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post"> <form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
@ -41,7 +42,9 @@
</div> </div>
</form> </form>
</li> </li>
{{end}}
</ul> </ul>
{{if or .IsRepositoryOwner .IsAdmin}}
<button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button> <button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button>
<hr/> <hr/>
<form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post"> <form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post">
@ -57,6 +60,7 @@
<button class="btn btn-default btn-sm">Create</button> <button class="btn btn-default btn-sm">Create</button>
</div> </div>
</form> </form>
{{end}}
</div> </div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">