189 lines
6.2 KiB
Go HTML Template
189 lines
6.2 KiB
Go HTML Template
<div class="issue-content-right ui segment">
|
|
{{template "repo/issue/view_content/sidebar/branch_selector_field" .}}
|
|
{{if .Issue.IsPull}}
|
|
{{template "repo/issue/view_content/sidebar/pull_review" .}}
|
|
{{template "repo/issue/view_content/sidebar/pull_wip" .}}
|
|
<div class="divider"></div>
|
|
{{end}}
|
|
|
|
{{template "repo/issue/labels/labels_selector_field" .}}
|
|
{{template "repo/issue/labels/labels_sidebar" dict "root" $}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/view_content/sidebar/milestones" .}}
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/view_content/sidebar/projects" .}}
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/view_content/sidebar/assignees" .}}
|
|
<div class="divider"></div>
|
|
|
|
{{if .Participants}}
|
|
{{template "repo/issue/view_content/sidebar/participants" .}}
|
|
{{end}}
|
|
|
|
{{if and $.IssueWatch (not .Repository.IsArchived)}}
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/view_content/sidebar/watch" .}}
|
|
{{end}}
|
|
|
|
{{if .Repository.IsTimetrackerEnabled $.Context}}
|
|
{{template "repo/issue/view_content/sidebar/timetracking" .}}
|
|
{{end}}
|
|
|
|
<div class="divider"></div>
|
|
{{template "repo/issue/view_content/sidebar/due_deadline" .}}
|
|
|
|
{{if .Repository.IsDependenciesEnabled $.Context}}
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/view_content/sidebar/dependencies" .}}
|
|
{{end}}
|
|
|
|
<div class="divider"></div>
|
|
<div class="ui equal width compact grid">
|
|
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
|
|
<div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
|
|
<span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
|
|
<button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
|
|
</div>
|
|
</div>
|
|
|
|
{{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" 16 "tw-mr-2"}}
|
|
{{ctx.Locale.Tr "pin"}}
|
|
{{else}}
|
|
{{svg "octicon-pin-slash" 16 "tw-mr-2"}}
|
|
{{ctx.Locale.Tr "unpin"}}
|
|
{{end}}
|
|
</button>
|
|
</form>
|
|
{{end}}
|
|
|
|
<button class="tw-mt-1 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{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}}
|
|
|
|
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
|
|
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
|
|
<div class="divider"></div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
|
|
data-url="{{.Issue.Link}}"
|
|
data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
|
|
data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
|
|
>
|
|
<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
|
|
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|