2017-03-17 06:57:43 +01:00
<div class="four wide column">
<div class="ui segment metas">
2017-08-24 14:30:27 +02:00
{{ template "repo/issue/branch_selector_field" . }}
2020-04-07 00:33:34 +08:00
{{ if .Issue .IsPull }}
2021-02-28 15:05:55 +01:00
<input id="reviewer_id" name="reviewer_id" type="hidden" value=" {{ .reviewer_id }} ">
<div class="ui {{ if or ( not .Reviewers ) ( not .CanChooseReviewer ) .Repository .IsArchived }} disabled {{ end }} floating jump select-reviewers-modify dropdown">
2021-05-16 22:18:18 +02:00
<a class="text df ac muted">
2021-02-28 15:05:55 +01:00
<strong> {{ .i18n .Tr "repo.issues.review.reviewers" }} </strong>
{{ if and .CanChooseReviewer ( not .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-gear" 1 6 "ml-2" }}
2021-02-28 15:05:55 +01:00
{{ end }}
2021-05-16 22:18:18 +02:00
</a>
2021-02-28 15:05:55 +01:00
<div class="filter menu" data-action="update" data-issue-id=" {{ $ .Issue .ID }} " data-update-url=" {{ $ .RepoLink }} /issues/request_review">
<div class="header" style="text-transform: none;font-size:16px;"> {{ .i18n .Tr "repo.issues.new.add_reviewer_title" }} </div>
{{ if .Reviewers }}
<div class="ui icon search input">
<i class="icon df ac jc"> {{ svg "octicon-search" 1 6 }} </i>
<input type="text" placeholder=" {{ .i18n .Tr "repo.issues.filter_reviewers" }} ">
</div>
{{ end }}
{{ if .Reviewers }}
{{ range .Reviewers }}
{{ if .User }}
<a class=" {{ if not .CanChange }} ui poping up {{ 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-content=" {{ $ .i18n .Tr "repo.issues.remove_request_review_block" }} " {{ end }} >
<span class="octicon-check {{ if not .Checked }} invisible {{ end }} "> {{ svg "octicon-check" }} </span>
<span class="text">
{{ avatar .User 2 8 "mr-3" }}
{{ .User .GetDisplayName }}
</span>
</a>
{{ end }}
2020-04-07 00:33:34 +08:00
{{ end }}
{{ end }}
2021-02-28 15:05:55 +01:00
{{ if .TeamReviewers }}
<div class="ui divider"></div>
{{ range .TeamReviewers }}
{{ if .Team }}
<a class=" {{ if not .CanChange }} ui poping up {{ 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-content=" {{ $ .i18n .Tr "repo.issues.remove_request_review_block" }} " {{ end }} >
<span class="octicon-check {{ if not .Checked }} invisible {{ end }} "> {{ svg "octicon-check" 1 6 }} </span>
<span class="text">
{{ svg "octicon-people" 1 6 "ml-4 mr-2" }} {{ $ .Issue .Repo .OwnerName }} / {{ .Team .Name }}
</span>
</a>
{{ end }}
2020-10-13 03:55:13 +08:00
{{ end }}
2020-04-07 00:33:34 +08:00
{{ end }}
2021-02-28 15:05:55 +01:00
</div>
2020-04-07 00:33:34 +08:00
</div>
2021-02-28 15:05:55 +01:00
<div class="ui assignees list">
<span class="no-select item {{ if or .OriginalReviews .PullReviewers }} hide {{ end }} "> {{ .i18n .Tr "repo.issues.new.no_reviewers" }} </span>
<div class="selected">
{{ range .PullReviewers }}
<div class="item mb-2">
{{ if .User }}
<a class="muted sidebar-item-link" href=" {{ .User .HomeLink }} ">
{{ avatar .User 2 8 "mr-3" }}
{{ .User .GetDisplayName }}
2020-04-07 00:33:34 +08:00
</a>
2021-02-28 15:05:55 +01:00
{{ else if .Team }}
<span class="text"> {{ svg "octicon-people" 1 6 "teamavatar" }} {{ $ .Issue .Repo .OwnerName }} / {{ .Team .Name }} </span>
2020-04-07 00:33:34 +08:00
{{ end }}
2021-02-28 15:05:55 +01:00
<span class="ui right type-icon text {{ if eq .Review .Type 1 }} green
{{ - else if eq .Review .Type 2 }} grey
{{ - else if eq .Review .Type 3 }} red
{{ - else if eq .Review .Type 4 }} yellow
{{ - else }} grey {{ end }} right ">
{{ if .CanChange }}
<a href="#" class="ui poping up icon re-request-review {{ if .Checked }} checked {{ end }} " data-content=" {{ if .Checked }} {{ $ .i18n .Tr "repo.issues.remove_request_review" }} {{ else }} {{ $ .i18n .Tr "repo.issues.re_request_review" }} {{ end }} " data-issue-id=" {{ $ .Issue .ID }} " data-id=" {{ .ItemID }} " data-update-url=" {{ $ .RepoLink }} /issues/request_review">
2021-03-22 05:04:19 +01:00
{{ if .Checked }} {{ svg "octicon-trash" }} {{ else }} {{ svg "octicon-sync" }} {{ end }}
2021-02-28 15:05:55 +01:00
</a>
{{ end }}
{{ svg ( printf "octicon-%s" .Review .Type .Icon ) }}
</span>
</div>
{{ end }}
{{ range .OriginalReviews }}
<div class="item" style="margin-bottom: 10px;">
<a href=" {{ $ .Repository .OriginalURL }} " class="ui poping up" data-content=" {{ $ .i18n .Tr "repo.migrated_from_fake" $ .Repository .GetOriginalURLHostname | Safe }} "><span class="text black "><i class="fa {{ MigrationIcon $ .Repository .GetOriginalURLHostname }} " aria-hidden="true"></i> {{ .OriginalAuthor }} </span></a>
<span class="ui right type-icon text {{ if eq .Type 1 }} green
{{ - else if eq .Type 2 }} grey
{{ - else if eq .Type 3 }} red
{{ - else if eq .Type 4 }} yellow
{{ - else }} grey {{ end }} right ">
{{ svg ( printf "octicon-%s" .Type .Icon ) }}
</span>
</div>
{{ end }}
</div>
2020-04-07 00:33:34 +08:00
</div>
2021-05-27 22:02:04 +02:00
{{ if and ( or .HasIssuesOrPullsWritePermission .IsIssuePoster ) ( not .HasMerged ) ( not .Issue .IsClosed ) ( not .IsPullWorkInProgress ) }}
<div class="toggle-wip" data-title=" {{ .Issue .Title }} " data-wip-prefix=" {{ ( in dex .PullRequestWorkInProgressPrefixes 0 | Escape ) }} " data-update-url=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /title">
<a class="muted">
{{ .i18n .Tr "repo.pulls.still_in_progress" }} {{ .i18n .Tr "repo.pulls.add_prefix" ( in dex .PullRequestWorkInProgressPrefixes 0 | Escape ) | Safe }}
</a>
</div>
{{ end }}
2021-02-28 15:05:55 +01:00
<div class="ui divider"></div>
2020-06-17 16:12:06 +02:00
{{ end }}
2020-04-07 00:33:34 +08:00
2020-04-04 13:39:48 +08:00
<div class="ui {{ if or ( not .HasIssuesOrPullsWritePermission ) .Repository .IsArchived }} disabled {{ end }} floating jump select-label dropdown">
2021-05-16 22:18:18 +02:00
<a class="text df ac muted">
2017-03-17 06:57:43 +01:00
<strong> {{ .i18n .Tr "repo.issues.new.labels" }} </strong>
2020-04-04 13:39:48 +08:00
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-gear" 1 6 "ml-2" }}
2020-03-18 00:19:03 +08:00
{{ end }}
2021-05-16 22:18:18 +02:00
</a>
2020-02-11 20:40:47 +00:00
<div class="filter menu" data-action="update" data-issue-id=" {{ $ .Issue .ID }} " data-update-url=" {{ $ .RepoLink }} /issues/labels">
2020-04-04 13:39:48 +08:00
<div class="header" style="text-transform: none;font-size:16px;"> {{ .i18n .Tr "repo.issues.new.add_labels_title" }} </div>
{{ if or .Labels .OrgLabels }}
2021-02-28 15:05:55 +01:00
<div class="ui icon search input">
<i class="icon df ac jc"> {{ svg "octicon-search" 1 6 }} </i>
<input type="text" placeholder=" {{ .i18n .Tr "repo.issues.filter_labels" }} ">
</div>
2017-03-17 06:57:43 +01:00
{{ end }}
2020-04-04 13:39:48 +08:00
<div class="no-select item"> {{ .i18n .Tr "repo.issues.new.clear_labels" }} </div>
{{ if or .Labels .OrgLabels }}
{{ range .Labels }}
2020-09-11 22:19:00 +02:00
<a class=" {{ if .IsChecked }} checked {{ end }} item" href="#" data-id=" {{ .ID }} " data-id-selector="#label_ {{ .ID }} "><span class="octicon-check {{ if not .IsChecked }} invisible {{ end }} "> {{ svg "octicon-check" }} </span><span class="label color" style="background-color: {{ .Color }} "></span> {{ .Name | RenderEmoji }}
2020-05-01 13:58:45 -04:00
{{ if .Description }} <br><small class="desc"> {{ .Description | RenderEmoji }} </small> {{ end }} </a>
2020-04-04 13:39:48 +08:00
{{ end }}
<div class="ui divider"></div>
{{ range .OrgLabels }}
2020-09-11 22:19:00 +02:00
<a class=" {{ if .IsChecked }} checked {{ end }} item" href="#" data-id=" {{ .ID }} " data-id-selector="#label_ {{ .ID }} "><span class="octicon-check {{ if not .IsChecked }} invisible {{ end }} "> {{ svg "octicon-check" }} </span><span class="label color" style="background-color: {{ .Color }} "></span> {{ .Name | RenderEmoji }}
2020-05-01 13:58:45 -04:00
{{ if .Description }} <br><small class="desc"> {{ .Description | RenderEmoji }} </small> {{ end }} </a>
2020-04-04 13:39:48 +08:00
{{ end }}
{{ else }}
<div class="header" style="text-transform: none;font-size:14px;"> {{ .i18n .Tr "repo.issues.new.no_items" }} </div>
2020-04-01 00:14:46 -04:00
{{ end }}
2017-03-17 06:57:43 +01:00
</div>
</div>
2020-11-17 06:02:41 +01:00
{{ template "repo/issue/labels/labels_sidebar" dict "root" $ "ctx" . }}
2017-03-17 06:57:43 +01:00
<div class="ui divider"></div>
2020-04-04 13:39:48 +08:00
<div class="ui {{ if or ( not .HasIssuesOrPullsWritePermission ) .Repository .IsArchived }} disabled {{ end }} floating jump select-milestone dropdown">
2021-05-16 22:18:18 +02:00
<a class="text df ac muted">
2017-03-17 06:57:43 +01:00
<strong> {{ .i18n .Tr "repo.issues.new.milestone" }} </strong>
2020-04-04 13:39:48 +08:00
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-gear" 1 6 "ml-2" }}
2020-03-18 00:19:03 +08:00
{{ end }}
2021-05-16 22:18:18 +02:00
</a>
2017-03-17 06:57:43 +01:00
<div class="menu" data-action="update" data-issue-id=" {{ $ .Issue .ID }} " data-update-url=" {{ $ .RepoLink }} /issues/milestone">
2020-04-04 13:39:48 +08:00
<div class="header" style="text-transform: none;font-size:16px;"> {{ .i18n .Tr "repo.issues.new.add_milestone_title" }} </div>
{{ if or .OpenMilestones .ClosedMilestones }}
<div class="ui icon search input">
2020-11-09 19:21:47 +01:00
<i class="icon df ac jc"> {{ svg "octicon-search" 1 6 }} </i>
2020-04-04 13:39:48 +08:00
<input type="text" placeholder=" {{ .i18n .Tr "repo.issues.filter_milestones" }} ">
</div>
{{ end }}
2017-03-17 06:57:43 +01:00
<div class="no-select item"> {{ .i18n .Tr "repo.issues.new.clear_milestone" }} </div>
2020-04-04 13:39:48 +08:00
{{ if and ( not .OpenMilestones ) ( not .ClosedMilestones ) }}
<div class="header" style="text-transform: none;font-size:14px;">
{{ .i18n .Tr "repo.issues.new.no_items" }}
2017-03-17 06:57:43 +01:00
</div>
2020-04-04 13:39:48 +08:00
{{ else }}
{{ if .OpenMilestones }}
<div class="divider"></div>
<div class="header">
{{ .i18n .Tr "repo.issues.new.open_milestone" }}
</div>
{{ range .OpenMilestones }}
2020-11-29 07:22:04 +01:00
<a class="item" data-id=" {{ .ID }} " data-href=" {{ $ .RepoLink }} /issues?milestone= {{ .ID }} ">
{{ svg "octicon-milestone" 1 6 "mr-2" }}
{{ .Name }}
</a>
2020-04-04 13:39:48 +08:00
{{ end }}
2017-03-17 06:57:43 +01:00
{{ end }}
2020-04-04 13:39:48 +08:00
{{ if .ClosedMilestones }}
<div class="divider"></div>
<div class="header">
{{ .i18n .Tr "repo.issues.new.closed_milestone" }}
</div>
{{ range .ClosedMilestones }}
2020-11-29 07:22:04 +01:00
<a class="item" data-id=" {{ .ID }} " data-href=" {{ $ .RepoLink }} /issues?milestone= {{ .ID }} ">
{{ svg "octicon-milestone" 1 6 "mr-2" }}
{{ .Name }}
</a>
2020-04-04 13:39:48 +08:00
{{ end }}
2017-03-17 06:57:43 +01:00
{{ end }}
{{ end }}
</div>
</div>
<div class="ui select-milestone list">
<span class="no-select item {{ if .Issue .Milestone }} hide {{ end }} "> {{ .i18n .Tr "repo.issues.new.no_milestone" }} </span>
<div class="selected">
{{ if .Issue .Milestone }}
2020-11-29 07:22:04 +01:00
<a class="item muted sidebar-item-link" href=" {{ .RepoLink }} /milestone/ {{ .Issue .Milestone .ID }} ">
{{ svg "octicon-milestone" 1 8 "mr-3" }}
{{ .Issue .Milestone .Name }}
</a>
2017-03-17 06:57:43 +01:00
{{ end }}
</div>
</div>
2020-08-17 04:07:38 +01:00
{{ if .IsProjectsEnabled }}
2021-02-28 15:05:55 +01:00
<div class="ui divider"></div>
2020-11-29 07:22:04 +01:00
2021-02-28 15:05:55 +01:00
<div class="ui {{ if or ( not .HasIssuesOrPullsWritePermission ) .Repository .IsArchived }} disabled {{ end }} floating jump select-project dropdown">
2021-05-16 22:18:18 +02:00
<a class="text df ac muted">
2021-02-28 15:05:55 +01:00
<strong> {{ .i18n .Tr "repo.issues.new.projects" }} </strong>
2021-03-12 15:14:02 +00:00
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-gear" 1 6 "ml-2" }}
2021-03-12 15:14:02 +00:00
{{ end }}
2021-05-16 22:18:18 +02:00
</a>
2021-02-28 15:05:55 +01:00
<div class="menu" data-action="update" data-issue-id=" {{ $ .Issue .ID }} " data-update-url=" {{ $ .RepoLink }} /issues/projects">
<div class="no-select item"> {{ .i18n .Tr "repo.issues.new.clear_projects" }} </div>
{{ if .OpenProjects }}
<div class="divider"></div>
<div class="header">
{{ .i18n .Tr "repo.issues.new.open_projects" }}
</div>
{{ range .OpenProjects }}
<a class="item muted sidebar-item-link" data-id=" {{ .ID }} " data-href=" {{ $ .RepoLink }} /projects/ {{ .ID }} ">
{{ svg "octicon-project" 1 8 "mr-3" }}
{{ .Title }}
</a>
{{ end }}
2020-08-17 04:07:38 +01:00
{{ end }}
2021-02-28 15:05:55 +01:00
{{ if .ClosedProjects }}
<div class="divider"></div>
<div class="header">
{{ .i18n .Tr "repo.issues.new.closed_projects" }}
</div>
{{ range .ClosedProjects }}
<a class="item muted sidebar-item-link" data-id=" {{ .ID }} " data-href=" {{ $ .RepoLink }} /projects/ {{ .ID }} ">
{{ svg "octicon-project" 1 8 "mr-3" }}
{{ .Title }}
</a>
{{ end }}
{{ end }}
</div>
</div>
<div class="ui select-project list">
<span class="no-select item {{ if .Issue .ProjectID }} hide {{ end }} "> {{ .i18n .Tr "repo.issues.new.no_projects" }} </span>
<div class="selected">
{{ if .Issue .ProjectID }}
<a class="item muted sidebar-item-link" href=" {{ .RepoLink }} /projects/ {{ .Issue .ProjectID }} ">
2020-11-29 07:22:04 +01:00
{{ svg "octicon-project" 1 8 "mr-3" }}
2021-02-28 15:05:55 +01:00
{{ .Issue .Project .Title }}
2020-11-29 07:22:04 +01:00
</a>
2020-08-17 04:07:38 +01:00
{{ end }}
2021-02-28 15:05:55 +01:00
</div>
2020-08-17 04:07:38 +01:00
</div>
{{ end }}
2017-03-17 06:57:43 +01:00
<div class="ui divider"></div>
<input id="assignee_id" name="assignee_id" type="hidden" value=" {{ .assignee_id }} ">
2020-04-04 13:39:48 +08:00
<div class="ui {{ if or ( not .HasIssuesOrPullsWritePermission ) .Repository .IsArchived }} disabled {{ end }} floating jump select-assignees-modify dropdown">
2021-05-16 22:18:18 +02:00
<a class="text df ac muted">
2018-05-09 18:29:04 +02:00
<strong> {{ .i18n .Tr "repo.issues.new.assignees" }} </strong>
2020-04-04 13:39:48 +08:00
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-gear" 1 6 "ml-2" }}
2020-03-18 00:19:03 +08:00
{{ end }}
2021-05-16 22:18:18 +02:00
</a>
2020-09-03 00:55:13 +08:00
<div class="filter menu" data-action="update" data-issue-id=" {{ $ .Issue .ID }} " data-update-url=" {{ $ .RepoLink }} /issues/assignee">
2020-04-04 13:39:48 +08:00
<div class="header" style="text-transform: none;font-size:16px;"> {{ .i18n .Tr "repo.issues.new.add_assignees_title" }} </div>
<div class="ui icon search input">
2020-11-09 19:21:47 +01:00
<i class="icon df ac jc"> {{ svg "octicon-search" 1 6 }} </i>
2020-04-04 13:39:48 +08:00
<input type="text" placeholder=" {{ .i18n .Tr "repo.issues.filter_assignees" }} ">
</div>
2018-05-09 18:29:04 +02:00
<div class="no-select item"> {{ .i18n .Tr "repo.issues.new.clear_assignees" }} </div>
2017-03-17 06:57:43 +01:00
{{ range .Assignees }}
2018-05-09 18:29:04 +02:00
{{ $ AssigneeID : = .ID }}
2020-11-12 06:55:34 +01:00
<a class="item {{ range $ .Issue .Assignees }} {{ if eq .ID $ AssigneeID }} checked {{ end }} {{ end }} " href="#" data-id=" {{ .ID }} " data-id-selector="#assignee_ {{ .ID }} ">
2020-02-11 11:02:41 -06:00
{{ $ checked : = false }}
{{ range $ .Issue .Assignees }}
{{ if eq .ID $ AssigneeID }}
{{ $ checked = true }}
{{ end }}
2018-05-09 18:29:04 +02:00
{{ end }}
2020-09-11 22:19:00 +02:00
<span class="octicon-check {{ if not $ checked }} invisible {{ end }} "> {{ svg "octicon-check" }} </span>
2018-05-09 18:29:04 +02:00
<span class="text">
2020-12-03 19:46:11 +01:00
{{ avatar . 2 8 "mr-3" }}
2020-11-12 06:55:34 +01:00
{{ .GetDisplayName }}
2018-05-09 18:29:04 +02:00
</span>
</a>
2017-03-17 06:57:43 +01:00
{{ end }}
</div>
</div>
2018-05-09 18:29:04 +02:00
<div class="ui assignees list">
<span class="no-select item {{ if .Issue .Assignees }} hide {{ end }} "> {{ .i18n .Tr "repo.issues.new.no_assignees" }} </span>
2017-03-17 06:57:43 +01:00
<div class="selected">
2018-05-09 18:29:04 +02:00
{{ range .Issue .Assignees }}
2020-11-29 07:22:04 +01:00
<div class="item">
<a class="muted sidebar-item-link" href=" {{ $ .RepoLink }} / {{ if $ .Issue .IsPull }} pulls {{ else }} issues {{ end }} ?assignee= {{ .ID }} ">
2020-12-03 19:46:11 +01:00
{{ avatar . 2 8 "mr-3" }}
2020-11-12 06:55:34 +01:00
{{ .GetDisplayName }}
</a>
2018-05-09 18:29:04 +02:00
</div>
2017-03-17 06:57:43 +01:00
{{ end }}
</div>
</div>
<div class="ui divider"></div>
2020-12-08 04:20:12 +01:00
{{ if .Participants }}
2017-03-17 06:57:43 +01:00
<span class="text"><strong> {{ .i18n .Tr "repo.issues.num_participants" .NumParticipants }} </strong></span>
2020-12-08 04:20:12 +01:00
<div class="ui list df fw">
2017-03-17 06:57:43 +01:00
{{ range .Participants }}
2020-12-08 04:20:12 +01:00
<a class="ui poping up" {{ if gt .ID 0 }} href=" {{ .HomeLink }} " {{ end }} data-content=" {{ .GetDisplayName }} " data-position="top center" data-variation="small inverted">
{{ avatar . 2 8 "my-1 mr-2" }}
2017-03-17 06:57:43 +01:00
</a>
{{ end }}
</div>
2020-12-08 04:20:12 +01:00
{{ end }}
2017-03-29 20:31:47 -03:00
2019-01-23 19:58:38 +01:00
{{ if and $ .IssueWatch ( not .Repository .IsArchived ) }}
2017-09-12 08:48:13 +02:00
<div class="ui divider"></div>
2017-03-29 20:31:47 -03:00
2017-09-12 08:48:13 +02:00
<div class="ui watching">
<span class="text"><strong> {{ .i18n .Tr "notification.notifications" }} </strong></span>
2020-11-01 21:04:26 +01:00
<div class="mt-3">
2017-09-12 08:48:13 +02:00
<form method="POST" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /watch">
<input type="hidden" name="watch" value=" {{ if $ .IssueWatch .IsWatching }} 0 {{ else }} 1 {{ end }} " />
{{ $ .CsrfTokenHtml }}
2021-05-16 22:18:18 +02:00
<button class="fluid ui button df jc">
2017-09-12 08:48:13 +02:00
{{ if $ .IssueWatch .IsWatching }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-mute" 1 6 "mr-3" }}
2017-09-12 08:48:13 +02:00
{{ .i18n .Tr "repo.issues.unsubscribe" }}
{{ else }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-unmute" 1 6 "mr-3" }}
2017-09-12 08:48:13 +02:00
{{ .i18n .Tr "repo.issues.subscribe" }}
{{ end }}
</button>
</form>
</div>
</div>
{{ end }}
{{ if .Repository .IsTimetrackerEnabled }}
2019-01-23 19:58:38 +01:00
{{ if and .CanUseTimetracker ( not .Repository .IsArchived ) }}
2017-09-12 08:48:13 +02:00
<div class="ui divider"></div>
<div class="ui timetrack">
<span class="text"><strong> {{ .i18n .Tr "repo.issues.tracker" }} </strong></span>
2020-12-08 04:20:12 +01:00
<div class="mt-3">
2017-09-12 08:48:13 +02:00
<form method="POST" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /times/stopwatch/toggle" id="toggle_stopwatch_form">
{{ $ .CsrfTokenHtml }}
</form>
<form method="POST" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /times/stopwatch/cancel" id="cancel_stopwatch_form">
{{ $ .CsrfTokenHtml }}
</form>
{{ if $ .IsStopwatchRunning }}
2021-05-16 22:18:18 +02:00
<button class="ui fluid button issue-stop-time"> {{ .i18n .Tr "repo.issues.stop_tracking" }} </button>
<button class="ui fluid negative button issue-cancel-time mt-3"> {{ .i18n .Tr "repo.issues.cancel_tracking" }} </button>
2017-03-29 20:31:47 -03:00
{{ else }}
2017-09-12 08:48:13 +02:00
{{ if .HasUserStopwatch }}
<div class="ui warning message">
{{ .i18n .Tr "repo.issues.tracking_already_started" .OtherStopwatchURL | Safe }}
</div>
{{ end }}
2021-05-16 22:18:18 +02:00
<button class="ui fluid button poping up issue-start-time" data-content=' {{ .i18n .Tr "repo.issues.start_tracking" }} ' data-position="top center" data-variation="small inverted"> {{ .i18n .Tr "repo.issues.start_tracking_short" }} </button>
<div class="ui mini modal issue-start-time-modal">
<div class="header"> {{ .i18n .Tr "repo.issues.add_time" }} </div>
<div class="content">
<form method="POST" id="add_time_manual_form" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /times/add" class="ui action input fluid">
{{ $ .CsrfTokenHtml }}
<input placeholder=' {{ .i18n .Tr "repo.issues.add_time_hours" }} ' type="number" name="hours">
<input placeholder=' {{ .i18n .Tr "repo.issues.add_time_minutes" }} ' type="number" name="minutes" class="ui compact">
</form>
</div>
<div class="actions">
<div class="ui green approve button"> {{ .i18n .Tr "repo.issues.add_time_short" }} </div>
<div class="ui red cancel button"> {{ .i18n .Tr "repo.issues.add_time_cancel" }} </div>
2017-09-12 08:48:13 +02:00
</div>
</div>
2021-05-16 22:18:18 +02:00
<button class="ui fluid button green poping up issue-add-time mt-3" data-content=' {{ .i18n .Tr "repo.issues.add_time" }} ' data-position="top center" data-variation="small inverted"> {{ .i18n .Tr "repo.issues.add_time_short" }} </button>
2017-03-29 20:31:47 -03:00
{{ end }}
2017-09-12 08:48:13 +02:00
</div>
</div>
{{ end }}
{{ if gt ( len .WorkingUsers ) 0 }}
<div class="ui divider"></div>
2020-12-08 04:20:12 +01:00
<div class="ui comments">
2018-04-29 07:58:47 +02:00
<span class="text"><strong> {{ .i18n .Tr "repo.issues.time_spent_from_all_authors" ( $ .Issue .TotalTrackedTime | Sec2Time ) | Safe }} </strong></span>
2017-09-12 08:48:13 +02:00
<div>
{{ range $ user , $ trackedtime : = .WorkingUsers }}
2020-12-08 04:20:12 +01:00
<div class="comment mt-3">
2017-09-12 08:48:13 +02:00
<a class="avatar">
2020-12-03 19:46:11 +01:00
{{ avatar $ user }}
2017-09-12 08:48:13 +02:00
</a>
<div class="content">
<a class="author"> {{ $ user .DisplayName }} </a>
<div class="text">
{{ $ trackedtime }}
</div>
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
2017-04-29 13:52:25 +08:00
{{ end }}
2018-05-01 21:05:28 +02:00
<div class="ui divider"></div>
<span class="text"><strong> {{ .i18n .Tr "repo.issues.due_date" }} </strong></span>
2018-07-16 14:43:00 +02:00
<div class="ui form" id="deadline-loader">
<div class="ui negative message" id="deadline-err-invalid-date" style="display: none;">
2021-05-16 22:18:18 +02:00
{{ svg "octicon-x" 1 6 "close icon" }}
2018-07-16 14:43:00 +02:00
{{ .i18n .Tr "repo.issues.due_date_invalid" }}
</div>
{{ if ne .Issue .DeadlineUnix 0 }}
<p>
2021-05-16 22:18:18 +02:00
<div class="df sb ac">
<div class="due-date poping up {{ if .Issue .IsOverdue }} text red {{ end }} " {{ if .Issue .IsOverdue }} data-content=" {{ .i18n .Tr "repo.issues.due_date_overdue" }} " {{ end }} >
{{ svg "octicon-calendar" 1 6 "mr-3" }}
{{ .Issue .DeadlineUnix .FormatDate }}
</div>
<div>
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
<a class="issue-due-edit poping up muted" data-content=" {{ $ .i18n .Tr "repo.issues.due_date_form_edit" }} "> {{ svg "octicon-pencil" 1 6 "mr-2" }} </a>
<a class="issue-due-remove poping up muted" data-content=" {{ $ .i18n .Tr "repo.issues.due_date_form_remove" }} "> {{ svg "octicon-trash" }} </a>
{{ end }}
</div>
</div>
2018-07-16 14:43:00 +02:00
</p>
{{ else }}
<p><i> {{ .i18n .Tr "repo.issues.due_date_not_set" }} </i></p>
{{ end }}
2018-05-01 21:05:28 +02:00
2020-04-04 13:39:48 +08:00
{{ if and .HasIssuesOrPullsWritePermission ( not .Repository .IsArchived ) }}
2018-07-16 14:43:00 +02:00
<div {{ if ne .Issue .DeadlineUnix 0 }} style="display: none;" {{ end }} id="deadlineForm">
2020-12-10 17:19:18 +01:00
<form class="ui fluid action input issue-due-form" action=" {{ AppSubUrl }} /api/v1/repos/ {{ .Repository .Owner .Name }} / {{ .Repository .Name }} /issues/ {{ .Issue .Index }} " method="post" id="update-issue-deadline-form">
2018-07-16 14:43:00 +02:00
{{ $ .CsrfTokenHtml }}
<input required placeholder=" {{ .i18n .Tr "repo.issues.due_date_form" }} " {{ if gt .Issue .DeadlineUnix 0 }} value=" {{ .Issue .DeadlineUnix .Format "2006-01-02" }} " {{ end }} type="date" name="deadlineDate" id="deadlineDate">
<button class="ui green icon button">
{{ if ne .Issue .DeadlineUnix 0 }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-pencil" }}
2018-07-16 14:43:00 +02:00
{{ else }}
2021-05-16 22:18:18 +02:00
{{ svg "octicon-plus" }}
2018-07-16 14:43:00 +02:00
{{ end }}
</button>
</form>
</div>
{{ end }}
</div>
2018-07-17 23:23:58 +02:00
{{ if .Repository .IsDependenciesEnabled }}
<div class="ui divider"></div>
<div class="ui depending">
2018-09-07 05:32:46 +03:00
{{ if ( and ( not .BlockedByDependencies ) ( not .BlockingDependencies ) ) }}
<span class="text"><strong> {{ .i18n .Tr "repo.issues.dependency.title" }} </strong></span>
<br>
2020-11-10 19:28:07 +01:00
<p>
{{ if .Issue .IsPull }}
2018-09-07 05:32:46 +03:00
{{ .i18n .Tr "repo.issues.dependency.pr_no_dependencies" }}
{{ else }}
{{ .i18n .Tr "repo.issues.dependency.issue_no_dependencies" }}
2020-11-10 19:28:07 +01:00
{{ end }}
</p>
2018-09-07 05:32:46 +03:00
{{ end }}
{{ if .BlockingDependencies }}
2020-11-10 19:28:07 +01:00
<span class="text poping up" data-content=" {{ if .Issue .IsPull }} {{ .i18n .Tr "repo.issues.dependency.pr_close_blocks" }} {{ else }} {{ .i18n .Tr "repo.issues.dependency.issue_close_blocks" }} {{ end }} ">
<strong> {{ .i18n .Tr "repo.issues.dependency.blocks_short" }} </strong>
2018-07-17 23:23:58 +02:00
</span>
<div class="ui relaxed divided list">
2018-09-07 05:32:46 +03:00
{{ range .BlockingDependencies }}
2020-11-14 02:16:46 +01:00
<div class="item dependency {{ if .Issue .IsClosed }} is-closed {{ end }} df ac sb">
2020-11-10 19:28:07 +01:00
<div class="item-left df jc fc f1">
<a class="title" href=" {{ .Repository .Link }} /issues/ {{ .Issue .Index }} ">
# {{ .Issue .Index }} {{ .Issue .Title | RenderEmoji }}
</a>
<div class="text small">
{{ .Repository .OwnerName }} / {{ .Repository .Name }}
</div>
</div>
<div class="item-right df ac">
2019-01-23 19:58:38 +01:00
{{ if and $ .CanCreateIssueDependencies ( not $ .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
<a class="delete-dependency-button poping up ci muted" data-id=" {{ .Issue .ID }} " data-type="blocking" data-content=" {{ $ .i18n .Tr "repo.issues.dependency.remove_info" }} " data-inverted="">
2021-03-22 05:04:19 +01:00
{{ svg "octicon-trash" 1 6 }}
2018-07-17 23:23:58 +02:00
</a>
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}
2018-09-07 05:32:46 +03:00
{{ if .BlockedByDependencies }}
2020-11-10 19:28:07 +01:00
<span class="text poping up" data-content=" {{ if .Issue .IsPull }} {{ .i18n .Tr "repo.issues.dependency.pr_closing_blockedby" }} {{ else }} {{ .i18n .Tr "repo.issues.dependency.issue_closing_blockedby" }} {{ end }} ">
<strong> {{ .i18n .Tr "repo.issues.dependency.blocked_by_short" }} </strong>
2018-07-17 23:23:58 +02:00
</span>
<div class="ui relaxed divided list">
2018-09-07 05:32:46 +03:00
{{ range .BlockedByDependencies }}
2020-11-14 02:16:46 +01:00
<div class="item dependency {{ if .Issue .IsClosed }} is-closed {{ end }} df ac sb">
2020-11-10 19:28:07 +01:00
<div class="item-left df jc fc f1">
<a class="title" href=" {{ .Repository .Link }} /issues/ {{ .Issue .Index }} ">
# {{ .Issue .Index }} {{ .Issue .Title | RenderEmoji }}
</a>
<div class="text small">
{{ .Repository .OwnerName }} / {{ .Repository .Name }}
</div>
</div>
<div class="item-right df ac">
2019-10-31 00:06:10 -05:00
{{ if and $ .CanCreateIssueDependencies ( not $ .Repository .IsArchived ) }}
2021-05-16 22:18:18 +02:00
<a class="delete-dependency-button poping up ci muted" data-id=" {{ .Issue .ID }} " data-type="blockedBy" data-content=" {{ $ .i18n .Tr "repo.issues.dependency.remove_info" }} " data-inverted="">
2021-03-22 05:04:19 +01:00
{{ svg "octicon-trash" 1 6 }}
2018-07-17 23:23:58 +02:00
</a>
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}
2019-01-23 19:58:38 +01:00
{{ if and .CanCreateIssueDependencies ( not .Repository .IsArchived ) }}
2018-07-17 23:23:58 +02:00
<div>
<form method="POST" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /dependency/add" id="addDependencyForm">
{{ $ .CsrfTokenHtml }}
<div class="ui fluid action input">
2019-05-12 13:10:12 +02:00
<div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id=" {{ .Issue .ID }} ">
2018-07-17 23:23:58 +02:00
<input name="newDependency" type="hidden">
2020-10-31 23:15:11 +01:00
{{ svg "octicon-triangle-down" 1 4 "dropdown icon" }}
2018-07-17 23:23:58 +02:00
<input type="text" class="search">
<div class="default text"> {{ .i18n .Tr "repo.issues.dependency.add" }} </div>
</div>
<button class="ui green icon button">
2021-05-16 22:18:18 +02:00
{{ svg "octicon-plus" }}
2018-07-17 23:23:58 +02:00
</button>
</div>
</form>
</div>
{{ end }}
</div>
2019-02-18 21:55:04 +01:00
2021-02-28 15:05:55 +01:00
{{ if and .CanCreateIssueDependencies ( not .Repository .IsArchived ) }}
<input type="hidden" id="repolink" value=" {{ $ .RepoRelPath }} ">
<input type="hidden" id="repoId" value=" {{ .Repository .ID }} ">
<input type="hidden" id="crossRepoSearch" value=" {{ .AllowCrossRepositoryDependencies }} ">
<input type="hidden" id="type" value=" {{ .IssueType }} ">
<!-- I know, there is probably a better way to do this -->
<input type="hidden" id="issueIndex" value=" {{ .Issue .Index }} "/>
<div class="ui basic modal remove-dependency">
<div class="ui icon header">
2021-03-22 05:04:19 +01:00
{{ svg "octicon-trash" }}
2021-02-28 15:05:55 +01:00
{{ .i18n .Tr "repo.issues.dependency.remove_header" }}
</div>
<div class="content">
<form method="POST" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} /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 }}
{{ .i18n .Tr "repo.issues.dependency.pr_remove_text" }}
{{ else }}
{{ .i18n .Tr "repo.issues.dependency.issue_remove_text" }}
{{ end }} </p>
</div>
<div class="actions">
2021-05-16 22:18:18 +02:00
<div class="ui red cancel inverted button">
{{ svg "octicon-x" }}
2021-02-28 15:05:55 +01:00
{{ .i18n .Tr "repo.issues.dependency.cancel" }}
</div>
2021-05-16 22:18:18 +02:00
<div class="ui green ok inverted button">
{{ svg "octicon-check" }}
2021-02-28 15:05:55 +01:00
{{ .i18n .Tr "repo.issues.dependency.remove" }}
</div>
</div>
</div>
{{ end }}
{{ end }}
{{ if and .IsRepoAdmin ( not .Repository .IsArchived ) }}
2019-02-18 21:55:04 +01:00
<div class="ui divider"></div>
<div class="ui watching">
2021-02-28 15:05:55 +01:00
<button class="fluid ui show-modal button {{ if .Issue .IsLocked }} negative {{ end }} " data-modal="#lock">
2021-01-19 04:02:47 +01:00
{{ if .Issue .IsLocked }}
{{ svg "octicon-key" }}
{{ .i18n .Tr "repo.issues.unlock" }}
{{ else }}
{{ svg "octicon-lock" }}
{{ .i18n .Tr "repo.issues.lock" }}
{{ end }}
</button>
2019-02-18 21:55:04 +01:00
</div>
<div class="ui tiny modal" id="lock">
<div class="header">
{{ if .Issue .IsLocked }}
{{ .i18n .Tr "repo.issues.unlock.title" }}
2021-02-28 15:05:55 +01:00
{{ else }}
2019-02-18 21:55:04 +01:00
{{ .i18n .Tr "repo.issues.lock.title" }}
2021-02-28 15:05:55 +01:00
{{ end }}
2019-02-18 21:55:04 +01:00
</div>
2021-03-21 19:58:28 +01:00
<div class="content">
<div class="ui warning message text left">
{{ if .Issue .IsLocked }}
{{ .i18n .Tr "repo.issues.unlock.notice_1" }} <br>
{{ .i18n .Tr "repo.issues.unlock.notice_2" }} <br>
{{ else }}
{{ .i18n .Tr "repo.issues.lock.notice_1" }} <br>
{{ .i18n .Tr "repo.issues.lock.notice_2" }} <br>
{{ .i18n .Tr "repo.issues.lock.notice_3" }} <br>
{{ end }}
</div>
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<form class="ui form" action=" {{ $ .RepoLink }} /issues/ {{ .Issue .Index }} {{ if .Issue .IsLocked }} /unlock {{ else }} /lock {{ end }} "
method="post">
{{ .CsrfTokenHtml }}
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
{{ if not .Issue .IsLocked }}
<div class="field">
<strong> {{ .i18n .Tr "repo.issues.lock.reason" }} </strong>
</div>
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<div class="field">
<div class="ui fluid dropdown selection" tabindex="0">
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<select name="reason">
<option value=""> </option>
{{ range .LockReasons }}
<option value=" {{ . }} "> {{ . }} </option>
{{ end }}
</select>
{{ svg "octicon-triangle-down" 1 4 "dropdown icon" }}
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<div class="default text"> </div>
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
{{ range .LockReasons }}
<div class="item" data-value=" {{ . }} "> {{ . }} </div>
{{ end }}
</div>
2021-02-28 15:05:55 +01:00
</div>
2019-02-18 21:55:04 +01:00
</div>
2021-03-21 19:58:28 +01:00
{{ end }}
2019-02-18 21:55:04 +01:00
2021-03-21 19:58:28 +01:00
<div class="text right actions">
<div class="ui cancel button"> {{ .i18n .Tr "settings.cancel" }} </div>
<button class="ui red button">
{{ if .Issue .IsLocked }}
{{ .i18n .Tr "repo.issues.unlock_confirm" }}
{{ else }}
{{ .i18n .Tr "repo.issues.lock_confirm" }}
{{ end }}
</button>
</div>
</form>
</div>
2018-07-17 23:23:58 +02:00
</div>
{{ end }}
2021-02-28 15:05:55 +01:00
</div>
</div>