diff options
author | kolaente <konrad@kola-entertainments.de> | 2019-01-23 19:58:38 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-23 13:58:38 -0500 |
commit | 0b510725c97452bac57ff0080df10f6177aa2a6e (patch) | |
tree | b9405cf290057698b32cf0acacc0d627f223ed6d /templates/repo/diff | |
parent | 6ad834e236756e7ba3de27e59681080a7ec4fcf1 (diff) | |
download | gitea-0b510725c97452bac57ff0080df10f6177aa2a6e.tar.gz gitea-0b510725c97452bac57ff0080df10f6177aa2a6e.zip |
Feature: Archive repos (#5009)
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/box.tmpl | 48 | ||||
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 2 |
2 files changed, 26 insertions, 24 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 35f6ae36be..331a17a5e9 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -8,7 +8,7 @@ <a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a> {{end}} <a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> - {{if and .PageIsPullFiles $.SignedUserID}} + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}} </div> @@ -27,7 +27,7 @@ <a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a> {{end}} <a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> - {{if and .PageIsPullFiles $.SignedUserID}} + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}} </div> @@ -194,27 +194,29 @@ </div> {{end}} - <div id="pull_review_add_comment" class="hide"> - {{template "repo/diff/new_comment" dict "root" .}} - </div> - <div class="hide" id="edit-content-form"> - <div class="ui comment form"> - <div class="ui top attached tabular menu"> - <a class="active write item">{{$.i18n.Tr "write"}}</a> - <a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a> - </div> - <div class="ui bottom attached active write tab segment"> - <textarea tabindex="1" name="content"></textarea> - </div> - <div class="ui bottom attached tab preview segment markdown"> - {{$.i18n.Tr "loading"}} - </div> - <div class="text right edit buttons"> - <div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div> - <div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div> - </div> - </div> - </div> + {{if not $.Repository.IsArchived}} + <div id="pull_review_add_comment" class="hide"> + {{template "repo/diff/new_comment" dict "root" .}} + </div> + <div class="hide" id="edit-content-form"> + <div class="ui comment form"> + <div class="ui top attached tabular menu"> + <a class="active write item">{{$.i18n.Tr "write"}}</a> + <a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a> + </div> + <div class="ui bottom attached active write tab segment"> + <textarea tabindex="1" name="content"></textarea> + </div> + <div class="ui bottom attached tab preview segment markdown"> + {{$.i18n.Tr "loading"}} + </div> + <div class="text right edit buttons"> + <div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div> + <div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div> + </div> + </div> + </div> + {{end}} {{if .IsSplitStyle}} <script> diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 9eb557d86b..1fb8b963da 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -1,4 +1,4 @@ -{{if $.root.SignedUserID}} +{{if and $.root.SignedUserID (not $.Repository.IsArchived)}} {{if $.hidden}} <button class="comment-form-reply ui green labeled icon tiny button"><i class="reply icon"></i> {{$.root.i18n.Tr "repo.diff.comment.reply"}}</button> {{end}} |