Skip to content

Commit 8b4e045

Browse files
committed
Merge branch 'main' into lunny/replace_mail2
2 parents 3d1d284 + 576e31a commit 8b4e045

File tree

9 files changed

+43
-50
lines changed

9 files changed

+43
-50
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/home.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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/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 {

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ const sfc = {
8686
textCreateBranch: elRoot.getAttribute('data-text-create-branch'),
8787
textCreateRefFrom: elRoot.getAttribute('data-text-create-ref-from'),
8888
textNoResults: elRoot.getAttribute('data-text-no-results'),
89+
textViewAllBranches: elRoot.getAttribute('data-text-view-all-branches'),
90+
textViewAllTags: elRoot.getAttribute('data-text-view-all-tags'),
8991
9092
currentRepoDefaultBranch: elRoot.getAttribute('data-current-repo-default-branch'),
9193
currentRepoLink: elRoot.getAttribute('data-current-repo-link'),
@@ -99,6 +101,7 @@ const sfc = {
99101
showTabBranches: shouldShowTabBranches,
100102
showTabTags: elRoot.getAttribute('data-show-tab-tags') === 'true',
101103
allowCreateNewRef: elRoot.getAttribute('data-allow-create-new-ref') === 'true',
104+
showViewAllRefsEntry: elRoot.getAttribute('data-show-view-all-refs-entry') === 'true',
102105
103106
enableFeed: elRoot.getAttribute('data-enable-feed') === 'true',
104107
};
@@ -281,6 +284,11 @@ export default sfc; // activate IDE's Vue plugin
281284
<div class="message" v-if="showNoResults">
282285
{{ textNoResults }}
283286
</div>
287+
<template v-if="showViewAllRefsEntry">
288+
<div class="divider tw-m-0"/>
289+
<a v-if="selectedTab === 'branches'" class="item" :href="currentRepoLink + '/branches'">{{ textViewAllBranches }}</a>
290+
<a v-if="selectedTab === 'tags'" class="item" :href="currentRepoLink + '/tags'">{{ textViewAllTags }}</a>
291+
</template>
284292
</div>
285293
</div>
286294
</template>

0 commit comments

Comments
 (0)