Skip to content

Commit 4201967

Browse files
GiteaBotsilverwind
andauthored
Improve "Reference in new issue" modal (#30547) (#30574)
Backport #30547 by @silverwind Fixes: #29994 Also some misc enhancements done to the form in the modal. <img width="840" alt="Screenshot 2024-04-17 at 23 02 55" src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43"> Co-authored-by: silverwind <[email protected]>
1 parent 0184bd1 commit 4201967

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

templates/repo/issue/view_content/reference_issue_dialog.tmpl

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,24 @@
55
<div class="content tw-text-left">
66
<form class="ui form form-fetch-action" action="{{printf "%s/issues/new" .Repository.Link}}" method="post">
77
{{.CsrfTokenHtml}}
8-
<div class="ui segment content">
9-
<div class="field">
10-
<span class="text"><strong>{{ctx.Locale.Tr "repository"}}</strong></span>
11-
<div class="ui search normal selection dropdown issue_reference_repository_search">
12-
<div class="default text">{{.Repository.FullName}}</div>
13-
<div class="menu"></div>
14-
</div>
15-
</div>
16-
<div class="field">
17-
<span class="text"><strong>{{ctx.Locale.Tr "repo.milestones.title"}}</strong></span>
18-
<input name="title" value="" autofocus required maxlength="255" autocomplete="off">
19-
</div>
20-
<div class="field">
21-
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></span>
22-
<textarea name="content" class="form-control"></textarea>
23-
</div>
24-
<div class="text right">
25-
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
8+
<div class="field">
9+
<label><strong>{{ctx.Locale.Tr "repository"}}</strong></label>
10+
<div class="ui search selection dropdown issue_reference_repository_search">
11+
<div class="default text">{{.Repository.FullName}}</div>
12+
<div class="menu"></div>
2613
</div>
2714
</div>
15+
<div class="field">
16+
<label><strong>{{ctx.Locale.Tr "repo.milestones.title"}}</strong></label>
17+
<input name="title" value="" autofocus required maxlength="255" autocomplete="off">
18+
</div>
19+
<div class="field">
20+
<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label>
21+
<textarea name="content" class="form-control"></textarea>
22+
</div>
23+
<div class="text right">
24+
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
25+
</div>
2826
</form>
2927
</div>
3028
</div>

web_src/css/base.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ ol.ui.list li,
484484

485485
.ui.selection.dropdown .menu > .item {
486486
border-color: var(--color-secondary);
487+
white-space: nowrap;
487488
}
488489

489490
.ui.selection.visible.dropdown > .text:not(.default) {
@@ -505,6 +506,12 @@ ol.ui.list li,
505506
color: var(--color-text-light-2);
506507
}
507508

509+
.ui.dropdown > .text {
510+
white-space: nowrap;
511+
overflow: hidden;
512+
text-overflow: ellipsis;
513+
}
514+
508515
/* extend fomantic style '.ui.dropdown > .text > img' to include svg.img */
509516
.ui.dropdown > .text > .img {
510517
margin-left: 0;

0 commit comments

Comments
 (0)