diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-02-19 17:09:47 -0600 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-19 18:09:47 -0500 |
commit | d26d2497483b5ea4998350b6a03ee9a736e658da (patch) | |
tree | bd047b7fd37e1942875a17726696f9e456110826 /templates | |
parent | 2982413f8dc8d6976fb1f3839ee6abdd89da990b (diff) | |
download | gitea-d26d2497483b5ea4998350b6a03ee9a736e658da.tar.gz gitea-d26d2497483b5ea4998350b6a03ee9a736e658da.zip |
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.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/create.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 20 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 25 | ||||
-rw-r--r-- | templates/status/404.tmpl | 1 |
5 files changed, 36 insertions, 17 deletions
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index aa20f07760..44473c3a86 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -75,6 +75,7 @@ <input type="hidden" name="license" value="{{.license}}"> <div class="default text">{{.i18n.Tr "repo.license_helper"}}</div> <div class="menu"> + <div class="item" data-value="">{{.i18n.Tr "repo.license_helper"}}</div> {{range .Licenses}} <div class="item" data-value="{{.}}">{{.}}</div> {{end}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 3d8616ec94..0e3f56616c 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -29,7 +29,7 @@ </a> </div> {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}} - <div class="ui labeled button" tabindex="0"> + <div class="ui labeled button {{if and (not $.CanSignedUserFork) ($.IsSigned)}}disabled{{end}}" tabindex="0"> <a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny"> <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} </a> @@ -58,8 +58,8 @@ {{end}} {{if .Permission.CanRead $.UnitTypeExternalTracker}} - <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues" target="_blank" rel="noopener noreferrer"> - <i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} </span> + <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer"> + <i class="octicon octicon-link-external"></i> {{.i18n.Tr "repo.issues"}} </span> </a> {{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index e2e6b2be63..3359bd7ef0 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -57,17 +57,21 @@ {{end}} {{template "repo/sub_menu" .}} <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins"> - {{if and .PullRequestCtx.Allowed .IsViewBranch (not .Repository.IsArchived)}} - <div class="fitted item"> - <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}"> - <button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button> - </a> - </div> - {{end}} {{template "repo/branch_dropdown" .}} {{ $n := len .TreeNames}} {{ $l := Subtract $n 1}} - <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div> + <!-- If home page, show new PR. If not, show breadcrumb --> + {{if eq $n 0}} + {{if and .PullRequestCtx.Allowed .IsViewBranch (not .Repository.IsArchived)}} + <div class="fitted item"> + <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}"> + <button id="new-pull-request" class="ui compact basic button">{{.i18n.Tr "repo.pulls.compare_changes"}}</button> + </a> + </div> + {{end}} + {{else}} + <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div> + {{end}} <div class="right fitted item" id="file-buttons"> <div class="ui tiny blue buttons"> {{if .Repository.CanEnableEditor}} 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> diff --git a/templates/status/404.tmpl b/templates/status/404.tmpl index ee54e2de0a..8e6a013f03 100644 --- a/templates/status/404.tmpl +++ b/templates/status/404.tmpl @@ -1,4 +1,5 @@ {{template "base/head" .}} +{{if .IsRepo}}<div class="repository">{{template "repo/header" .}}</div>{{end}} <div class="ui container center"> <p style="margin-top: 100px"><img src="{{AppSubUrl}}/img/404.png" alt="404"/></p> <div class="ui divider"></div> |