diff options
author | silverwind <me@silverwind.io> | 2020-11-01 21:04:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-01 15:04:26 -0500 |
commit | 4617bb689b217ae039297ec16124e73b81487b15 (patch) | |
tree | 0320ce0f74a2e70da28b9d95d1e92a9602b8210b /templates | |
parent | 543697e61e4881256ab56a0fd26eed9765eac1de (diff) | |
download | gitea-4617bb689b217ae039297ec16124e73b81487b15.tar.gz gitea-4617bb689b217ae039297ec16124e73b81487b15.zip |
Misc UI fixes, add secondary color (#13378)
* Misc UI fixes, add secondary color
- Add secondary color, primarily used in arc-green currently
- Convert icons on release page to SVG
- Improve resolved conversation placeholder
- Diff fixes on arc-green
- Misc color tweaks
* fix comment header, adjust arc-green dropzone
* label margin, sidebar margin
* flexbox commits table and add primary button styles
* tooltip styles
* file header fixes
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/blame.tmpl | 22 | ||||
-rw-r--r-- | templates/repo/branch/list.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/commits_table.tmpl | 54 | ||||
-rw-r--r-- | templates/repo/diff/box.tmpl | 12 | ||||
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/diff/comments.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/section_unified.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 10 | ||||
-rw-r--r-- | templates/repo/view_file.tmpl | 46 |
11 files changed, 82 insertions, 86 deletions
diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 86c0695cbd..5d9a171019 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -1,6 +1,6 @@ <div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> - <h4 class="file-header ui top attached header"> - <div class="file-header-left"> + <h4 class="file-header ui top attached header df ac sb"> + <div class="file-header-left df ac"> <div class="file-info text grey normal mono"> <div class="file-info-entry"> {{.NumLines}} {{.i18n.Tr (TrN .i18n.Lang .NumLines "repo.line" "repo.lines") }} @@ -8,16 +8,14 @@ <div class="file-info-entry">{{FileSize .FileSize}}</div> </div> </div> - <div class="file-header-right"> - <div class="ui right file-actions"> - <div class="ui buttons"> - <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> - {{if not .IsViewCommit}} - <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> - {{end}} - <a class="ui button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a> - <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> - </div> + <div class="file-header-right file-actions df ac"> + <div class="ui buttons"> + <a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> + {{if not .IsViewCommit}} + <a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> + {{end}} + <a class="ui tiny button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a> + <a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> </div> </div> </h4> diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 58cbe10ca7..90b3b53d97 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -56,7 +56,7 @@ {{svg "octicon-shield-lock"}} {{end}} <a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a> - <p class="info">{{svg "octicon-git-commit"}}<a href="{{$.RepoLink}}/commit/{{.Commit.ID.String}}">{{ShortSha .Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p> + <p class="info df ac my-2">{{svg "octicon-git-commit" 16 "mr-2"}}<a href="{{$.RepoLink}}/commit/{{.Commit.ID.String}}">{{ShortSha .Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p> {{end}} </td> <td class="three wide ui"> diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 2ff8d5b4d8..89355f0653 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,31 +1,29 @@ -<h4 class="ui top attached header"> - <div class="ui stackable grid"> - <div class="five wide column"> - {{if or .PageIsCommits (gt .CommitCount 0)}} - {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} - {{else}} - {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}} - {{end}} - </div> - <div class="eleven wide right aligned column"> - {{if .PageIsCommits}} - <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search"> - <div class="ui tiny search input"> - <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> - </div> - - <div class="ui checkbox"> - <input type="checkbox" name="all" id="all" value="true" {{.All}}> - <label for="all">{{.i18n.Tr "repo.commits.search_all"}} </label> - </div> - <button class="ui blue tiny button" data-panel="#add-deploy-key-panel" data-tooltip={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button> - </form> - {{else if .IsDiffCompare}} - <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a> - ... - <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a> - {{end}} - </div> +<h4 class="ui top attached header commits-table df ac sb"> + <div class="commits-table-left df ac"> + {{if or .PageIsCommits (gt .CommitCount 0)}} + {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} + {{else}} + {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}} + {{end}} + </div> + <div class="commits-table-right df ac"> + {{if .PageIsCommits}} + <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search"> + <div class="ui tiny search input"> + <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> + </div> + + <div class="ui checkbox"> + <input type="checkbox" name="all" id="all" value="true" {{.All}}> + <label for="all">{{.i18n.Tr "repo.commits.search_all"}} </label> + </div> + <button class="ui primary tiny button mr-0" data-panel="#add-deploy-key-panel" data-tooltip={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button> + </form> + {{else if .IsDiffCompare}} + <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a> + ... + <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a> + {{end}} </div> </h4> diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index f30b81cb9e..c2a7ade64f 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -173,13 +173,13 @@ <td class="lines-type-marker"></td> <td class="add-comment-left"> {{if and $resolved (eq $line.GetCommentSide "previous")}} - <div class="ui top attached header"> + <div class="ui top attached header resolved-placeholder"> <span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span> - <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated"> + <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated"> {{svg "octicon-unfold"}} {{$.i18n.Tr "repo.issues.review.show_resolved"}} </button> - <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated"> + <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated"> {{svg "octicon-fold"}} {{$.i18n.Tr "repo.issues.review.hide_resolved"}} </button> @@ -207,15 +207,15 @@ </td> <td class="lines-num"></td> <td class="lines-type-marker"></td> - <td class="add-comment-right"> + <td class="add-comment-right resolved-placeholder"> {{if and $resolved (eq $line.GetCommentSide "proposed")}} <div class="ui top attached header"> <span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span> - <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated"> + <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated"> {{svg "octicon-unfold"}} {{$.i18n.Tr "repo.issues.review.show_resolved"}} </button> - <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated"> + <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated"> {{svg "octicon-fold"}} {{$.i18n.Tr "repo.issues.review.hide_resolved"}} </button> diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 6d1d3861a0..33626f31d3 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -1,6 +1,8 @@ {{if and $.root.SignedUserID (not $.Repository.IsArchived)}} {{if $.hidden}} - <button class="comment-form-reply ui green labeled icon tiny button"><i class="reply icon"></i> {{$.root.i18n.Tr "repo.diff.comment.reply"}}</button> + <button class="comment-form-reply ui green labeled icon tiny button"> + {{svg "octicon-reply" 16 "reply icon mr-2"}}{{$.root.i18n.Tr "repo.diff.comment.reply"}} + </button> {{end}} <form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.HTMLURL}}/files/reviews/comments" method="post"> {{$.root.CsrfTokenHtml}} diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 4785f3a513..cf4bd64cf9 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -27,7 +27,7 @@ </span> {{else}} <span class="text grey"> - <a class="mr-2" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}> + <a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}> {{.Poster.GetDisplayName}} </a> {{$.root.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index 1a461c7ad7..3b24cd453c 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -40,13 +40,13 @@ <td colspan="2" class="lines-num"></td> <td class="add-comment-left add-comment-right" colspan="2"> {{if $resolved}} - <div class = "ui attached header"> + <div class="ui attached header resolved-placeholder"> <span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span> - <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated"> + <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated"> {{svg "octicon-unfold"}} {{$.root.i18n.Tr "repo.issues.review.show_resolved"}} </button> - <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated"> + <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated"> {{svg "octicon-fold"}} {{$.root.i18n.Tr "repo.issues.review.hide_resolved"}} </button> diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 9699371e00..4ea6bd7cca 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -19,15 +19,15 @@ </a> {{end}} <div class="content"> - <div class="ui top attached header"> - <div class="header-left df ac"> + <div class="ui top attached header comment-header df ac sb"> + <div class="comment-header-left df ac"> {{if .OriginalAuthor }} <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span> {{else}} <span class="text grey"><a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span> {{end}} </div> - <div class="header-right actions df ac"> + <div class="comment-header-right actions df ac"> {{if not $.Repository.IsArchived}} {{if eq .PosterID .Issue.PosterID }} <div class="ui basic label"> diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index e08c47ff53..ed897fa14e 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -301,7 +301,7 @@ <div class="ui watching"> <span class="text"><strong>{{.i18n.Tr "notification.notifications"}}</strong></span> - <div> + <div class="mt-3"> <form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/watch"> <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}" /> {{$.CsrfTokenHtml}} @@ -519,7 +519,7 @@ <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"> + <button class="fluid ui show-modal button {{if .Issue.IsLocked }} negative {{ end }}" data-modal="#lock"> {{if .Issue.IsLocked}} {{svg "octicon-key"}} {{.i18n.Tr "repo.issues.unlock"}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index c353cc7627..36bac57c42 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -28,17 +28,17 @@ <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span> {{end}} <span class="tag text blue"> - <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> + <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a> </span> <span class="commit"> - <a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> + <a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a> </span> {{end}} </div> <div class="ui twelve wide column detail"> {{if .IsTag}} <h4> - <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> + <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a> </h4> <p class="text grey"> {{ if gt .Publisher.ID 0 }} @@ -51,7 +51,7 @@ </p> <div class="download"> {{if $.Permission.CanRead $.UnitTypeCode}} - <a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> + <a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a> <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a> <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz">{{svg "octicon-file-zip"}} TAR.GZ</a> {{end}} @@ -64,7 +64,7 @@ <p class="text grey"> <span class="author"> {{if .OriginalAuthor}} - <i class="fa fa-github" aria-hidden="true"></i> + {{svg "octicon-mark-github"}} {{.OriginalAuthor}} {{else if .Publisher}} <img class="img-10" src="{{.Publisher.RelAvatarLink}}"> diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 2f4fc12e62..a8d60bd96e 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -1,5 +1,5 @@ <div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> - <h4 class="file-header ui top attached header"> + <h4 class="file-header ui top attached header df ac sb"> <div class="file-header-left df ac"> {{if .ReadmeInList}} {{svg "octicon-book" 16 "mr-3"}} @@ -31,31 +31,29 @@ {{end}} </div> {{if not .ReadmeInList}} - <div class="file-header-right df ac"> - <div class="ui right file-actions"> - <div class="ui buttons"> - <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> - {{if not .IsViewCommit}} - <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> - {{end}} - {{if .IsTextFile}} - <a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> - {{end}} - <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> - </div> - {{if .Repository.CanEnableEditor}} - {{if .CanEditFile}} - <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a> - {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span> - {{end}} - {{if .CanDeleteFile}} - <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a> - {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span> - {{end}} + <div class="file-header-right file-actions df ac"> + <div class="ui buttons"> + <a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> + {{if not .IsViewCommit}} + <a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> {{end}} + {{if .IsTextFile}} + <a class="ui tiny button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> + {{end}} + <a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> </div> + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a> + {{else}} + <span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span> + {{end}} + {{if .CanDeleteFile}} + <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a> + {{else}} + <span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span> + {{end}} + {{end}} </div> {{end}} </h4> |