diff options
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/actions/openclose.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/branch_dropdown.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/commits.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/labels.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/issue/milestones.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/issue/navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/new.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/openclose.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view.tmpl | 25 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/issue/view_title.tmpl | 192 | ||||
-rw-r--r-- | templates/repo/projects/list.tmpl | 60 | ||||
-rw-r--r-- | templates/repo/pulls/commits.tmpl | 11 | ||||
-rw-r--r-- | templates/repo/pulls/files.tmpl | 14 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 10 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/sub_menu_release_tag.tmpl | 2 |
19 files changed, 159 insertions, 204 deletions
diff --git a/templates/repo/actions/openclose.tmpl b/templates/repo/actions/openclose.tmpl index 74630187cd..6874115a19 100644 --- a/templates/repo/actions/openclose.tmpl +++ b/templates/repo/actions/openclose.tmpl @@ -1,4 +1,4 @@ -<div class="small-pill-buttons ui compact tiny menu"> +<div class="small-menu-items ui compact tiny menu"> <a class="{{if not .IsShowClosed}}active {{end}}item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=open"> {{svg "octicon-issue-opened" 16 "gt-mr-3"}} {{.locale.Tr "actions.runs.open_tab" $.NumOpenActionRuns}} diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 0f79474d10..984899552d 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -1,3 +1,8 @@ +{{/* Attributes: +* root +* ContainerClasses +* (TODO: search "branch_dropdown" in the template direcotry) +*/}} {{$defaultBranch := $.root.BranchName}} {{if and .root.IsViewTag (not .noTag)}} {{$defaultBranch = .root.TagName}} @@ -62,10 +67,10 @@ window.config.pageData.branchDropdownDataList.push(data); </script> -<div class="fitted item js-branch-tag-selector"> +<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"> {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} <div class="ui floating filter dropdown custom"> - <button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df"> + <button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-m-0"> <span class="text gt-df gt-ac gt-mr-2"> {{if .release}} {{.root.locale.Tr "repo.release.compare"}} diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 2f890a1f9d..1647d69597 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -5,7 +5,7 @@ {{template "repo/sub_menu" .}} <div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3"> <div class="gt-df gt-ac"> - {{template "repo/branch_dropdown" dict "root" .}} + {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} <a href="{{.RepoLink}}/graph" class="ui basic small compact button"> <span class="text"> {{svg "octicon-git-branch"}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index f9dbf49e5b..e7a76cdaf5 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -63,7 +63,7 @@ {{template "repo/sub_menu" .}} <div class="repo-button-row gt-df gt-ac gt-sb gt-fw"> <div class="gt-df gt-ac gt-fw gt-gap-y-3"> - {{template "repo/branch_dropdown" dict "root" .}} + {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} {{$n := len .TreeNames}} {{$l := Eval $n "-" 1}} <!-- If home page, show new pr. If not, show breadcrumb --> diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl index 0a25d9c87f..93e264e4cd 100644 --- a/templates/repo/issue/labels.tmpl +++ b/templates/repo/issue/labels.tmpl @@ -2,7 +2,7 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository labels"> {{template "repo/header" .}} <div class="ui container"> - <div class="navbar"> + <div class="navbar gt-mb-4"> {{template "repo/issue/navbar" .}} {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} <div class="ui right"> @@ -10,7 +10,6 @@ </div> {{end}} </div> - <div class="ui divider"></div> {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} {{template "repo/issue/labels/label_new" .}} {{end}} diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 8e553ee7bb..a7311c2490 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -17,9 +17,6 @@ {{end}} {{end}} </div> - - <div class="ui divider"></div> - <div id="issue-filters" class="issue-list-toolbar"> <div class="issue-list-toolbar-left"> {{if $.CanWriteIssuesOrPulls}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index ceaad947d2..d7e782e20d 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -2,7 +2,7 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository milestones"> {{template "repo/header" .}} <div class="ui container"> - <div class="navbar"> + <div class="navbar gt-mb-4"> {{template "repo/issue/navbar" .}} {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} <div class="ui right"> @@ -10,11 +10,10 @@ </div> {{end}} </div> - <div class="ui divider"></div> {{template "base/alert" .}} <div class="list-header"> - <div class="small-pill-buttons ui compact tiny menu"> + <div class="small-menu-items ui compact tiny menu"> <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}"> {{svg "octicon-milestone" 16 "gt-mr-3"}} {{.locale.PrettyNumber .OpenCount}} {{.locale.Tr "repo.issues.open_title"}} diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl index da4f17d28e..944c6b194a 100644 --- a/templates/repo/issue/navbar.tmpl +++ b/templates/repo/issue/navbar.tmpl @@ -1,4 +1,4 @@ -<h2 class="ui compact small menu header small-pill-buttons"> +<h2 class="ui compact small menu header small-menu-items"> <a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{.locale.Tr "repo.labels"}}</a> <a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{.locale.Tr "repo.milestones"}}</a> </h2> diff --git a/templates/repo/issue/new.tmpl b/templates/repo/issue/new.tmpl index 6abff2adde..780e874bc6 100644 --- a/templates/repo/issue/new.tmpl +++ b/templates/repo/issue/new.tmpl @@ -2,10 +2,6 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository new issue"> {{template "repo/header" .}} <div class="ui container"> - <div class="navbar"> - {{template "repo/issue/navbar" .}} - </div> - <div class="ui divider"></div> {{if .Flash.WarningMsg}} {{/* There's already an importing of alert.tmpl in new_form.tmpl, diff --git a/templates/repo/issue/openclose.tmpl b/templates/repo/issue/openclose.tmpl index 6c8529f0ff..a5916ed793 100644 --- a/templates/repo/issue/openclose.tmpl +++ b/templates/repo/issue/openclose.tmpl @@ -1,4 +1,4 @@ -<div class="small-pill-buttons ui compact tiny menu"> +<div class="small-menu-items ui compact tiny menu"> <a class="{{if not .IsShowClosed}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&project={{.ProjectID}}&assignee={{.AssigneeID}}&poster={{.PosterID}}"> {{if .PageIsPullList}} {{svg "octicon-git-pull-request" 16 "gt-mr-3"}} diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index c92b50444c..1ef9e735bd 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -2,32 +2,11 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull"> {{template "repo/header" .}} <div class="ui container"> - <div class="ui two column grid"> - <div class="column"> - {{template "repo/issue/navbar" .}} - </div> - {{if and (not .Repository.IsArchived) (not .Issue.IsPull)}} - <div class="column right aligned"> - {{if .PageIsIssueList}} - <a class="ui green button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{.locale.Tr "repo.issues.new"}}</a> - {{else}} - <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName | PathEscapeSegments}}...{{.PullRequestCtx.HeadInfoSubURL}}">{{.locale.Tr "repo.pulls.new"}}</a> - {{end}} - </div> - {{end}} - </div> - <div class="ui divider"></div> + {{template "repo/issue/view_title" .}} {{if .Issue.IsPull}} - {{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} - <div class="ui bottom attached tab pull active" data-tab="request-{{.ID}}"> - {{template "repo/issue/view_content" .}} - </div> - {{else}} - <div> - {{template "repo/issue/view_content" .}} - </div> {{end}} + {{template "repo/issue/view_content" .}} </div> </div> {{template "base/footer" .}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 7d3bce2b6a..e9a82425ba 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -1,13 +1,4 @@ <div class="ui stackable grid"> - {{if .Flash}} - <div class="sixteen wide column"> - {{template "base/alert" .}} - </div> - {{end}} - {{if not .Issue.IsPull}} - {{template "repo/issue/view_title" .}} - {{end}} - <!-- I know, there is probably a better way to do this (moved from sidebar.tmpl, original author: 6543 @ 2021-02-28) --> <!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) --> <input type="hidden" id="repolink" value="{{$.RepoRelPath}}"> diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index cf12daee04..f9febbde01 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -1,107 +1,119 @@ -<div class="sixteen wide column title"> +{{if .Flash}} + <div class="sixteen wide column gt-mb-3"> + {{template "base/alert" .}} + </div> +{{end}} +<div class="issue-title-header"> <div class="issue-title" id="issue-title-wrapper"> - {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} - <button id="edit-title" class="ui basic button secondary edit-button not-in-edit">{{.locale.Tr "repo.issues.edit"}}</button> - {{end}} - <h1> - <span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}}</span> - <span class="index">#{{.Issue.Index}}</span> - <div id="edit-title-input" class="ui input gt-ml-4 gt-hidden"> + <h1 class="gt-word-break"> + <span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}} <span class="index">#{{.Issue.Index}}</span> +</span> + <div id="edit-title-input" class="ui input gt-f1 gt-hidden"> <input value="{{.Issue.Title}}" maxlength="255" autocomplete="off"> </div> </h1> + <div class="issue-title-buttons"> + {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} + <button id="edit-title" class="ui small basic button secondary edit-button not-in-edit{{if .Issue.IsPull}} gt-mr-0{{end}}">{{.locale.Tr "repo.issues.edit"}}</button> + {{end}} + {{if not .Issue.IsPull}} + <a role="button" class="ui small green button new-issue-button gt-mr-0" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{.locale.Tr "repo.issues.new"}}</a> + {{end}} + </div> {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} <div class="edit-buttons"> - <button id="cancel-edit-title" class="ui basic button secondary in-edit gt-hidden">{{.locale.Tr "repo.issues.cancel"}}</button> - <button id="save-edit-title" class="ui primary button in-edit gt-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button> + <button id="cancel-edit-title" class="ui small basic button secondary in-edit gt-hidden">{{.locale.Tr "repo.issues.cancel"}}</button> + <button id="save-edit-title" class="ui small primary button in-edit gt-hidden gt-mr-0" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button> </div> {{end}} </div> - {{if .HasMerged}} - <div class="ui purple large label">{{svg "octicon-git-merge" 16}} {{if eq .Issue.PullRequest.Status 3}}{{.locale.Tr "repo.pulls.manually_merged"}}{{else}}{{.locale.Tr "repo.pulls.merged"}}{{end}}</div> - {{else if .Issue.IsClosed}} - <div class="ui red large label">{{if .Issue.IsPull}}{{svg "octicon-git-pull-request"}}{{else}}{{svg "octicon-issue-closed"}}{{end}} {{.locale.Tr "repo.issues.closed_title"}}</div> - {{else if .Issue.IsPull}} - {{if .IsPullWorkInProgress}} - <div class="ui grey large label">{{svg "octicon-git-pull-request-draft"}} {{.locale.Tr "repo.issues.draft_title"}}</div> - {{else}} - <div class="ui green large label">{{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.issues.open_title"}}</div> - {{end}} - {{else}} - <div class="ui green large label">{{svg "octicon-issue-opened"}} {{.locale.Tr "repo.issues.open_title"}}</div> - {{end}} - - {{if .Issue.IsPull}} - {{$headHref := .HeadTarget|Escape}} - {{if .HeadBranchLink}} - {{$headHref = printf "<a href=\"%s\">%s</a>" (.HeadBranchLink | Escape) $headHref}} - {{end}} - {{$headHref = printf "%s <a data-tooltip-content=\"%s\" data-clipboard-text=\"%s\">%s</a>" $headHref (.locale.Tr "copy_branch") (.HeadTarget | Escape) (svg "octicon-copy" 14)}} - {{$baseHref := .BaseTarget|Escape}} - {{if .BaseBranchLink}} - {{$baseHref = printf "<a href=\"%s\">%s</a>" (.BaseBranchLink | Escape) $baseHref}} - {{end}} - {{if .Issue.PullRequest.HasMerged}} - {{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.locale}} - {{if .Issue.OriginalAuthor}} - {{.Issue.OriginalAuthor}} - <span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span> + <div class="issue-title-meta"> + {{if .HasMerged}} + <div class="ui purple label issue-state-label">{{svg "octicon-git-merge" 16 "gt-mr-2"}} {{if eq .Issue.PullRequest.Status 3}}{{.locale.Tr "repo.pulls.manually_merged"}}{{else}}{{.locale.Tr "repo.pulls.merged"}}{{end}}</div> + {{else if .Issue.IsClosed}} + <div class="ui red label issue-state-label">{{if .Issue.IsPull}}{{svg "octicon-git-pull-request"}}{{else}}{{svg "octicon-issue-closed"}}{{end}} {{.locale.Tr "repo.issues.closed_title"}}</div> + {{else if .Issue.IsPull}} + {{if .IsPullWorkInProgress}} + <div class="ui grey label issue-state-label">{{svg "octicon-git-pull-request-draft"}} {{.locale.Tr "repo.issues.draft_title"}}</div> {{else}} - <a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.GetDisplayName}}</a> - <span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span> + <div class="ui green label issue-state-label">{{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.issues.open_title"}}</div> {{end}} {{else}} - {{if .Issue.OriginalAuthor}} - <span id="pull-desc" class="pull-desc">{{.Issue.OriginalAuthor}} {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}}</span> - {{else}} - <span id="pull-desc" class="pull-desc"> - <a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a> - {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}} - </span> - {{end}} - <span id="pull-desc-edit" class="gt-hidden"> - <div class="ui floating filter dropdown"> - <div class="ui basic small button"> - <span class="text">{{.locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span> - </div> - </div> - {{svg "octicon-arrow-right"}} - <div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}"> - <div class="ui basic small button"> - <span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{.locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} - </div> - <div class="menu"> - <div class="ui icon search input"> - <i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i> - <input name="search" placeholder="{{.locale.Tr "repo.pulls.filter_branch"}}..."> + <div class="ui green label issue-state-label">{{svg "octicon-issue-opened"}} {{.locale.Tr "repo.issues.open_title"}}</div> + {{end}} + <div class="gt-ml-3"> + {{if .Issue.IsPull}} + {{$headHref := .HeadTarget|Escape}} + {{if .HeadBranchLink}} + {{$headHref = printf "<a href=\"%s\">%s</a>" (.HeadBranchLink | Escape) $headHref}} + {{end}} + {{$headHref = printf "%s <a data-tooltip-content=\"%s\" data-clipboard-text=\"%s\">%s</a>" $headHref (.locale.Tr "copy_branch") (.HeadTarget | Escape) (svg "octicon-copy" 14)}} + {{$baseHref := .BaseTarget|Escape}} + {{if .BaseBranchLink}} + {{$baseHref = printf "<a href=\"%s\">%s</a>" (.BaseBranchLink | Escape) $baseHref}} + {{end}} + {{if .Issue.PullRequest.HasMerged}} + {{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.locale}} + {{if .Issue.OriginalAuthor}} + {{.Issue.OriginalAuthor}} + <span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span> + {{else}} + <a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.GetDisplayName}}</a> + <span class="pull-desc">{{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}}</span> + {{end}} + {{else}} + {{if .Issue.OriginalAuthor}} + <span id="pull-desc" class="pull-desc">{{.Issue.OriginalAuthor}} {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}}</span> + {{else}} + <span id="pull-desc" class="pull-desc"> + <a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a> + {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}} + </span> + {{end}} + <span id="pull-desc-edit" class="gt-hidden"> + <div class="ui floating filter dropdown"> + <div class="ui basic small button"> + <span class="text">{{.locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span> + </div> </div> - <div class="scrolling menu" id="branch-select"> - {{range .Branches}} - {{$sameBase := ne $.BaseName $.HeadUserName}} - {{$differentBranch := ne . $.HeadBranch}} - {{if or $sameBase $differentBranch}} - <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div> - {{end}} - {{end}} + {{svg "octicon-arrow-right"}} + <div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}"> + <div class="ui basic small button"> + <span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{.locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span> + {{svg "octicon-triangle-down" 14 "dropdown icon"}} + </div> + <div class="menu"> + <div class="ui icon search input"> + <i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i> + <input name="search" placeholder="{{.locale.Tr "repo.pulls.filter_branch"}}..."> + </div> + <div class="scrolling menu" id="branch-select"> + {{range .Branches}} + {{$sameBase := ne $.BaseName $.HeadUserName}} + {{$differentBranch := ne . $.HeadBranch}} + {{if or $sameBase $differentBranch}} + <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div> + {{end}} + {{end}} + </div> + </div> </div> - </div> - </div> - </span> - {{end}} - {{else}} - {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} - <span class="time-desc"> - {{if .Issue.OriginalAuthor}} - {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape) | Safe}} - {{else if gt .Issue.Poster.ID 0}} - {{$.locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape) | Safe}} + </span> + {{end}} {{else}} - {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}} + {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} + <span class="time-desc"> + {{if .Issue.OriginalAuthor}} + {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape) | Safe}} + {{else if gt .Issue.Poster.ID 0}} + {{$.locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape) | Safe}} + {{else}} + {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}} + {{end}} + · + {{$.locale.Tr "repo.issues.num_comments" .Issue.NumComments}} + </span> {{end}} - · - {{$.locale.Tr "repo.issues.num_comments" .Issue.NumComments}} - </span> - {{end}} - <div class="ui divider"></div> + </div> + </div> </div> diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl index 5cd94c626d..a5f99cee66 100644 --- a/templates/repo/projects/list.tmpl +++ b/templates/repo/projects/list.tmpl @@ -2,41 +2,39 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository projects milestones"> {{template "repo/header" .}} <div class="ui container"> - <div class="navbar"> - {{template "repo/issue/navbar" .}} - {{if and .CanWriteProjects (not .Repository.IsArchived)}} - <div class="ui right"> - <a class="ui small green button" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a> + <div class="navbar gt-mb-4"> + <div> + <div class="small-menu-items ui compact tiny menu"> + <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open"> + {{svg "octicon-project" 16 "gt-mr-3"}} + {{.locale.PrettyNumber .OpenCount}} {{.locale.Tr "repo.issues.open_title"}} + </a> + <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=closed"> + {{svg "octicon-check" 16 "gt-mr-3"}} + {{.locale.PrettyNumber .ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}} + </a> </div> - {{end}} - </div> - <div class="ui divider"></div> - {{template "base/alert" .}} - <div class="small-pill-buttons ui compact tiny menu"> - <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open"> - {{svg "octicon-project" 16 "gt-mr-3"}} - {{.locale.PrettyNumber .OpenCount}} {{.locale.Tr "repo.issues.open_title"}} - </a> - <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=closed"> - {{svg "octicon-check" 16 "gt-mr-3"}} - {{.locale.PrettyNumber .ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}} - </a> - </div> - - <div class="ui right floated secondary filter menu"> - <!-- Sort --> - <div class="ui dropdown type jump item"> - <span class="text"> - {{.locale.Tr "repo.issues.filter_sort"}} - {{svg "octicon-triangle-down" 14 "dropdown icon"}} - </span> - <div class="menu"> - <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> - <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> - <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> + </div> + <div> + <!-- Sort --> + <div class="ui small dropdown type jump item"> + <span class="text"> + {{.locale.Tr "repo.issues.filter_sort"}} + {{svg "octicon-triangle-down" 14 "dropdown icon"}} + </span> + <div class="menu"> + <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> + <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> + <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> + </div> </div> + {{if and .CanWriteProjects (not .Repository.IsArchived)}} + <a class="ui small green button gt-ml-4" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a> + {{end}} </div> </div> + {{template "base/alert" .}} + <div class="milestone list"> {{range .Projects}} <li class="item"> diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl index bb113da268..bf6e8128d4 100644 --- a/templates/repo/pulls/commits.tmpl +++ b/templates/repo/pulls/commits.tmpl @@ -2,18 +2,9 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull commits"> {{template "repo/header" .}} <div class="ui container"> - <div class="navbar"> - {{template "repo/issue/navbar" .}} - <div class="ui right"> - <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName | PathEscapeSegments}}...{{.PullRequestCtx.HeadInfoSubURL}}">{{.locale.Tr "repo.pulls.new"}}</a> - </div> - </div> - <div class="ui divider"></div> {{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} - <div class="ui bottom attached tab pull active"> - {{template "repo/commits_table" .}} - </div> + {{template "repo/commits_table" .}} </div> </div> {{template "base/footer" .}} diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl index 1e02dfa397..feec6eae74 100644 --- a/templates/repo/pulls/files.tmpl +++ b/templates/repo/pulls/files.tmpl @@ -5,20 +5,10 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull files diff"> {{template "repo/header" .}} - <div class="ui container fluid padded"> - <div class="navbar"> - {{template "repo/issue/navbar" .}} - <div class="ui right"> - <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName | PathEscapeSegments}}...{{.PullRequestCtx.HeadInfoSubURL}}">{{.locale.Tr "repo.pulls.new"}}</a> - </div> - </div> - <div class="ui divider"></div> + <div class="ui container"> {{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} - {{template "base/alert" .}} - <div class="ui bottom attached tab pull active"> - {{template "repo/diff/box" .}} - </div> + {{template "repo/diff/box" .}} </div> </div> {{template "base/footer" .}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 3d596a49e2..be0976c1af 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -14,13 +14,11 @@ <ul id="release-list"> {{range $idx, $release := .Releases}} <li class="ui grid"> - <div class="ui four wide column meta gt-mt-2"> - <a class="gt-df gt-ac gt-je muted" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a> + <div class="ui four wide column meta"> + <a class="gt-db muted" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a> {{if .Sha1}} - <span class="commit"> - <a class="gt-mono muted" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}</a> - </span> - {{template "repo/branch_dropdown" dict "root" $ "release" .}} + <a class="gt-mono muted gt-db gt-mt-4 gt-pt-1" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}</a> + {{template "repo/branch_dropdown" dict "root" $ "release" . "ContainerClasses" "gt-mt-4"}} {{end}} </div> <div class="ui twelve wide column detail"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index af753ba670..688d00bd72 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -91,7 +91,7 @@ <td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td> <td>{{DateTime "full" .Mirror.UpdatedUnix}}</td> <td class="right aligned"> - <form method="post" style="display: inline-block"> + <form method="post gt-dib"> {{.CsrfTokenHtml}} <input type="hidden" name="action" value="mirror-sync"> <button class="ui primary tiny button inline text-thin">{{$.locale.Tr "repo.settings.sync_mirror"}}</button> @@ -169,13 +169,13 @@ <td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td> <td>{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td> <td class="right aligned"> - <form method="post" style="display: inline-block"> + <form method="post gt-dib"> {{$.CsrfTokenHtml}} <input type="hidden" name="action" value="push-mirror-remove"> <input type="hidden" name="push_mirror_id" value="{{.ID}}"> <button class="ui basic red tiny button inline text-thin">{{$.locale.Tr "remove"}}</button> </form> - <form method="post" style="display: inline-block"> + <form method="post gt-dib"> {{$.CsrfTokenHtml}} <input type="hidden" name="action" value="push-mirror-sync"> <input type="hidden" name="push_mirror_id" value="{{.ID}}"> diff --git a/templates/repo/sub_menu_release_tag.tmpl b/templates/repo/sub_menu_release_tag.tmpl index 2795241556..c700893ee6 100644 --- a/templates/repo/sub_menu_release_tag.tmpl +++ b/templates/repo/sub_menu_release_tag.tmpl @@ -2,7 +2,7 @@ {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} {{if $canReadReleases}} - <h2 class="ui compact small menu header small-pill-buttons"> + <h2 class="ui compact small menu header small-menu-items"> <a class="{{if .PageIsReleaseList}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.Tr "repo.release.releases"}}</a> {{if $canReadCode}} <a class="{{if .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/tags">{{.locale.Tr "repo.release.tags"}}</a> |