Skip to content

Commit 3c3f749

Browse files
Cherrgzeripath
authored andcommitted
ui fixes - compare view and archieved repo issues (#7345)
* add 'repo archived - comment/pull not possible' message affects #7304 Signed-off-by: Michael Gnehr <[email protected]> * add navbar to compare view Signed-off-by: Michael Gnehr <[email protected]> * remove wrong if else Signed-off-by: Michael Gnehr <[email protected]>
1 parent 0622e83 commit 3c3f749

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

templates/repo/diff/compare.tmpl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55

66
{{if .PageIsComparePull}}
77
<h2 class="ui header">
8-
{{.i18n.Tr "repo.pulls.compare_changes"}}
9-
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
8+
{{if not .Repository.IsArchived}}
9+
{{.i18n.Tr "repo.pulls.compare_changes"}}
10+
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
11+
{{ else }}
12+
{{.i18n.Tr "action.compare_commits_general"}}
13+
{{ end }}
1014
</h2>
1115
<div class="ui segment choose branch">
1216
<span class="octicon octicon-git-compare"></span>
@@ -60,7 +64,11 @@
6064
<div class="ui info message show-form-container">
6165
<button class="ui button green show-form">{{.i18n.Tr "repo.pulls.new"}}</button>
6266
</div>
63-
{{end}}
67+
{{ else }}
68+
<div class="ui warning message">
69+
{{.i18n.Tr "repo.archive.title"}}
70+
</div>
71+
{{ end }}
6472
<div class="pullrequest-form" style="display: none">
6573
{{template "repo/issue/new_form" .}}
6674
</div>

templates/repo/header.tmpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</div><!-- end grid -->
4747
</div><!-- end container -->
4848
{{end}}
49-
{{if not .IsDiffCompare}}
49+
5050
<div class="ui tabs container">
5151
<div class="ui tabular stackable menu navbar">
5252
{{if .Permission.CanRead $.UnitTypeCode}}
@@ -103,7 +103,5 @@
103103
</div>
104104
</div>
105105
<div class="ui tabs divider"></div>
106-
{{else}}
107-
<div class="ui divider"></div>
108-
{{end}}
106+
109107
</div>

templates/repo/issue/view_content.tmpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@
107107
</form>
108108
</div>
109109
</div>
110+
{{ else if .Repository.IsArchived }}
111+
<div class="ui warning message">
112+
{{if .Issue.IsPull}}
113+
{{.i18n.Tr "repo.archive.pull.nocomment"}}
114+
{{else}}
115+
{{.i18n.Tr "repo.archive.issue.nocomment"}}
116+
{{end}}
117+
</div>
110118
{{ end }}
111119
{{else}}
112120
{{if .Repository.IsArchived}}

0 commit comments

Comments
 (0)