Skip to content

Commit 2eb7c56

Browse files
HEREYUAsilverwind
andauthored
1 parent 94512ee commit 2eb7c56

File tree

7 files changed

+45
-9
lines changed

7 files changed

+45
-9
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ filter.not_template = Not Template
156156
filter.public = Public
157157
filter.private = Private
158158

159+
no_results_found = No results found.
160+
159161
[search]
160162
search = Search...
161163
type_tooltip = Search type
@@ -1763,7 +1765,6 @@ pulls.compare_compare = pull from
17631765
pulls.switch_comparison_type = Switch comparison type
17641766
pulls.switch_head_and_base = Switch head and base
17651767
pulls.filter_branch = Filter branch
1766-
pulls.no_results = No results found.
17671768
pulls.show_all_commits = Show all commits
17681769
pulls.show_changes_since_your_last_review = Show changes since your last review
17691770
pulls.showing_only_single_commit = Showing only changes of commit %[1]s

templates/repo/branch_dropdown.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'repoLink': {{.root.RepoLink}},
5757
'treePath': {{.root.TreePath}},
5858
'branchNameSubURL': {{.root.BranchNameSubURL}},
59-
'noResults': {{ctx.Locale.Tr "repo.pulls.no_results"}},
59+
'noResults': {{ctx.Locale.Tr "no_results_found"}},
6060
};
6161
{{if .release}}
6262
data.release = {

templates/repo/diff/compare.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{{- end -}}
3030
<div class="ui segment choose branch">
3131
<a class="gt-mr-3" href="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments $.HeadBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{end}}{{PathEscapeSegments $.BaseBranch}}" title="{{ctx.Locale.Tr "repo.pulls.switch_head_and_base"}}">{{svg "octicon-git-compare"}}</a>
32-
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
32+
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
3333
<div class="ui basic small button">
3434
<span class="text">{{if $.PageIsComparePull}}{{ctx.Locale.Tr "repo.pulls.compare_base"}}{{else}}{{ctx.Locale.Tr "repo.compare.compare_base"}}{{end}}: {{$BaseCompareName}}:{{$.BaseBranch}}</span>
3535
{{svg "octicon-triangle-down" 14 "dropdown icon"}}

templates/repo/issue/branch_selector_field.tmpl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<form method="post" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form">
55
{{$.CsrfTokenHtml}}
66
</form>
7-
8-
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
7+
{{/* TODO: share this branch selector dropdown with the same in repo page */}}
8+
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
99
<div class="ui basic small button">
1010
<span class="text branch-name">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span>
1111
{{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
@@ -18,25 +18,28 @@
1818
<div class="header">
1919
<div class="ui grid">
2020
<div class="two column row">
21-
<a class="reference column" href="#" data-target="#branch-list">
21+
<a class="reference column muted" href="#" data-target="#branch-list">
2222
<span class="text black">
2323
{{svg "octicon-git-branch" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.branches"}}
2424
</span>
2525
</a>
26-
<a class="reference column" href="#" data-target="#tag-list">
26+
<a class="reference column muted" href="#" data-target="#tag-list">
2727
<span class="text">
2828
{{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.tags"}}
2929
</span>
3030
</a>
3131
</div>
3232
</div>
3333
</div>
34+
<div class="branch-tag-divider"></div>
3435
<div id="branch-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}">
3536
{{if .Reference}}
3637
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
3738
{{end}}
3839
{{range .Branches}}
3940
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
41+
{{else}}
42+
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
4043
{{end}}
4144
</div>
4245
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} gt-hidden">
@@ -45,6 +48,8 @@
4548
{{end}}
4649
{{range .Tags}}
4750
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
51+
{{else}}
52+
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
4853
{{end}}
4954
</div>
5055
</div>

templates/repo/issue/view_title.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
</div>
7878
</div>
7979
{{svg "octicon-arrow-right"}}
80-
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
80+
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
8181
<div class="ui basic small button">
8282
<span class="text" id="pull-target-branch" data-basename="{{$.BaseName}}" data-branch="{{$.BaseBranch}}">{{ctx.Locale.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
8383
{{svg "octicon-triangle-down" 14 "dropdown icon"}}

templates/repo/wiki/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="ui container">
66
<div class="repo-button-row">
77
<div class="gt-df gt-ac">
8-
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
8+
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
99
<div class="ui basic small button">
1010
<span class="text">
1111
{{ctx.Locale.Tr "repo.wiki.page"}}:

web_src/css/repo.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,3 +3009,33 @@ tbody.commit-list {
30093009
#cherry-pick-modal .scrolling.menu {
30103010
max-height: 200px;
30113011
}
3012+
3013+
/* Branch tag selector - TODO: Merge this into the same selector on repo page */
3014+
.repository .issue-content .issue-content-right .ui.grid .column.row {
3015+
padding: 10px;
3016+
padding-bottom: 0;
3017+
}
3018+
.repository .issue-content .issue-content-right .ui.grid .column.muted {
3019+
padding: 0;
3020+
}
3021+
.repository .issue-content .issue-content-right .ui.grid .column.muted .text {
3022+
display: inline-block;
3023+
padding: 10px;
3024+
width: 100%;
3025+
text-align: center;
3026+
border: 1px solid transparent;
3027+
border-bottom: none;
3028+
}
3029+
.repository .issue-content .issue-content-right .ui.grid .column.muted .text.black {
3030+
border-color: var(--color-secondary);
3031+
background: var(--color-menu);
3032+
border-top-left-radius: var(--border-radius);
3033+
border-top-right-radius: var(--border-radius);
3034+
}
3035+
.repository .issue-content .issue-content-right .ui.dropdown .scrolling.menu {
3036+
border-top: none;
3037+
}
3038+
.repository .issue-content .issue-content-right .branch-tag-divider {
3039+
margin-top: -1px;
3040+
border-top: 1px solid var(--color-secondary);
3041+
}

0 commit comments

Comments
 (0)