123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691 |
- <div class="issue-content-right ui segment">
- {{template "repo/issue/branch_selector_field" .}}
- {{if .Issue.IsPull}}
- <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}">
- <div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown">
- <a class="text tw-flex tw-items-center muted">
- <strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong>
- {{if and .CanChooseReviewer (not .Repository.IsArchived)}}
- {{svg "octicon-gear" 16 "tw-ml-1"}}
- {{end}}
- </a>
- <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
- {{if .Reviewers}}
- <div class="ui icon search input">
- <i class="icon">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_reviewers"}}">
- </div>
- {{end}}
- {{if .Reviewers}}
- {{range .Reviewers}}
- {{if .User}}
- <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
- <span class="octicon-check {{if not .Checked}}tw-invisible{{end}}">{{svg "octicon-check"}}</span>
- <span class="text">
- {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{template "repo/search_name" .User}}
- </span>
- </a>
- {{end}}
- {{end}}
- {{end}}
- {{if .TeamReviewers}}
- {{if .Reviewers}}
- <div class="divider"></div>
- {{end}}
- {{range .TeamReviewers}}
- {{if .Team}}
- <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
- <span class="octicon-check {{if not .Checked}}tw-invisible{{end}}">{{svg "octicon-check" 16}}</span>
- <span class="text">
- {{svg "octicon-people" 16 "tw-ml-4 tw-mr-1"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}
- </span>
- </a>
- {{end}}
- {{end}}
- {{end}}
- </div>
- </div>
-
- <div class="ui assignees list">
- <span class="no-select item {{if or .OriginalReviews .PullReviewers}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
- <div class="selected">
- {{range .PullReviewers}}
- <div class="item tw-flex tw-items-center tw-py-2">
- <div class="tw-flex tw-items-center tw-flex-1">
- {{if .User}}
- <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "tw-mr-2"}}{{.User.GetDisplayName}}</a>
- {{else if .Team}}
- <span class="text">{{svg "octicon-people" 20 "tw-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
- {{end}}
- </div>
- <div class="tw-flex tw-items-center tw-gap-2">
- {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged))}}
- <a href="#" class="ui muted icon tw-flex tw-items-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}">
- {{svg "octicon-x" 20}}
- </a>
- <div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}">
- <div class="header">
- {{ctx.Locale.Tr "repo.issues.dismiss_review"}}
- </div>
- <div class="content">
- <div class="ui warning message">
- {{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
- </div>
- <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post">
- {{$.CsrfTokenHtml}}
- <input type="hidden" name="review_id" value="{{.Review.ID}}">
- <div class="field">
- <label for="message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label>
- <input id="message" name="message">
- </div>
- <div class="text right actions">
- <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
- <button class="ui red button" type="submit">{{ctx.Locale.Tr "ok"}}</button>
- </div>
- </form>
- </div>
- </div>
- {{end}}
- {{if .Review.Stale}}
- <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.is_stale"}}">
- {{svg "octicon-hourglass" 16}}
- </span>
- {{end}}
- {{if and .CanChange (or .Checked (and (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged)))}}
- <a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{ctx.Locale.Tr "repo.issues.remove_request_review"}}{{else}}{{ctx.Locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
- {{end}}
- {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
- </div>
- </div>
- {{end}}
- {{range .OriginalReviews}}
- <div class="item tw-flex tw-items-center tw-py-2">
- <div class="tw-flex tw-items-center tw-flex-1">
- <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}">
- {{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "tw-mr-2"}}
- {{.OriginalAuthor}}
- </a>
- </div>
- <div class="tw-flex tw-items-center tw-gap-2">
- {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
- </div>
- </div>
- {{end}}
- </div>
- </div>
- {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}}
- <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title">
- <a class="muted">
- {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}}
- </a>
- </div>
- {{end}}
- <div class="divider"></div>
- {{end}}
-
- {{template "repo/issue/labels/labels_selector_field" .}}
- {{template "repo/issue/labels/labels_sidebar" dict "root" $}}
-
- <div class="divider"></div>
-
- <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
- <a class="text muted flex-text-block">
- <strong>{{ctx.Locale.Tr "repo.issues.new.milestone"}}</strong>
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
- {{svg "octicon-gear" 16 "tw-ml-1"}}
- {{end}}
- </a>
- <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
- {{template "repo/issue/milestone/select_menu" .}}
- </div>
- </div>
- <div class="ui select-milestone list">
- <span class="no-select item {{if .Issue.Milestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
- <div class="selected">
- {{if .Issue.Milestone}}
- <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
- {{svg "octicon-milestone" 18 "tw-mr-2"}}
- {{.Issue.Milestone.Name}}
- </a>
- {{end}}
- </div>
- </div>
-
- {{if .IsProjectsEnabled}}
- <div class="divider"></div>
-
- <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
- <a class="text muted flex-text-block">
- <strong>{{ctx.Locale.Tr "repo.issues.new.projects"}}</strong>
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
- {{svg "octicon-gear" 16 "tw-ml-1"}}
- {{end}}
- </a>
- <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects">
- {{if or .OpenProjects .ClosedProjects}}
- <div class="ui icon search input">
- <i class="icon">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}">
- </div>
- {{end}}
- <div class="no-select item">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
- {{if .OpenProjects}}
- <div class="divider"></div>
- <div class="header">
- {{ctx.Locale.Tr "repo.issues.new.open_projects"}}
- </div>
- {{range .OpenProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link ctx}}">
- {{svg .IconName 18 "tw-mr-2"}}{{.Title}}
- </a>
- {{end}}
- {{end}}
- {{if .ClosedProjects}}
- <div class="divider"></div>
- <div class="header">
- {{ctx.Locale.Tr "repo.issues.new.closed_projects"}}
- </div>
- {{range .ClosedProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link ctx}}">
- {{svg .IconName 18 "tw-mr-2"}}{{.Title}}
- </a>
- {{end}}
- {{end}}
- </div>
- </div>
- <div class="ui select-project list">
- <span class="no-select item {{if .Issue.Project}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
- <div class="selected">
- {{if .Issue.Project}}
- <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link ctx}}">
- {{svg .Issue.Project.IconName 18 "tw-mr-2"}}{{.Issue.Project.Title}}
- </a>
- {{end}}
- </div>
- </div>
- {{end}}
-
- <div class="divider"></div>
-
- <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
- <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
- <a class="text muted flex-text-block">
- <strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong>
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
- {{svg "octicon-gear" 16 "tw-ml-1"}}
- {{end}}
- </a>
- <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
- <div class="ui icon search input">
- <i class="icon">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
- </div>
- <div class="no-select item">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
- {{range .Assignees}}
-
- {{$AssigneeID := .ID}}
- <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
- {{$checked := false}}
- {{range $.Issue.Assignees}}
- {{if eq .ID $AssigneeID}}
- {{$checked = true}}
- {{end}}
- {{end}}
- <span class="octicon-check {{if not $checked}}tw-invisible{{end}}">{{svg "octicon-check"}}</span>
- <span class="text">
- {{ctx.AvatarUtils.Avatar . 20 "tw-mr-2"}}{{template "repo/search_name" .}}
- </span>
- </a>
- {{end}}
- </div>
- </div>
- <div class="ui assignees list">
- <span class="no-select item {{if .Issue.Assignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
- <div class="selected">
- {{range .Issue.Assignees}}
- <div class="item">
- <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
- {{ctx.AvatarUtils.Avatar . 28 "tw-mr-2"}}
- {{.GetDisplayName}}
- </a>
- </div>
- {{end}}
- </div>
- </div>
-
- <div class="divider"></div>
-
- {{if .Participants}}
- <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
- <div class="ui list tw-flex tw-flex-wrap">
- {{range .Participants}}
- <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}">
- {{ctx.AvatarUtils.Avatar . 28 "tw-my-0.5 tw-mr-1"}}
- </a>
- {{end}}
- </div>
- {{end}}
-
- {{if and $.IssueWatch (not .Repository.IsArchived)}}
- <div class="divider"></div>
-
- <div class="ui watching">
- <span class="text"><strong>{{ctx.Locale.Tr "notification.notifications"}}</strong></span>
- <div class="tw-mt-2">
- {{template "repo/issue/view_content/watching" .}}
- </div>
- </div>
- {{end}}
- {{if .Repository.IsTimetrackerEnabled $.Context}}
- {{if and .CanUseTimetracker (not .Repository.IsArchived)}}
- <div class="divider"></div>
- <div class="ui timetrack">
- <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.tracker"}}</strong></span>
- <div class="tw-mt-2">
- <form method="post" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form">
- {{$.CsrfTokenHtml}}
- </form>
- <form method="post" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form">
- {{$.CsrfTokenHtml}}
- </form>
- {{if $.IsStopwatchRunning}}
- <button class="ui fluid button issue-stop-time">
- {{svg "octicon-stopwatch" 16 "tw-mr-2"}}
- {{ctx.Locale.Tr "repo.issues.stop_tracking"}}
- </button>
- <button class="ui fluid button issue-cancel-time tw-mt-2">
- {{svg "octicon-trash" 16 "tw-mr-2"}}
- {{ctx.Locale.Tr "repo.issues.cancel_tracking"}}
- </button>
- {{else}}
- {{if .HasUserStopwatch}}
- <div class="ui warning message">
- {{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}
- </div>
- {{end}}
- <button class="ui fluid button issue-start-time" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.start_tracking"}}'>
- {{svg "octicon-stopwatch" 16 "tw-mr-2"}}
- {{ctx.Locale.Tr "repo.issues.start_tracking_short"}}
- </button>
- <div class="ui mini modal issue-start-time-modal">
- <div class="header">{{ctx.Locale.Tr "repo.issues.add_time"}}</div>
- <div class="content">
- <form method="post" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui input fluid tw-gap-2">
- {{$.CsrfTokenHtml}}
- <input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours">
- <input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact">
- </form>
- </div>
- <div class="actions">
- <button class="ui primary approve button">{{ctx.Locale.Tr "repo.issues.add_time_short"}}</button>
- <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.add_time_cancel"}}</button>
- </div>
- </div>
- <button class="ui fluid button issue-add-time tw-mt-2" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.add_time"}}'>
- {{svg "octicon-plus" 16 "tw-mr-2"}}
- {{ctx.Locale.Tr "repo.issues.add_time_short"}}
- </button>
- {{end}}
- </div>
- </div>
- {{end}}
- {{if .WorkingUsers}}
- <div class="divider"></div>
- <div class="ui comments">
- <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}}</strong></span>
- <div>
- {{range $user, $trackedtime := .WorkingUsers}}
- <div class="comment tw-mt-2">
- <a class="avatar">
- {{ctx.AvatarUtils.Avatar $user}}
- </a>
- <div class="content">
- {{template "shared/user/authorlink" $user}}
- <div class="text">
- {{$trackedtime|Sec2Time}}
- </div>
- </div>
- </div>
- {{end}}
- </div>
- </div>
- {{end}}
- {{end}}
-
- <div class="divider"></div>
- <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.due_date"}}</strong></span>
- <div class="ui form" id="deadline-loader">
- <div class="ui negative message tw-hidden" id="deadline-err-invalid-date">
- {{svg "octicon-x" 16 "close icon"}}
- {{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
- </div>
- {{if ne .Issue.DeadlineUnix 0}}
- <p>
- <div class="tw-flex tw-justify-between tw-items-center">
- <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
- {{svg "octicon-calendar" 16 "tw-mr-2"}}
- {{DateTime "long" .Issue.DeadlineUnix.FormatDate}}
- </div>
- <div>
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
- <a class="issue-due-edit muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "tw-mr-1"}}</a>
- <a class="issue-due-remove muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a>
- {{end}}
- </div>
- </div>
- </p>
- {{else}}
- <p>{{ctx.Locale.Tr "repo.issues.due_date_not_set"}}</p>
- {{end}}
-
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
- <div {{if ne .Issue.DeadlineUnix 0}} class="tw-hidden"{{end}} id="deadlineForm">
- <form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form">
- {{$.CsrfTokenHtml}}
- <input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}} type="date" name="deadlineDate" id="deadlineDate">
- <button class="ui icon button">
- {{if ne .Issue.DeadlineUnix 0}}
- {{svg "octicon-pencil"}}
- {{else}}
- {{svg "octicon-plus"}}
- {{end}}
- </button>
- </form>
- </div>
- {{end}}
- </div>
-
- {{if .Repository.IsDependenciesEnabled $.Context}}
- <div class="divider"></div>
-
- <div class="ui depending">
- {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}}
- <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.dependency.title"}}</strong></span>
- <br>
- <p>
- {{if .Issue.IsPull}}
- {{ctx.Locale.Tr "repo.issues.dependency.pr_no_dependencies"}}
- {{else}}
- {{ctx.Locale.Tr "repo.issues.dependency.issue_no_dependencies"}}
- {{end}}
- </p>
- {{end}}
-
- {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}}
- <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}">
- <strong>{{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}</strong>
- </span>
- <div class="ui relaxed divided list">
- {{range .BlockingDependencies}}
- <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
- <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
- <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
- #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
- </a>
- <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
- {{.Repository.OwnerName}}/{{.Repository.Name}}
- </div>
- </div>
- <div class="item-right tw-flex tw-items-center tw-m-1">
- {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
- <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
- {{svg "octicon-trash" 16}}
- </a>
- {{end}}
- </div>
- </div>
- {{end}}
- {{if .BlockingDependenciesNotPermitted}}
- <div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
- <span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span>
- </div>
- {{end}}
- </div>
- {{end}}
-
- {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}}
- <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}">
- <strong>{{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong>
- </span>
- <div class="ui relaxed divided list">
- {{range .BlockedByDependencies}}
- <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
- <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
- <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
- #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
- </a>
- <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
- {{.Repository.OwnerName}}/{{.Repository.Name}}
- </div>
- </div>
- <div class="item-right tw-flex tw-items-center tw-m-1">
- {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
- <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
- {{svg "octicon-trash" 16}}
- </a>
- {{end}}
- </div>
- </div>
- {{end}}
- {{if $.CanCreateIssueDependencies}}
- {{range .BlockedByDependenciesNotPermitted}}
- <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
- <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
- <div class="gt-ellipsis">
- <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span>
- <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
- #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
- </span>
- </div>
- <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
- {{.Repository.OwnerName}}/{{.Repository.Name}}
- </div>
- </div>
- <div class="item-right tw-flex tw-items-center tw-m-1">
- {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
- <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
- {{svg "octicon-trash" 16}}
- </a>
- {{end}}
- </div>
- </div>
- {{end}}
- {{else if .BlockedByDependenciesNotPermitted}}
- <div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
- <span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span>
- </div>
- {{end}}
- </div>
- {{end}}
-
- {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
- <div>
- <form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm">
- {{$.CsrfTokenHtml}}
- <div class="ui fluid action input">
- <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}">
- <input name="newDependency" type="hidden">
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- <input type="text" class="search">
- <div class="default text">{{ctx.Locale.Tr "repo.issues.dependency.add"}}</div>
- </div>
- <button class="ui icon button">
- {{svg "octicon-plus"}}
- </button>
- </div>
- </form>
- </div>
- {{end}}
- </div>
-
- {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
- <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}">
-
- <div class="ui g-modal-confirm modal remove-dependency">
- <div class="header">
- {{svg "octicon-trash"}}
- {{ctx.Locale.Tr "repo.issues.dependency.remove_header"}}
- </div>
- <div class="content">
- <form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm">
- {{$.CsrfTokenHtml}}
- <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID">
- <input type="hidden" value="" name="dependencyType" id="dependencyType">
- </form>
- <p>{{if .Issue.IsPull}}
- {{ctx.Locale.Tr "repo.issues.dependency.pr_remove_text"}}
- {{else}}
- {{ctx.Locale.Tr "repo.issues.dependency.issue_remove_text"}}
- {{end}}</p>
- </div>
- {{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}}
- {{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}}
- {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}}
- </div>
- {{end}}
- {{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" 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>
|