ui fixes - compare view and archieved repo issues (#7345)

* add 'repo archived - comment/pull not possible' message

affects #7304

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* add navbar to compare view

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* remove wrong if else

Signed-off-by: Michael Gnehr <michael@gnehr.de>
release/v1.15
Cherrg 2019-07-08 21:18:09 +02:00 committed by zeripath
parent 0622e83055
commit 3c3f74988a
3 changed files with 21 additions and 7 deletions

View File

@ -5,8 +5,12 @@
{{if .PageIsComparePull}} {{if .PageIsComparePull}}
<h2 class="ui header"> <h2 class="ui header">
{{if not .Repository.IsArchived}}
{{.i18n.Tr "repo.pulls.compare_changes"}} {{.i18n.Tr "repo.pulls.compare_changes"}}
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div> <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
{{ else }}
{{.i18n.Tr "action.compare_commits_general"}}
{{ end }}
</h2> </h2>
<div class="ui segment choose branch"> <div class="ui segment choose branch">
<span class="octicon octicon-git-compare"></span> <span class="octicon octicon-git-compare"></span>
@ -60,7 +64,11 @@
<div class="ui info message show-form-container"> <div class="ui info message show-form-container">
<button class="ui button green show-form">{{.i18n.Tr "repo.pulls.new"}}</button> <button class="ui button green show-form">{{.i18n.Tr "repo.pulls.new"}}</button>
</div> </div>
{{end}} {{ else }}
<div class="ui warning message">
{{.i18n.Tr "repo.archive.title"}}
</div>
{{ end }}
<div class="pullrequest-form" style="display: none"> <div class="pullrequest-form" style="display: none">
{{template "repo/issue/new_form" .}} {{template "repo/issue/new_form" .}}
</div> </div>

View File

@ -46,7 +46,7 @@
</div><!-- end grid --> </div><!-- end grid -->
</div><!-- end container --> </div><!-- end container -->
{{end}} {{end}}
{{if not .IsDiffCompare}}
<div class="ui tabs container"> <div class="ui tabs container">
<div class="ui tabular stackable menu navbar"> <div class="ui tabular stackable menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}} {{if .Permission.CanRead $.UnitTypeCode}}
@ -103,7 +103,5 @@
</div> </div>
</div> </div>
<div class="ui tabs divider"></div> <div class="ui tabs divider"></div>
{{else}}
<div class="ui divider"></div>
{{end}}
</div> </div>

View File

@ -107,6 +107,14 @@
</form> </form>
</div> </div>
</div> </div>
{{ else if .Repository.IsArchived }}
<div class="ui warning message">
{{if .Issue.IsPull}}
{{.i18n.Tr "repo.archive.pull.nocomment"}}
{{else}}
{{.i18n.Tr "repo.archive.issue.nocomment"}}
{{end}}
</div>
{{ end }} {{ end }}
{{else}} {{else}}
{{if .Repository.IsArchived}} {{if .Repository.IsArchived}}