Skip to content

Commit 0d4b119

Browse files
committed
Merge remote-tracking branch 'giteaoffical/main'
* giteaoffical/main: Fix issue not showing on default board and add test (go-gitea#27720) Show placeholder email in privacy popup (go-gitea#27770) Add word-break to organization name and description (go-gitea#26624) Add border to file tree 'sub-items' and add padding to 'item-file' (go-gitea#27593) Fix the missing repo count in new team page and edit team page (go-gitea#27743) Only show diff file tree when more than one file changed (go-gitea#27775) Add gap between diff boxes (go-gitea#27776)
2 parents 356b2f4 + 1eae2aa commit 0d4b119

File tree

13 files changed

+38
-12
lines changed

13 files changed

+38
-12
lines changed

models/issues/issue_search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func applyProjectBoardCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.S
186186
if opts.ProjectBoardID > 0 {
187187
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectBoardID}))
188188
} else if opts.ProjectBoardID == db.NoConditionID {
189-
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Neq{"project_board_id": 0}))
189+
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": 0}))
190190
}
191191
return sess
192192
}

modules/indexer/issues/indexer_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ func searchIssueInProject(t *testing.T) {
382382
},
383383
[]int64{1},
384384
},
385+
{
386+
SearchOptions{
387+
ProjectBoardID: int64Pointer(0), // issue with in default board
388+
},
389+
[]int64{2},
390+
},
385391
}
386392
for _, test := range tests {
387393
issueIDs, _, err := SearchIssues(context.TODO(), &test.opts)

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ add_email_success = The new email address has been added.
729729
email_preference_set_success = Email preference has been set successfully.
730730
add_openid_success = The new OpenID address has been added.
731731
keep_email_private = Hide Email Address
732-
keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified.
732+
keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified. Use %s in commits to associate them with your account.
733733
openid_desc = OpenID lets you delegate authentication to an external provider.
734734

735735
manage_ssh_keys = Manage SSH Keys

routers/web/org/teams.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ func NewTeam(ctx *context.Context) {
276276
ctx.Data["PageIsOrgTeamsNew"] = true
277277
ctx.Data["Team"] = &org_model.Team{}
278278
ctx.Data["Units"] = unit_model.Units
279+
if err := shared_user.LoadHeaderCount(ctx); err != nil {
280+
ctx.ServerError("LoadHeaderCount", err)
281+
return
282+
}
279283
ctx.HTML(http.StatusOK, tplTeamNew)
280284
}
281285

@@ -463,6 +467,10 @@ func EditTeam(ctx *context.Context) {
463467
ctx.ServerError("LoadUnits", err)
464468
return
465469
}
470+
if err := shared_user.LoadHeaderCount(ctx); err != nil {
471+
ctx.ServerError("LoadHeaderCount", err)
472+
return
473+
}
466474
ctx.Data["Team"] = ctx.Org.Team
467475
ctx.Data["Units"] = unit_model.Units
468476
ctx.HTML(http.StatusOK, tplTeamNew)

templates/org/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="ui container">
33
<div class="ui vertically grid head">
44
<div class="column">
5-
<div class="ui header">
5+
<div class="ui header gt-df gt-ac gt-word-break">
66
{{ctx.AvatarUtils.Avatar . 100}}
77
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
88
<span class="org-visibility">

templates/org/home.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="ui container gt-df">
44
{{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
55
<div id="org-info">
6-
<div class="ui header gt-df gt-fw">
6+
<div class="ui header">
77
{{.Org.DisplayName}}
88
<span class="org-visibility">
99
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}

templates/repo/diff/box.tmpl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}}
12
<div>
23
<div class="diff-detail-box diff-box">
34
<div class="gt-df gt-ac gt-fw">
4-
{{if not .DiffNotAvailable}}
5+
{{if $showFileTree}}
56
<button class="diff-toggle-file-tree-button gt-df gt-ac not-mobile" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
67
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
78
{{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}}
@@ -15,6 +16,8 @@
1516
diffTreeBtn.querySelector(diffTreeIcon).classList.remove('gt-hidden');
1617
diffTreeBtn.setAttribute('data-tooltip-content', diffTreeBtn.getAttribute(diffTreeVisible ? 'data-hide-text' : 'data-show-text'));
1718
</script>
19+
{{end}}
20+
{{if not .DiffNotAvailable}}
1821
<div class="diff-detail-stats gt-df gt-ac gt-fw">
1922
{{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
2023
</div>
@@ -85,13 +88,15 @@
8588
<div id="diff-file-list"></div>
8689
{{end}}
8790
<div id="diff-container">
88-
{{if .DiffNotAvailable}}
89-
<h4>{{ctx.Locale.Tr "repo.diff.data_not_available"}}</h4>
90-
{{else}}
91+
{{if $showFileTree}}
9192
<div id="diff-file-tree" class="gt-hidden"></div>
9293
<script>
9394
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden');
9495
</script>
96+
{{end}}
97+
{{if .DiffNotAvailable}}
98+
<h4>{{ctx.Locale.Tr "repo.diff.data_not_available"}}</h4>
99+
{{else}}
95100
<div id="diff-file-boxes" class="sixteen wide column">
96101
{{range $i, $file := .Diff.Files}}
97102
{{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}}

templates/shared/user/org_profile_avatar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="ui container">
33
<div class="ui vertically grid head">
44
<div class="column">
5-
<div class="ui header">
5+
<div class="ui header gt-df gt-ac gt-word-break">
66
{{ctx.AvatarUtils.Avatar . 100}}
77
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
88
<span class="org-visibility">

templates/user/settings/profile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
<div class="field">
7575
<div class="ui checkbox">
76-
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
76+
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
7777
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
7878
</div>
7979
</div>

web_src/css/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@ img.ui.avatar,
14111411
.ui.label {
14121412
padding: 0.3em 0.5em;
14131413
transition: none;
1414+
white-space: nowrap;
14141415
}
14151416

14161417
.ui.label,

web_src/css/org.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
.organization.profile #org-info {
103103
overflow-wrap: anywhere;
104104
flex: 1;
105+
word-break: break-all;
105106
}
106107

107108
.organization.profile #org-info .ui.header {

web_src/css/repo.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,6 +2606,7 @@ tbody.commit-list {
26062606
justify-content: space-between;
26072607
flex-wrap: wrap;
26082608
word-break: break-word;
2609+
gap: 0.5rem;
26092610
}
26102611

26112612
@media (max-width: 767.98px) {
@@ -2734,6 +2735,9 @@ tbody.commit-list {
27342735
#diff-file-boxes {
27352736
flex: 1;
27362737
max-width: 100%;
2738+
display: flex;
2739+
flex-direction: column;
2740+
gap: 8px;
27372741
}
27382742

27392743
#diff-file-tree {

web_src/js/components/DiffFileTreeItem.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ a, a:hover {
6161
display: flex;
6262
flex-direction: column;
6363
gap: 1px;
64-
padding-left: 8px;
64+
margin-left: 13px;
65+
border-left: 1px solid var(--color-secondary);
6566
}
6667
6768
.sub-items .item-file {
68-
padding-left: 24px;
69+
padding-left: 18px;
6970
}
7071
7172
.item-file.selected {

0 commit comments

Comments
 (0)