Skip to content

Commit 948d5ea

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Add "View all branches/tags" entry to Branch Selector (go-gitea#32653) Remove all "floated" CSS styles (go-gitea#32691) Optimize the styling of icon buttons within file-header-right (go-gitea#32675) fix: show tag name on branch/tag selector if repo shown from tag ref (go-gitea#32689)
2 parents 5ebe735 + 576e31a commit 948d5ea

File tree

11 files changed

+52
-59
lines changed

11 files changed

+52
-59
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,8 @@ fork_to_different_account = Fork to a different account
10321032
fork_visibility_helper = The visibility of a forked repository cannot be changed.
10331033
fork_branch = Branch to be cloned to the fork
10341034
all_branches = All branches
1035+
view_all_branches = View all branches
1036+
view_all_tags = View all tags
10351037
fork_no_valid_owners = This repository can not be forked because there are no valid owners.
10361038
fork.blocked_user = Cannot fork the repository because you are blocked by the repository owner.
10371039
use_template = Use this template

templates/admin/user/list.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
</div>
88
</h4>
99
<div class="ui attached segment">
10-
<form class="ui form ignore-dirty" id="user-list-search-form">
11-
10+
<form class="ui form ignore-dirty flex-text-block" id="user-list-search-form">
11+
<div class="tw-flex-1">
12+
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
13+
</div>
1214
<!-- Right Menu -->
13-
<div class="ui right floated secondary filter menu">
15+
<div class="ui secondary menu tw-m-0">
1416
<!-- Status Filter Menu Item -->
1517
<div class="ui dropdown type jump item">
1618
<span class="text">{{ctx.Locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
@@ -51,8 +53,6 @@
5153
</div>
5254
</div>
5355
</div>
54-
55-
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
5656
</form>
5757
</div>
5858
<div class="ui attached table segment">

templates/repo/branch_dropdown.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* ShowTabBranches
1111
* ShowTabTagsTab
1212
* AllowCreateNewRef
13+
* ShowViewAllRefsEntry
1314

1415
Search "repo/branch_dropdown" in the template directory to find all occurrences.
1516
*/}}
@@ -24,6 +25,8 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
2425
data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}"
2526
data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}"
2627
data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}"
28+
data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}"
29+
data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}"
2730

2831
data-current-repo-default-branch="{{.Repository.DefaultBranch}}"
2932
data-current-repo-link="{{.Repository.Link}}"
@@ -37,6 +40,7 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
3740
data-show-tab-branches="{{.ShowTabBranches}}"
3841
data-show-tab-tags="{{.ShowTabTags}}"
3942
data-allow-create-new-ref="{{.AllowCreateNewRef}}"
43+
data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}"
4044

4145
data-enable-feed="{{ctx.RootData.EnableFeed}}"
4246
>

templates/repo/commits.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{{$branchDropdownCurrentRefType := "branch"}}
1010
{{$branchDropdownCurrentRefShortName := .BranchName}}
1111
{{if .IsViewTag}}
12-
{{$branchDropdownCurrentRefType := "tag"}}
13-
{{$branchDropdownCurrentRefShortName := .TagName}}
12+
{{$branchDropdownCurrentRefType = "tag"}}
13+
{{$branchDropdownCurrentRefShortName = .TagName}}
1414
{{end}}
1515
{{template "repo/branch_dropdown" dict
1616
"Repository" .Repository

templates/repo/home.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
{{$branchDropdownCurrentRefType := "branch"}}
5151
{{$branchDropdownCurrentRefShortName := .BranchName}}
5252
{{if .IsViewTag}}
53-
{{$branchDropdownCurrentRefType := "tag"}}
54-
{{$branchDropdownCurrentRefShortName := .TagName}}
53+
{{$branchDropdownCurrentRefType = "tag"}}
54+
{{$branchDropdownCurrentRefShortName = .TagName}}
5555
{{end}}
5656
{{template "repo/branch_dropdown" dict
5757
"Repository" .Repository
@@ -62,6 +62,7 @@
6262
"CurrentTreePath" .TreePath
6363
"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
6464
"AllowCreateNewRef" .CanCreateBranch
65+
"ShowViewAllRefsEntry" true
6566
}}
6667
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
6768
{{$cmpBranch := ""}}

templates/repo/issue/milestone_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="issue-navbar">
66
{{template "repo/issue/navbar" .}}
77
{{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}}
8-
<div class="ui right floated secondary menu">
8+
<div class="ui right">
99
<a class="ui primary button" href="{{$.RepoLink}}/milestones/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
1010
</div>
1111
{{end}}

templates/repo/view_file.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
<button class="ui mini basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
5757
{{end}}
5858
</div>
59-
<a download href="{{$.RawFileLink}}"><span class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.download_file"}}">{{svg "octicon-download"}}</span></a>
60-
<a id="copy-content" class="btn-octicon {{if not .CanCopyContent}} disabled{{end}}"{{if or .IsImageFile (and .HasSourceRenderedToggle (not .IsDisplayingSource))}} data-link="{{$.RawFileLink}}"{{end}} data-tooltip-content="{{if .CanCopyContent}}{{ctx.Locale.Tr "copy_content"}}{{else}}{{ctx.Locale.Tr "copy_type_unsupported"}}{{end}}">{{svg "octicon-copy" 14}}</a>
59+
<a download class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.download_file"}}" href="{{$.RawFileLink}}">{{svg "octicon-download"}}</a>
60+
<a id="copy-content" class="btn-octicon {{if not .CanCopyContent}} disabled{{end}}"{{if or .IsImageFile (and .HasSourceRenderedToggle (not .IsDisplayingSource))}} data-link="{{$.RawFileLink}}"{{end}} data-tooltip-content="{{if .CanCopyContent}}{{ctx.Locale.Tr "copy_content"}}{{else}}{{ctx.Locale.Tr "copy_type_unsupported"}}{{end}}">{{svg "octicon-copy"}}</a>
6161
{{if .EnableFeed}}
6262
<a class="btn-octicon" href="{{$.FeedURL}}/rss/{{$.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
63-
{{svg "octicon-rss" 14}}
63+
{{svg "octicon-rss"}}
6464
</a>
6565
{{end}}
6666
{{if .Repository.CanEnableEditor}}
6767
{{if .CanEditFile}}
68-
<a href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon" data-tooltip-content="{{.EditFileTooltip}}">{{svg "octicon-pencil"}}</span></a>
68+
<a class="btn-octicon" data-tooltip-content="{{.EditFileTooltip}}" href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}">{{svg "octicon-pencil"}}</a>
6969
{{else}}
7070
<span class="btn-octicon disabled" data-tooltip-content="{{.EditFileTooltip}}">{{svg "octicon-pencil"}}</span>
7171
{{end}}
7272
{{if .CanDeleteFile}}
73-
<a href="{{.RepoLink}}/_delete/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon btn-octicon-danger" data-tooltip-content="{{.DeleteFileTooltip}}">{{svg "octicon-trash"}}</span></a>
73+
<a class="btn-octicon btn-octicon-danger" data-tooltip-content="{{.DeleteFileTooltip}}" href="{{.RepoLink}}/_delete/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}">{{svg "octicon-trash"}}</a>
7474
{{else}}
7575
<span class="btn-octicon disabled" data-tooltip-content="{{.DeleteFileTooltip}}">{{svg "octicon-trash"}}</span>
7676
{{end}}

templates/user/settings/account.tmpl

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{{ctx.Locale.Tr "settings.manage_emails"}}
4141
</h4>
4242
<div class="ui attached segment">
43-
<div class="ui list">
43+
<div class="ui list flex-items-block">
4444
{{if $.EnableNotifyMail}}
4545
<div class="item">
4646
<div class="tw-mb-2">{{ctx.Locale.Tr "settings.email_desc"}}</div>
@@ -65,27 +65,34 @@
6565
</div>
6666
{{end}}
6767
{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
68-
{{range .Emails}}
69-
<div class="item">
70-
{{if not .IsPrimary}}
71-
<div class="right floated content">
68+
{{range .Emails}}
69+
<div class="item tw-flex-wrap">
70+
<div class="content tw-flex-1">
71+
<strong>{{.Email}}</strong>
72+
{{if .IsPrimary}}
73+
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
74+
{{end}}
75+
{{if .IsActivated}}
76+
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
77+
{{else}}
78+
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
79+
{{end}}
80+
</div>
81+
<div class="flex-text-block">
82+
{{if not .IsPrimary}}
7283
<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}">
7384
{{ctx.Locale.Tr "settings.delete_email"}}
7485
</button>
75-
</div>
76-
{{if .CanBePrimary}}
77-
<div class="right floated content">
86+
{{if .CanBePrimary}}
7887
<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
7988
{{$.CsrfTokenHtml}}
8089
<input name="_method" type="hidden" value="PRIMARY">
8190
<input name="id" type="hidden" value="{{.ID}}">
8291
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.primary_email"}}</button>
8392
</form>
84-
</div>
93+
{{end}}
8594
{{end}}
86-
{{end}}
87-
{{if not .IsActivated}}
88-
<div class="right floated content">
95+
{{if not .IsActivated}}
8996
<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
9097
{{$.CsrfTokenHtml}}
9198
<input name="_method" type="hidden" value="SENDACTIVATION">
@@ -96,22 +103,11 @@
96103
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.activate_email"}}</button>
97104
{{end}}
98105
</form>
99-
</div>
100-
{{end}}
101-
<div class="content tw-py-2">
102-
<strong>{{.Email}}</strong>
103-
{{if .IsPrimary}}
104-
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
105-
{{end}}
106-
{{if .IsActivated}}
107-
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
108-
{{else}}
109-
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
110106
{{end}}
107+
</div>
111108
</div>
112-
</div>
113-
{{end}}
114-
{{end}}
109+
{{end}}{{/* range Emails */}}
110+
{{end}}{{/* if manage_credentials */}}
115111
</div>
116112
</div>
117113
{{end}}

web_src/css/modules/list.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@
126126
cursor: pointer;
127127
}
128128

129-
.ui.list .list > .item [class*="right floated"],
130-
.ui.list > .item [class*="right floated"] {
131-
float: right;
132-
margin: 0 0 0 1em;
133-
}
134-
135129
.ui.menu .ui.list > .item,
136130
.ui.menu .ui.list .list > .item {
137131
display: list-item;

web_src/css/modules/menu.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -633,18 +633,6 @@
633633
}
634634
}
635635

636-
.ui.floated.menu {
637-
float: left;
638-
margin: 0 0.5rem 0 0;
639-
}
640-
.ui.floated.menu .item:last-child::before {
641-
display: none;
642-
}
643-
.ui.right.floated.menu {
644-
float: right;
645-
margin: 0 0 0 0.5rem;
646-
}
647-
648636
.ui.borderless.menu .item::before,
649637
.ui.borderless.menu .item .menu .item::before,
650638
.ui.menu .borderless.item::before {

0 commit comments

Comments
 (0)