File tree Expand file tree Collapse file tree 4 files changed +11
-26
lines changed Expand file tree Collapse file tree 4 files changed +11
-26
lines changed Original file line number Diff line number Diff line change 2
2
<div role="main" aria-label="{{.Title}}" class="page-content repository new issue">
3
3
{{template "repo/header" .}}
4
4
<div class="ui container">
5
- <div class="navbar">
6
- {{template "repo/issue/navbar" .}}
7
- </div>
8
- <div class="ui divider"></div>
9
5
{{if .Flash.WarningMsg}}
10
6
{{/*
11
7
There's already an importing of alert.tmpl in new_form.tmpl,
Original file line number Diff line number Diff line change 1
- <div class="sixteen wide column title">
2
- <div class="issue-title" id="issue-title-wrapper">
3
- {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
4
- <button id="edit-title" class="ui basic button secondary edit-button not-in-edit">{{.locale.Tr "repo.issues.edit"}}</button>
5
- {{end}}
6
- <h1 class="gt-mt-3 gt-mb-3">
1
+ <div class="sixteen wide column title gt-mb-3">
2
+ <div class="issue-title gt-mb-3 gt-df gt-ac" id="issue-title-wrapper">
3
+ <h1 class="gt-f1 gt-word-break">
7
4
<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}}</span>
8
5
<span class="index">#{{.Issue.Index}}</span>
9
- <div id="edit-title-input" class="ui input gt-ml-4 gt-hidden">
6
+ <div id="edit-title-input" class="ui input gt-f1 gt- ml-4 gt-hidden">
10
7
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
11
8
</div>
12
9
</h1>
13
10
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
14
- <div class="edit-buttons">
11
+ <button id="edit-title" class="ui basic button secondary edit-button not-in-edit">{{.locale.Tr "repo.issues.edit"}}</button>
12
+ {{end}}
13
+ <a role="button" class="ui green button new-issue-button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{.locale.Tr "repo.issues.new"}}</a>
14
+ {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
15
+ <div class="edit-buttons gt-df">
15
16
<button id="cancel-edit-title" class="ui basic button secondary in-edit gt-hidden">{{.locale.Tr "repo.issues.cancel"}}</button>
16
17
<button id="save-edit-title" class="ui primary button in-edit gt-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button>
17
18
</div>
Original file line number Diff line number Diff line change 601
601
padding-bottom : 0 !important ;
602
602
}
603
603
604
- .repository .view .issue .title .issue-title {
605
- margin-bottom : 0.5rem ;
606
- }
607
-
608
604
.repository .view .issue .title .issue-title .edit-active {
609
605
display : flex;
610
606
align-items : center;
649
645
650
646
.repository .view .issue .title .issue-title h1 .ui .input {
651
647
font-size : 0.5em ;
652
- width : 100% ;
653
648
}
654
649
655
650
.repository .view .issue .title .issue-title h1 .ui .input input {
656
651
font-size : 1.5em ;
657
- padding : 6px 1rem ;
658
- }
659
-
660
- .repository .view .issue .title .issue-title .edit-button {
661
- float : right;
662
- }
663
-
664
- .repository .view .issue .title .issue-title .edit-buttons {
665
- display : flex;
652
+ padding : 0 1rem ;
666
653
}
667
654
668
655
.repository .view .issue .title .issue-title .index {
Original file line number Diff line number Diff line change @@ -572,6 +572,7 @@ export function initRepoIssueTitleEdit() {
572
572
toggleElem ( $ ( '#pull-desc' ) ) ;
573
573
toggleElem ( $ ( '#pull-desc-edit' ) ) ;
574
574
toggleElem ( $ ( '.in-edit' ) ) ;
575
+ toggleElem ( $ ( '.new-issue-button' ) ) ;
575
576
$ ( '#issue-title-wrapper' ) . toggleClass ( 'edit-active' ) ;
576
577
$editInput . trigger ( 'focus' ) ;
577
578
return false ;
You can’t perform that action at this time.
0 commit comments