diff options
author | Cherrg <michael@gnehr.de> | 2019-07-08 21:18:09 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-07-08 20:18:09 +0100 |
commit | 3c3f74988ac25962b7d72ad32a70b399e5c0f2bc (patch) | |
tree | 96ad4657010773d3bfb80b8f617524bdabe788c1 /templates | |
parent | 0622e830557fcf63c73541394a56ba23a700a65a (diff) | |
download | gitea-3c3f74988ac25962b7d72ad32a70b399e5c0f2bc.tar.gz gitea-3c3f74988ac25962b7d72ad32a70b399e5c0f2bc.zip |
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>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/diff/compare.tmpl | 14 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 8 |
3 files changed, 21 insertions, 7 deletions
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 877241fb39..1c8942d42f 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -5,8 +5,12 @@ {{if .PageIsComparePull}} <h2 class="ui header"> - {{.i18n.Tr "repo.pulls.compare_changes"}} - <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div> + {{if not .Repository.IsArchived}} + {{.i18n.Tr "repo.pulls.compare_changes"}} + <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div> + {{ else }} + {{.i18n.Tr "action.compare_commits_general"}} + {{ end }} </h2> <div class="ui segment choose branch"> <span class="octicon octicon-git-compare"></span> @@ -60,7 +64,11 @@ <div class="ui info message show-form-container"> <button class="ui button green show-form">{{.i18n.Tr "repo.pulls.new"}}</button> </div> - {{end}} + {{ else }} + <div class="ui warning message"> + {{.i18n.Tr "repo.archive.title"}} + </div> + {{ end }} <div class="pullrequest-form" style="display: none"> {{template "repo/issue/new_form" .}} </div> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index f4eefd3fde..f264a9b559 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -46,7 +46,7 @@ </div><!-- end grid --> </div><!-- end container --> {{end}} -{{if not .IsDiffCompare}} + <div class="ui tabs container"> <div class="ui tabular stackable menu navbar"> {{if .Permission.CanRead $.UnitTypeCode}} @@ -103,7 +103,5 @@ </div> </div> <div class="ui tabs divider"></div> -{{else}} - <div class="ui divider"></div> -{{end}} + </div> diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index b3f88c662d..acabe34782 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -107,6 +107,14 @@ </form> </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 }} {{else}} {{if .Repository.IsArchived}} |