2017-03-17 13:57:43 +08:00
|
|
|
<div class="four wide column">
|
|
|
|
<div class="ui segment metas">
|
2017-08-24 20:30:27 +08:00
|
|
|
{{template "repo/issue/branch_selector_field" .}}
|
|
|
|
|
2019-01-24 02:58:38 +08:00
|
|
|
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
|
2017-03-17 13:57:43 +08:00
|
|
|
<span class="text">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
|
|
|
<div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/labels">
|
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
|
|
|
{{range .Labels}}
|
2019-02-17 01:33:09 +08:00
|
|
|
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
2018-03-13 10:03:55 +08:00
|
|
|
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui labels list">
|
|
|
|
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
|
|
|
{{range .Labels}}
|
|
|
|
<div class="item">
|
2019-02-17 01:33:09 +08:00
|
|
|
<a class="ui label has-emoji {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
|
2017-03-17 13:57:43 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
2019-01-24 02:58:38 +08:00
|
|
|
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
|
2017-03-17 13:57:43 +08:00
|
|
|
<span class="text">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
|
|
|
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
|
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
|
|
|
{{if .OpenMilestones}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="header">
|
|
|
|
<i class="octicon octicon-milestone"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
|
|
|
</div>
|
|
|
|
{{range .OpenMilestones}}
|
2017-11-22 15:09:48 +08:00
|
|
|
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{if .ClosedMilestones}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="header">
|
|
|
|
<i class="octicon octicon-milestone"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
|
|
|
</div>
|
|
|
|
{{range .ClosedMilestones}}
|
2017-11-22 15:09:48 +08:00
|
|
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
2017-03-17 13:57:43 +08: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}}
|
2019-09-20 22:05:05 +08:00
|
|
|
<a class="item" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
|
2019-01-24 02:58:38 +08:00
|
|
|
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
|
2017-03-17 13:57:43 +08:00
|
|
|
<span class="text">
|
2018-05-10 00:29:04 +08:00
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
2017-03-17 13:57:43 +08:00
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
2018-05-10 00:29:04 +08:00
|
|
|
<div class="filter menu" data-action="" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
|
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{range .Assignees}}
|
2018-05-10 00:29:04 +08:00
|
|
|
|
|
|
|
{{$AssigneeID := .ID}}
|
|
|
|
<a class="item{{range $.Issue.Assignees}}
|
|
|
|
{{if eq .ID $AssigneeID}}
|
|
|
|
checked
|
|
|
|
{{end}}
|
|
|
|
{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
|
|
|
|
<span class="octicon{{range $.Issue.Assignees}}
|
|
|
|
{{if eq .ID $AssigneeID}}
|
|
|
|
octicon-check
|
|
|
|
{{end}}
|
|
|
|
{{end}}"></span>
|
|
|
|
<span class="text">
|
2019-05-08 16:41:35 +08:00
|
|
|
<img class="ui avatar image" src="{{.RelAvatarLink}}"> {{.GetDisplayName}}
|
2018-05-10 00:29:04 +08:00
|
|
|
</span>
|
|
|
|
</a>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-10 00:29:04 +08: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 13:57:43 +08:00
|
|
|
<div class="selected">
|
2018-05-10 00:29:04 +08:00
|
|
|
{{range .Issue.Assignees}}
|
|
|
|
<div class="item" style="margin-bottom: 10px;">
|
2019-05-08 16:41:35 +08:00
|
|
|
<a href="{{$.RepoLink}}/issues?assignee={{.ID}}"><img class="ui avatar image" src="{{.RelAvatarLink}}"> {{.GetDisplayName}}</a>
|
2018-05-10 00:29:04 +08:00
|
|
|
</div>
|
2017-03-17 13:57:43 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="ui participants">
|
|
|
|
<span class="text"><strong>{{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
|
|
|
|
<div>
|
|
|
|
{{range .Participants}}
|
2019-03-28 06:22:39 +08:00
|
|
|
<a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}}>
|
2019-05-08 16:41:35 +08:00
|
|
|
<img class="ui avatar image poping up" src="{{.RelAvatarLink}}" data-content="{{.GetDisplayName}}" data-position="top center" data-variation="small inverted">
|
2017-03-17 13:57:43 +08:00
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-30 07:31:47 +08:00
|
|
|
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and $.IssueWatch (not .Repository.IsArchived)}}
|
2017-09-12 14:48:13 +08:00
|
|
|
<div class="ui divider"></div>
|
2017-03-30 07:31:47 +08:00
|
|
|
|
2017-09-12 14:48:13 +08:00
|
|
|
<div class="ui watching">
|
|
|
|
<span class="text"><strong>{{.i18n.Tr "notification.notifications"}}</strong></span>
|
|
|
|
<div>
|
|
|
|
<form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/watch">
|
|
|
|
<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}" />
|
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<button class="fluid ui button">
|
|
|
|
{{if $.IssueWatch.IsWatching}}
|
|
|
|
<i class="octicon octicon-mute"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.unsubscribe"}}
|
|
|
|
{{else}}
|
|
|
|
<i class="octicon octicon-unmute"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.subscribe"}}
|
|
|
|
{{end}}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .Repository.IsTimetrackerEnabled }}
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and .CanUseTimetracker (not .Repository.IsArchived)}}
|
2017-09-12 14:48:13 +08:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="ui timetrack">
|
|
|
|
<span class="text"><strong>{{.i18n.Tr "repo.issues.tracker"}}</strong></span>
|
|
|
|
<div>
|
|
|
|
<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}}
|
|
|
|
<div class="ui buttons fluid stop-cancel">
|
2019-11-13 22:52:13 +08:00
|
|
|
<button onclick="this.disabled=true;window.toggleStopwatch()" class="ui button stop">{{.i18n.Tr "repo.issues.stop_tracking"}}</button>
|
|
|
|
<button onclick="this.disabled=true;window.cancelStopwatch()" class="ui negative button cancel">{{.i18n.Tr "repo.issues.cancel_tracking"}}</button>
|
2017-09-12 14:48:13 +08:00
|
|
|
</div>
|
2017-03-30 07:31:47 +08:00
|
|
|
{{else}}
|
2017-09-12 14:48:13 +08:00
|
|
|
{{if .HasUserStopwatch}}
|
|
|
|
<div class="ui warning message">
|
|
|
|
{{.i18n.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL | Safe}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<div class="ui buttons two fluid start-add">
|
2019-11-13 22:52:13 +08:00
|
|
|
<button onclick="this.disabled=true;window.toggleStopwatch()" class="ui button poping up start" data-content='{{.i18n.Tr "repo.issues.start_tracking"}}' data-position="top center" data-variation="small inverted">{{.i18n.Tr "repo.issues.start_tracking_short"}}</button>
|
|
|
|
<button onclick="window.timeAddManual()" class="ui button green poping up add-time" 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-09-12 14:48:13 +08:00
|
|
|
<div class="ui mini 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>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-30 07:31:47 +08:00
|
|
|
{{end}}
|
2017-09-12 14:48:13 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if gt (len .WorkingUsers) 0}}
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="ui participants comments">
|
2018-04-29 13:58:47 +08:00
|
|
|
<span class="text"><strong>{{.i18n.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span>
|
2017-09-12 14:48:13 +08:00
|
|
|
<div>
|
|
|
|
{{range $user, $trackedtime := .WorkingUsers}}
|
|
|
|
<div class="comment">
|
|
|
|
<a class="avatar">
|
|
|
|
<img src="{{$user.RelAvatarLink}}">
|
|
|
|
</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-02 03:05:28 +08:00
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<span class="text"><strong>{{.i18n.Tr "repo.issues.due_date"}}</strong></span>
|
2018-07-16 20:43:00 +08:00
|
|
|
<div class="ui form" id="deadline-loader">
|
|
|
|
<div class="ui negative message" id="deadline-err-invalid-date" style="display: none;">
|
|
|
|
<i class="close icon"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.due_date_invalid"}}
|
|
|
|
</div>
|
|
|
|
{{if ne .Issue.DeadlineUnix 0}}
|
|
|
|
<p>
|
|
|
|
<span class="octicon octicon-calendar"></span>
|
|
|
|
{{.Issue.DeadlineUnix.FormatShort}}
|
|
|
|
{{if .Issue.IsOverdue}}
|
|
|
|
<span style="color: red;">{{.i18n.Tr "repo.issues.due_date_overdue"}}</span>
|
2018-05-02 03:05:28 +08:00
|
|
|
{{end}}
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
2018-07-16 20:43:00 +08:00
|
|
|
<br/>
|
2019-11-13 22:52:13 +08:00
|
|
|
<a style="cursor:pointer;" onclick="window.toggleDeadlineForm();"><i class="edit icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_edit"}}</a> -
|
2019-11-15 01:58:32 +08:00
|
|
|
<a style="cursor:pointer;" onclick="window.updateDeadline('');"><i class="remove icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_remove"}}</a>
|
2018-07-16 20:43:00 +08:00
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
{{else}}
|
|
|
|
<p><i>{{.i18n.Tr "repo.issues.due_date_not_set"}}</i></p>
|
|
|
|
{{end}}
|
2018-05-02 03:05:28 +08:00
|
|
|
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
2018-07-16 20:43:00 +08:00
|
|
|
<div {{if ne .Issue.DeadlineUnix 0}} style="display: none;"{{end}} id="deadlineForm">
|
2019-11-13 22:52:13 +08:00
|
|
|
<form class="ui fluid action input" action="{{AppSubUrl}}/api/v1/repos/{{.Repository.Owner.Name}}/{{.Repository.Name}}/issues/{{.Issue.Index}}" method="post" id="update-issue-deadline-form" onsubmit="window.setDeadline();return false;">
|
2018-07-16 20:43:00 +08: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}}
|
|
|
|
<i class="edit icon"></i>
|
|
|
|
{{else}}
|
|
|
|
<i class="plus icon"></i>
|
|
|
|
{{end}}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2018-07-18 05:23:58 +08:00
|
|
|
|
|
|
|
{{if .Repository.IsDependenciesEnabled}}
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="ui depending">
|
2018-09-07 10:32:46 +08:00
|
|
|
{{if (and (not .BlockedByDependencies) (not .BlockingDependencies))}}
|
|
|
|
<span class="text"><strong>{{.i18n.Tr "repo.issues.dependency.title"}}</strong></span>
|
|
|
|
<br>
|
|
|
|
<p>{{if .Issue.IsPull}}
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.pr_no_dependencies"}}
|
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.issue_no_dependencies"}}
|
|
|
|
{{end}}</p>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .BlockingDependencies}}
|
2018-07-18 05:23:58 +08:00
|
|
|
<span class="text" data-tooltip="{{if .Issue.IsPull}}
|
2018-09-07 10:32:46 +08:00
|
|
|
{{.i18n.Tr "repo.issues.dependency.pr_close_blocks"}}
|
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.issue_close_blocks"}}
|
|
|
|
{{end}}" data-inverted="">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.dependency.blocks_short"}}</strong>
|
2018-07-18 05:23:58 +08:00
|
|
|
</span>
|
|
|
|
<div class="ui relaxed divided list">
|
2018-09-07 10:32:46 +08:00
|
|
|
{{range .BlockingDependencies}}
|
Allow cross-repository dependencies on issues (#7901)
* in progress changes for #7405, added ability to add cross-repo dependencies
* removed unused repolink var
* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes
* reverted removal of string in local files becasue these are done via crowdin, not updated manually
* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review
* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result
* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository
* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)
* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard
* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies
* added Name to the RepositoryMeta struct
* updated swagger doc
* fixed total count for link header on SearchIssues
* fixed indentation
* fixed aligment of remove icon on dependencies in issue sidebar
* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)
* reverting .css change, somehow missed or forgot that less is used
* updated less file and generated css; updated sidebar template with styles to line up delete and issue index
* added ordering to the blocked by/depends on queries
* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)
* re-applied my swagger changes after merge
* fixed split string condition in issue search
* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter
* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled
* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here
* fixed incorrect setting of user id parameter in search repos call
2019-10-31 13:06:10 +08:00
|
|
|
<div class="item{{if .Issue.IsClosed}} is-closed{{end}}">
|
|
|
|
<span class="text grey right floated">#{{.Issue.Index}}</span>
|
|
|
|
<a class="title has-emoji" href="{{.Repository.Link}}/issues/{{.Issue.Index}}">{{.Issue.Title}}</a>
|
|
|
|
<div class="text small">{{.Repository.OwnerName}}/{{.Repository.Name}}</div>
|
|
|
|
<div class="ui transparent label right floated nopadding">
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
|
2019-11-13 22:52:13 +08:00
|
|
|
<a class="delete-dependency-button" onclick="window.deleteDependencyModal({{.Issue.ID}}, 'blocking');"
|
Allow cross-repository dependencies on issues (#7901)
* in progress changes for #7405, added ability to add cross-repo dependencies
* removed unused repolink var
* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes
* reverted removal of string in local files becasue these are done via crowdin, not updated manually
* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review
* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result
* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository
* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)
* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard
* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies
* added Name to the RepositoryMeta struct
* updated swagger doc
* fixed total count for link header on SearchIssues
* fixed indentation
* fixed aligment of remove icon on dependencies in issue sidebar
* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)
* reverting .css change, somehow missed or forgot that less is used
* updated less file and generated css; updated sidebar template with styles to line up delete and issue index
* added ordering to the blocked by/depends on queries
* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)
* re-applied my swagger changes after merge
* fixed split string condition in issue search
* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter
* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled
* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here
* fixed incorrect setting of user id parameter in search repos call
2019-10-31 13:06:10 +08:00
|
|
|
data-tooltip="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted="">
|
|
|
|
<i class="delete icon text red nopadding nomargin"></i>
|
2018-07-18 05:23:58 +08:00
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2018-09-07 10:32:46 +08:00
|
|
|
{{if .BlockedByDependencies}}
|
2018-07-18 05:23:58 +08:00
|
|
|
<span class="text" data-tooltip="{{if .Issue.IsPull}}
|
2018-09-07 10:32:46 +08:00
|
|
|
{{.i18n.Tr "repo.issues.dependency.pr_closing_blockedby"}}
|
2019-11-30 03:05:49 +08:00
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.issue_closing_blockedby"}}
|
2018-09-07 10:32:46 +08:00
|
|
|
{{end}}" data-inverted="">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.dependency.blocked_by_short"}}</strong>
|
2018-07-18 05:23:58 +08:00
|
|
|
</span>
|
|
|
|
<div class="ui relaxed divided list">
|
2018-09-07 10:32:46 +08:00
|
|
|
{{range .BlockedByDependencies}}
|
Allow cross-repository dependencies on issues (#7901)
* in progress changes for #7405, added ability to add cross-repo dependencies
* removed unused repolink var
* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes
* reverted removal of string in local files becasue these are done via crowdin, not updated manually
* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review
* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result
* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository
* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)
* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard
* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies
* added Name to the RepositoryMeta struct
* updated swagger doc
* fixed total count for link header on SearchIssues
* fixed indentation
* fixed aligment of remove icon on dependencies in issue sidebar
* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)
* reverting .css change, somehow missed or forgot that less is used
* updated less file and generated css; updated sidebar template with styles to line up delete and issue index
* added ordering to the blocked by/depends on queries
* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)
* re-applied my swagger changes after merge
* fixed split string condition in issue search
* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter
* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled
* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here
* fixed incorrect setting of user id parameter in search repos call
2019-10-31 13:06:10 +08:00
|
|
|
<div class="item{{if .Issue.IsClosed}} is-closed{{end}}">
|
|
|
|
<span class="text grey right floated">#{{.Issue.Index}}</span>
|
|
|
|
<a class="title has-emoji" href="{{.Repository.Link}}/issues/{{.Issue.Index}}">{{.Issue.Title}}</a>
|
|
|
|
<div class="text small">{{.Repository.OwnerName}}/{{.Repository.Name}}</div>
|
|
|
|
<div class="ui transparent label right floated nopadding">
|
|
|
|
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
|
2019-11-13 22:52:13 +08:00
|
|
|
<a class="delete-dependency-button" onclick="window.deleteDependencyModal({{.Issue.ID}}, 'blockedBy');"
|
Allow cross-repository dependencies on issues (#7901)
* in progress changes for #7405, added ability to add cross-repo dependencies
* removed unused repolink var
* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes
* reverted removal of string in local files becasue these are done via crowdin, not updated manually
* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review
* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result
* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository
* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)
* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard
* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies
* added Name to the RepositoryMeta struct
* updated swagger doc
* fixed total count for link header on SearchIssues
* fixed indentation
* fixed aligment of remove icon on dependencies in issue sidebar
* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)
* reverting .css change, somehow missed or forgot that less is used
* updated less file and generated css; updated sidebar template with styles to line up delete and issue index
* added ordering to the blocked by/depends on queries
* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)
* re-applied my swagger changes after merge
* fixed split string condition in issue search
* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter
* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled
* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here
* fixed incorrect setting of user id parameter in search repos call
2019-10-31 13:06:10 +08:00
|
|
|
data-tooltip="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted="">
|
|
|
|
<i class="delete icon text red nopadding nomargin"></i>
|
2018-07-18 05:23:58 +08:00
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
|
2018-07-18 05:23:58 +08:00
|
|
|
<div>
|
|
|
|
<form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/dependency/add" id="addDependencyForm">
|
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<div class="ui fluid action input">
|
2019-05-12 19:10:12 +08:00
|
|
|
<div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}">
|
2018-07-18 05:23:58 +08:00
|
|
|
<input name="newDependency" type="hidden">
|
|
|
|
<i class="dropdown icon"></i>
|
|
|
|
<input type="text" class="search">
|
|
|
|
<div class="default text">{{.i18n.Tr "repo.issues.dependency.add"}}</div>
|
|
|
|
</div>
|
|
|
|
<button class="ui green icon button">
|
|
|
|
<i class="plus icon"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2019-02-19 04:55:04 +08:00
|
|
|
|
2019-06-29 17:18:49 +08:00
|
|
|
{{ if and .IsRepoAdmin (not .Repository.IsArchived) }}
|
2019-02-19 04:55:04 +08:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="ui watching">
|
|
|
|
<div>
|
|
|
|
<button class="fluid ui show-modal button {{if .Issue.IsLocked }} negative {{ end }}" data-modal="#lock">
|
|
|
|
{{if .Issue.IsLocked}}
|
|
|
|
<i class="octicon octicon-key"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.unlock"}}
|
|
|
|
{{else}}
|
|
|
|
<i class="octicon octicon-lock"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.lock"}}
|
|
|
|
{{end}}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ui tiny modal" id="lock">
|
|
|
|
<div class="header">
|
|
|
|
{{ if .Issue.IsLocked }}
|
|
|
|
{{.i18n.Tr "repo.issues.unlock.title"}}
|
|
|
|
{{ else }}
|
|
|
|
{{.i18n.Tr "repo.issues.lock.title"}}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<form class="ui form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}{{ if .Issue.IsLocked }}/unlock{{ else }}/lock{{ end }}"
|
|
|
|
method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
|
|
|
|
{{ if not .Issue.IsLocked }}
|
|
|
|
<div class="field">
|
|
|
|
<strong> {{ .i18n.Tr "repo.issues.lock.reason" }} </strong>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui fluid dropdown selection" tabindex="0">
|
|
|
|
|
|
|
|
<select name="reason">
|
|
|
|
<option value=""> </option>
|
|
|
|
{{range .LockReasons}}
|
|
|
|
<option value="{{.}}">{{.}}</option>
|
|
|
|
{{end}}
|
|
|
|
</select>
|
|
|
|
<i class="dropdown icon"></i>
|
|
|
|
|
|
|
|
<div class="default text"> </div>
|
|
|
|
|
|
|
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
|
|
|
{{range .LockReasons}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
2017-03-17 13:57:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-01-24 02:58:38 +08:00
|
|
|
{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
|
2018-11-26 01:25:55 +08:00
|
|
|
<input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
|
Allow cross-repository dependencies on issues (#7901)
* in progress changes for #7405, added ability to add cross-repo dependencies
* removed unused repolink var
* fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes
* reverted removal of string in local files becasue these are done via crowdin, not updated manually
* removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review
* changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result
* simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository
* made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line)
* replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard
* some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies
* added Name to the RepositoryMeta struct
* updated swagger doc
* fixed total count for link header on SearchIssues
* fixed indentation
* fixed aligment of remove icon on dependencies in issue sidebar
* removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block)
* reverting .css change, somehow missed or forgot that less is used
* updated less file and generated css; updated sidebar template with styles to line up delete and issue index
* added ordering to the blocked by/depends on queries
* fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository)
* re-applied my swagger changes after merge
* fixed split string condition in issue search
* changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter
* when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled
* updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here
* fixed incorrect setting of user id parameter in search repos call
2019-10-31 13:06:10 +08:00
|
|
|
<input type="hidden" id="repoId" value="{{.Repository.ID}}">
|
|
|
|
<input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}">
|
2020-01-19 14:43:38 +08:00
|
|
|
<input type="hidden" id="type" value="{{.IssueType}}">
|
2018-07-18 05:23:58 +08:00
|
|
|
<!-- 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">
|
|
|
|
<i class="trash icon"></i>
|
|
|
|
{{.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">
|
|
|
|
<div class="ui basic red cancel inverted button">
|
|
|
|
<i class="remove icon"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.cancel"}}
|
|
|
|
</div>
|
|
|
|
<div class="ui basic green ok inverted button">
|
|
|
|
<i class="checkmark icon"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.dependency.remove"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|