]> source.dussan.org Git - gitea.git/commitdiff
ui fixes - compare view and archieved repo issues (#7345)
authorCherrg <michael@gnehr.de>
Mon, 8 Jul 2019 19:18:09 +0000 (21:18 +0200)
committerzeripath <art27@cantab.net>
Mon, 8 Jul 2019 19:18:09 +0000 (20:18 +0100)
* 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>
templates/repo/diff/compare.tmpl
templates/repo/header.tmpl
templates/repo/issue/view_content.tmpl

index 877241fb390a9b5b21699bad0fc92559105adcfc..1c8942d42fef2552536b2f32a6570f4105e998bc 100644 (file)
@@ -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>
                <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>
index f4eefd3fde1d51064cf4566016d39e91060c45e3..f264a9b55956c6f37cb93c1c6b3afd5a1592b754 100644 (file)
@@ -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}}
                </div>
        </div>
        <div class="ui tabs divider"></div>
-{{else}}
-       <div class="ui divider"></div>
-{{end}}
+
 </div>
index b3f88c662d99750f17b2fad385f599cd3e62304e..acabe34782fc42f1cdd4f89d64e4d04244161172 100644 (file)
                                                </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}}