mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 15:31:06 +01:00
Add titles and improve messages on sidebar menus (#10872)
* ui: add more message on sidebar menus * add title on the menus * show some message instead of hide choose bar when have nothing to choose * add simply filter for each menus * do same changes in mew_form.tmpl * remove some unusefull comments in mew_form.tmpl Signed-off-by: a1012112796 <1012112796@qq.com> * do review suggestions * add filter message on sidebar filter * change IsIssueWriter to HasIssuesOrPullsWritePermission Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
This commit is contained in:
parent
4f63f283c4
commit
14c97c0501
9 changed files with 147 additions and 93 deletions
|
@ -824,17 +824,24 @@ ext_issues = Ext. Issues
|
||||||
ext_issues.desc = Link to an external issue tracker.
|
ext_issues.desc = Link to an external issue tracker.
|
||||||
|
|
||||||
issues.desc = Organize bug reports, tasks and milestones.
|
issues.desc = Organize bug reports, tasks and milestones.
|
||||||
|
issues.filter_assignees = Filter Assignee
|
||||||
|
issues.filter_milestones = Filter Milestone
|
||||||
|
issues.filter_labels = Filter Label
|
||||||
issues.new = New Issue
|
issues.new = New Issue
|
||||||
issues.new.title_empty = Title cannot be empty
|
issues.new.title_empty = Title cannot be empty
|
||||||
issues.new.labels = Labels
|
issues.new.labels = Labels
|
||||||
|
issues.new.add_labels_title = Apply labels
|
||||||
issues.new.no_label = No Label
|
issues.new.no_label = No Label
|
||||||
issues.new.clear_labels = Clear labels
|
issues.new.clear_labels = Clear labels
|
||||||
|
issues.new.no_items = No items
|
||||||
issues.new.milestone = Milestone
|
issues.new.milestone = Milestone
|
||||||
|
issues.new.add_milestone_title = Set milestone
|
||||||
issues.new.no_milestone = No Milestone
|
issues.new.no_milestone = No Milestone
|
||||||
issues.new.clear_milestone = Clear milestone
|
issues.new.clear_milestone = Clear milestone
|
||||||
issues.new.open_milestone = Open Milestones
|
issues.new.open_milestone = Open Milestones
|
||||||
issues.new.closed_milestone = Closed Milestones
|
issues.new.closed_milestone = Closed Milestones
|
||||||
issues.new.assignees = Assignees
|
issues.new.assignees = Assignees
|
||||||
|
issues.new.add_assignees_title = Assign users
|
||||||
issues.new.clear_assignees = Clear assignees
|
issues.new.clear_assignees = Clear assignees
|
||||||
issues.new.no_assignees = No Assignees
|
issues.new.no_assignees = No Assignees
|
||||||
issues.no_ref = No Branch/Tag Specified
|
issues.no_ref = No Branch/Tag Specified
|
||||||
|
|
|
@ -432,6 +432,8 @@ func CompareDiff(ctx *context.Context) {
|
||||||
setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates)
|
setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates)
|
||||||
renderAttachmentSettings(ctx)
|
renderAttachmentSettings(ctx)
|
||||||
|
|
||||||
|
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypePullRequests)
|
||||||
|
|
||||||
ctx.HTML(200, tplCompare)
|
ctx.HTML(200, tplCompare)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -487,6 +487,8 @@ func NewIssue(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeIssues)
|
||||||
|
|
||||||
ctx.HTML(200, tplIssueNew)
|
ctx.HTML(200, tplIssueNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1076,7 +1078,7 @@ func ViewIssue(ctx *context.Context) {
|
||||||
ctx.Data["ReadOnly"] = true
|
ctx.Data["ReadOnly"] = true
|
||||||
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + ctx.Data["Link"].(string)
|
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + ctx.Data["Link"].(string)
|
||||||
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
|
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
|
||||||
ctx.Data["IsIssueWriter"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
|
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
|
||||||
ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin)
|
ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin)
|
||||||
ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons
|
ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons
|
||||||
ctx.HTML(200, tplIssueView)
|
ctx.HTML(200, tplIssueView)
|
||||||
|
|
|
@ -652,7 +652,7 @@ func ViewPullFiles(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
getBranchData(ctx, issue)
|
getBranchData(ctx, issue)
|
||||||
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
|
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
|
||||||
ctx.Data["IsIssueWriter"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
|
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
|
||||||
ctx.HTML(200, tplPullFiles)
|
ctx.HTML(200, tplPullFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,21 +38,35 @@
|
||||||
{{template "repo/issue/branch_selector_field" .}}
|
{{template "repo/issue/branch_selector_field" .}}
|
||||||
|
|
||||||
<input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}">
|
<input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}">
|
||||||
<div class="ui {{if and (not .Labels) (not .OrgLabels)}}disabled{{end}} floating jump select-label dropdown">
|
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-label dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
||||||
{{svg "octicon-gear" 16}}
|
{{if .HasIssuesOrPullsWritePermission}}
|
||||||
|
{{svg "octicon-gear" 16}}
|
||||||
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="filter menu" data-id="#label_ids">
|
<div class="filter menu" data-id="#label_ids">
|
||||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
<div class="header" style="text-transform: none;font-size:16px;">{{.i18n.Tr "repo.issues.new.add_labels_title"}}</div>
|
||||||
{{range .Labels}}
|
{{if or .Labels .OrgLabels}}
|
||||||
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
<div class="ui icon search input">
|
||||||
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
<i class="search icon"></i>
|
||||||
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_labels"}}">
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui divider"></div>
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||||
{{range .OrgLabels}}
|
{{if or .Labels .OrgLabels}}
|
||||||
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
{{range .Labels}}
|
||||||
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
||||||
|
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
{{range .OrgLabels}}
|
||||||
|
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
||||||
|
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
<div class="header" style="text-transform: none;font-size:14px;">{{.i18n.Tr "repo.issues.new.no_items"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,31 +83,46 @@
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
|
<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
|
||||||
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} floating jump select-milestone dropdown">
|
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
||||||
{{svg "octicon-gear" 16}}
|
{{if .HasIssuesOrPullsWritePermission}}
|
||||||
|
{{svg "octicon-gear" 16}}
|
||||||
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
<div class="header" style="text-transform: none;font-size:16px;">{{.i18n.Tr "repo.issues.new.add_milestone_title"}}</div>
|
||||||
{{if .OpenMilestones}}
|
{{if or .OpenMilestones .ClosedMilestones}}
|
||||||
<div class="divider"></div>
|
<div class="ui icon search input">
|
||||||
<div class="header">
|
<i class="search icon"></i>
|
||||||
{{svg "octicon-milestone" 16}}
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_milestones"}}">
|
||||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
</div>
|
||||||
</div>
|
|
||||||
{{range .OpenMilestones}}
|
|
||||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ClosedMilestones}}
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||||
<div class="divider"></div>
|
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
|
||||||
<div class="header">
|
<div class="header" style="text-transform: none;font-size:14px;">
|
||||||
{{svg "octicon-milestone" 16}}
|
{{.i18n.Tr "repo.issues.new.no_items"}}
|
||||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
|
||||||
</div>
|
</div>
|
||||||
{{range .ClosedMilestones}}
|
{{else}}
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
{{if .OpenMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{svg "octicon-milestone" 16}}
|
||||||
|
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .OpenMilestones}}
|
||||||
|
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if .ClosedMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{svg "octicon-milestone" 16}}
|
||||||
|
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .ClosedMilestones}}
|
||||||
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,12 +139,19 @@
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
|
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
|
||||||
<div class="ui {{if not .Assignees}}disabled{{end}} floating jump select-assignees dropdown">
|
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
||||||
{{svg "octicon-gear" 16}}
|
{{if .HasIssuesOrPullsWritePermission}}
|
||||||
|
{{svg "octicon-gear" 16}}
|
||||||
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="filter menu" data-id="#assignee_ids">
|
<div class="filter menu" data-id="#assignee_ids">
|
||||||
|
<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">
|
||||||
|
<i class="search icon"></i>
|
||||||
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignees"}}">
|
||||||
|
</div>
|
||||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
||||||
{{range .Assignees}}
|
{{range .Assignees}}
|
||||||
<a class="item" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
|
<a class="item" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
|
||||||
|
@ -137,28 +173,6 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_id}}">
|
|
||||||
<div class="ui {{if not .Assignees}}disabled{{end}} floating jump select-assignee dropdown">
|
|
||||||
<span class="text">
|
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
|
||||||
<span class="octicon octicon-gear"></span>
|
|
||||||
</span>
|
|
||||||
<div class="filter menu">
|
|
||||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
|
||||||
{{range .Assignees}}
|
|
||||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui select-assignee list">
|
|
||||||
<span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignees"}}</span>
|
|
||||||
<div class="selected">
|
|
||||||
{{if .Assignee}}
|
|
||||||
<a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.ID}}"><img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}"> {{.Assignee.Name}}</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
{{ template "repo/issue/view_content/pull". }}
|
{{ template "repo/issue/view_content/pull". }}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
{{ if and (or .IsRepoAdmin .IsIssueWriter (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }}
|
{{ if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }}
|
||||||
<div class="comment form">
|
<div class="comment form">
|
||||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||||
<img src="{{.SignedUser.RelAvatarLink}}">
|
<img src="{{.SignedUser.RelAvatarLink}}">
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input id="status" name="status" type="hidden">
|
<input id="status" name="status" type="hidden">
|
||||||
<div class="text right">
|
<div class="text right">
|
||||||
{{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}}
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
||||||
{{if .Issue.IsClosed}}
|
{{if .Issue.IsClosed}}
|
||||||
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
||||||
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input id="status" name="status" type="hidden">
|
<input id="status" name="status" type="hidden">
|
||||||
<div class="text right">
|
<div class="text right">
|
||||||
{{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}}
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
||||||
{{if .Issue.IsClosed}}
|
{{if .Issue.IsClosed}}
|
||||||
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
||||||
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="item context clipboard" data-clipboard-text="{{Printf "%s%s/issues/%d#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div>
|
<div class="item context clipboard" data-clipboard-text="{{Printf "%s%s/issues/%d#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}</div>
|
<div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}</div>
|
||||||
{{if or .ctx.Permission.IsAdmin .ctx.IsIssuePoster .ctx.IsIssueWriter}}
|
{{if or .ctx.Permission.IsAdmin .ctx.IsIssuePoster .ctx.HasIssuesOrPullsWritePermission}}
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="item context edit-content">{{.ctx.i18n.Tr "repo.issues.context.edit"}}</div>
|
<div class="item context edit-content">{{.ctx.i18n.Tr "repo.issues.context.edit"}}</div>
|
||||||
{{if .delete}}
|
{{if .delete}}
|
||||||
|
|
|
@ -2,23 +2,34 @@
|
||||||
<div class="ui segment metas">
|
<div class="ui segment metas">
|
||||||
{{template "repo/issue/branch_selector_field" .}}
|
{{template "repo/issue/branch_selector_field" .}}
|
||||||
|
|
||||||
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
|
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
||||||
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
{{svg "octicon-gear" 16}}
|
{{svg "octicon-gear" 16}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/labels">
|
<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>
|
<div class="header" style="text-transform: none;font-size:16px;">{{.i18n.Tr "repo.issues.new.add_labels_title"}}</div>
|
||||||
{{range .Labels}}
|
{{if or .Labels .OrgLabels}}
|
||||||
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
<div class="ui icon search input">
|
||||||
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
<i class="search icon"></i>
|
||||||
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_labels"}}">
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui divider"></div>
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||||
{{range .OrgLabels}}
|
{{if or .Labels .OrgLabels}}
|
||||||
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
{{range .Labels}}
|
||||||
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
||||||
|
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
||||||
|
{{end}}
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
{{range .OrgLabels}}
|
||||||
|
<a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
||||||
|
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
<div class="header" style="text-transform: none;font-size:14px;">{{.i18n.Tr "repo.issues.new.no_items"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,33 +50,46 @@
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
|
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
||||||
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
{{svg "octicon-gear" 16}}
|
{{svg "octicon-gear" 16}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
|
<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>
|
<div class="header" style="text-transform: none;font-size:16px;">{{.i18n.Tr "repo.issues.new.add_milestone_title"}}</div>
|
||||||
{{if .OpenMilestones}}
|
{{if or .OpenMilestones .ClosedMilestones}}
|
||||||
<div class="divider"></div>
|
<div class="ui icon search input">
|
||||||
<div class="header">
|
<i class="search icon"></i>
|
||||||
{{svg "octicon-milestone" 16}}
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_milestones"}}">
|
||||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
</div>
|
||||||
</div>
|
|
||||||
{{range .OpenMilestones}}
|
|
||||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ClosedMilestones}}
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||||
<div class="divider"></div>
|
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
|
||||||
<div class="header">
|
<div class="header" style="text-transform: none;font-size:14px;">
|
||||||
{{svg "octicon-milestone" 16}}
|
{{.i18n.Tr "repo.issues.new.no_items"}}
|
||||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
|
||||||
</div>
|
</div>
|
||||||
{{range .ClosedMilestones}}
|
{{else}}
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
{{if .OpenMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{svg "octicon-milestone" 16}}
|
||||||
|
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .OpenMilestones}}
|
||||||
|
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if .ClosedMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{svg "octicon-milestone" 16}}
|
||||||
|
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .ClosedMilestones}}
|
||||||
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,14 +106,19 @@
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
|
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
|
||||||
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
|
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
<strong>{{.i18n.Tr "repo.issues.new.assignees"}}</strong>
|
||||||
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
{{svg "octicon-gear" 16}}
|
{{svg "octicon-gear" 16}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="filter menu" data-action="" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
|
<div class="filter menu" data-action="" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
|
||||||
|
<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">
|
||||||
|
<i class="search icon"></i>
|
||||||
|
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignees"}}">
|
||||||
|
</div>
|
||||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignees"}}</div>
|
||||||
{{range .Assignees}}
|
{{range .Assignees}}
|
||||||
|
|
||||||
|
@ -241,7 +270,7 @@
|
||||||
{{if .Issue.IsOverdue}}
|
{{if .Issue.IsOverdue}}
|
||||||
<span style="color: red;">{{.i18n.Tr "repo.issues.due_date_overdue"}}</span>
|
<span style="color: red;">{{.i18n.Tr "repo.issues.due_date_overdue"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
<br/>
|
<br/>
|
||||||
<a style="cursor:pointer;" onclick="window.toggleDeadlineForm();"><i class="edit icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_edit"}}</a> -
|
<a style="cursor:pointer;" onclick="window.toggleDeadlineForm();"><i class="edit icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_edit"}}</a> -
|
||||||
<a style="cursor:pointer;" onclick="window.updateDeadline('');"><i class="remove icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_remove"}}</a>
|
<a style="cursor:pointer;" onclick="window.updateDeadline('');"><i class="remove icon"></i>{{$.i18n.Tr "repo.issues.due_date_form_remove"}}</a>
|
||||||
|
@ -251,7 +280,7 @@
|
||||||
<p><i>{{.i18n.Tr "repo.issues.due_date_not_set"}}</i></p>
|
<p><i>{{.i18n.Tr "repo.issues.due_date_not_set"}}</i></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .IsIssueWriter (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
<div {{if ne .Issue.DeadlineUnix 0}} style="display: none;"{{end}} id="deadlineForm">
|
<div {{if ne .Issue.DeadlineUnix 0}} style="display: none;"{{end}} id="deadlineForm">
|
||||||
<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;">
|
<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;">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<input value="{{.Issue.Title}}" maxlength="255">
|
<input value="{{.Issue.Title}}" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
{{if and (or .IsIssueWriter .IsIssuePoster) (not .Repository.IsArchived)}}
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
|
||||||
<div class="four wide column">
|
<div class="four wide column">
|
||||||
<div class="edit-zone text right">
|
<div class="edit-zone text right">
|
||||||
<div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
|
<div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
|
||||||
|
|
Loading…
Reference in a new issue