mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-27 17:43:41 +01:00
81ac8d914c
Style unification for the issue_management area (consistent across the layout before: ![1732237277916](https://github.com/user-attachments/assets/52a20b2d-d6a4-4118-9cdf-9b377115b7f7) ![1732237288802](https://github.com/user-attachments/assets/05592fe8-cab2-412b-99bc-f0a201c08413) ![1732237299849](https://github.com/user-attachments/assets/8be4a891-c514-4983-bad4-fcc5a7a9d838) after: ![1732237471086](https://github.com/user-attachments/assets/0bd19ef6-79c1-490a-8ffa-6a42208befd9) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
119 lines
3.4 KiB
Handlebars
119 lines
3.4 KiB
Handlebars
{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
|
|
<div class="divider"></div>
|
|
|
|
{{if or .PinEnabled .Issue.IsPinned}}
|
|
<form class="tw-mt-1 form-fetch-action single-button-form" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.max_pinned"}}"{{end}}>
|
|
{{$.CsrfTokenHtml}}
|
|
<button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
|
|
{{if not .Issue.IsPinned}}
|
|
{{svg "octicon-pin"}}
|
|
{{ctx.Locale.Tr "pin"}}
|
|
{{else}}
|
|
{{svg "octicon-pin-slash"}}
|
|
{{ctx.Locale.Tr "unpin"}}
|
|
{{end}}
|
|
</button>
|
|
</form>
|
|
{{end}}
|
|
|
|
<button class="tw-mt-1 fluid ui show-modal button{{if .Issue.IsLocked}} red{{end}}" data-modal="#lock">
|
|
{{if .Issue.IsLocked}}
|
|
{{svg "octicon-key"}}
|
|
{{ctx.Locale.Tr "repo.issues.unlock"}}
|
|
{{else}}
|
|
{{svg "octicon-lock"}}
|
|
{{ctx.Locale.Tr "repo.issues.lock"}}
|
|
{{end}}
|
|
</button>
|
|
<div class="ui tiny modal" id="lock">
|
|
<div class="header">
|
|
{{if .Issue.IsLocked}}
|
|
{{ctx.Locale.Tr "repo.issues.unlock.title"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.issues.lock.title"}}
|
|
{{end}}
|
|
</div>
|
|
<div class="content">
|
|
<div class="ui warning message">
|
|
{{if .Issue.IsLocked}}
|
|
{{ctx.Locale.Tr "repo.issues.unlock.notice_1"}}<br>
|
|
{{ctx.Locale.Tr "repo.issues.unlock.notice_2"}}<br>
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.issues.lock.notice_1"}}<br>
|
|
{{ctx.Locale.Tr "repo.issues.lock.notice_2"}}<br>
|
|
{{ctx.Locale.Tr "repo.issues.lock.notice_3"}}<br>
|
|
{{end}}
|
|
</div>
|
|
|
|
<form class="ui form form-fetch-action" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
|
|
method="post">
|
|
{{.CsrfTokenHtml}}
|
|
|
|
{{if not .Issue.IsLocked}}
|
|
<div class="field">
|
|
<strong> {{ctx.Locale.Tr "repo.issues.lock.reason"}} </strong>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<div class="ui fluid dropdown selection">
|
|
|
|
<select name="reason">
|
|
<option value=""> </option>
|
|
{{range .LockReasons}}
|
|
<option value="{{.}}">{{.}}</option>
|
|
{{end}}
|
|
</select>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
<div class="default text"> </div>
|
|
|
|
<div class="menu">
|
|
{{range .LockReasons}}
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="text right actions">
|
|
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
|
|
<button class="ui red button">
|
|
{{if .Issue.IsLocked}}
|
|
{{ctx.Locale.Tr "repo.issues.unlock_confirm"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.issues.lock_confirm"}}
|
|
{{end}}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<button class="tw-mt-1 fluid ui show-modal button" data-modal="#sidebar-delete-issue">
|
|
{{svg "octicon-trash"}}
|
|
{{ctx.Locale.Tr "repo.issues.delete"}}
|
|
</button>
|
|
<div class="ui g-modal-confirm modal" id="sidebar-delete-issue">
|
|
<div class="header">
|
|
{{if .Issue.IsPull}}
|
|
{{ctx.Locale.Tr "repo.pulls.delete.title"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.issues.delete.title"}}
|
|
{{end}}
|
|
</div>
|
|
<div class="content">
|
|
<p>
|
|
{{if .Issue.IsPull}}
|
|
{{ctx.Locale.Tr "repo.pulls.delete.text"}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.issues.delete.text"}}
|
|
{{end}}
|
|
</p>
|
|
</div>
|
|
<form action="{{.Issue.Link}}/delete" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</div>
|
|
{{end}}
|