From d26d2497483b5ea4998350b6a03ee9a736e658da Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 19 Feb 2019 17:09:47 -0600 Subject: Minor UI tweaks (#5980) * Remove all CommitStatus when a repo is deleted Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor UI tweaks (#5782) Added 'No License' option Added link and octicon change for external issue trackers Reset password now notifies right away if the code is invalid Signed-off-by: jolheiser <john.olheiser@gmail.com> * More UI tweaks More info in PR * Generate stylesheet for arc-green * Make gofmt work * Change PR integration since the button is changed * Rebase * Generate stylesheet * UI updates Made the PR button a "basic" button Vertically centered the issue checkboxes Labels will update only once after modal is closed * Commit to reference related issues Resolves #5782 Resolves #5861 Addresses original question in #5993 * Change the comment wording since PR button is no longer little and green. * Revert changes that made Windows work * Regenerate stylesheet * Regenerate stylesheets * make generate-stylesheets * Update integration again, changed button style Signed-off-by: jolheiser <john.olheiser@gmail.com> * Added ID to PR button Changed integration to use the ID to avoid breaking in the future * Added missing semi-colons * Added back distinction between issue actions and filters (overlooked it before) Moved action button over next to other action dropdowns * Remove extra tab formatting in list.tmpl * Remove more formatting from GoLand * Replace hardcoded "No License" with i18n license helper. --- templates/repo/issue/list.tmpl | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'templates/repo/issue/list.tmpl') diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index ebdd3dbb67..023dfececd 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -111,22 +111,33 @@ </div> </div> </div> - <div id="issue-actions" class="ui stackable grid"> + <div id="issue-actions" class="ui stackable grid hide"> <div class="six wide column"> - <div class="ui basic status buttons"> - <div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_open"}}</div> - <div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_close"}}</div> + <div class="ui tiny basic status buttons"> + <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}"> + <i class="octicon octicon-issue-opened"></i> + {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}} + </a> + <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}"> + <i class="octicon octicon-issue-closed"></i> + {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}} + </a> </div> </div> - {{/* Ten wide does not cope well and makes the columns stack. This seems to be related to jQuery's hide/show: in fact, switching issue-actions and issue-filters and having this ten wide will show this one correctly, but not the other one. */}} <div class="nine wide right aligned right floated column"> <div class="ui secondary filter stackable menu"> + <!-- Action Button --> + {{if .IsShowClosed}} + <div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_open"}}</div> + {{else}} + <div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_close"}}</div> + {{end}} <!-- Labels --> - <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto"> + <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item"> <span class="text"> {{.i18n.Tr "repo.issues.action_label"}} <i class="dropdown icon"></i> @@ -182,9 +193,11 @@ <div class="issue list"> {{range .Issues}} <li class="item"> + {{if $.CanWriteIssuesOrPulls}} <div class="ui checkbox issue-checkbox"> <input type="checkbox" data-issue-id={{.ID}}></input> </div> + {{end}} <div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div> <a class="title has-emoji" href="{{$.Link}}/{{.Index}}">{{.Title}}</a> -- cgit v1.2.3