summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-04-11 05:46:37 +0200
committerGitHub <noreply@github.com>2021-04-10 23:46:37 -0400
commitd848098f60f78e6b4a72ae7f769fd66399a8ba82 (patch)
treeee6e769196f546c8a0c7d85c82eecccd0bf67e1e /templates/repo/diff
parent0c77e0791c079ea8c01e03f636f22a0ff7e9d22b (diff)
downloadgitea-d848098f60f78e6b4a72ae7f769fd66399a8ba82.tar.gz
gitea-d848098f60f78e6b4a72ae7f769fd66399a8ba82.zip
Enforce tab indentation in templates (#15289)
* Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/compare.tmpl6
-rw-r--r--templates/repo/diff/csv_diff.tmpl2
-rw-r--r--templates/repo/diff/image_diff.tmpl2
-rw-r--r--templates/repo/diff/new_review.tmpl12
4 files changed, 9 insertions, 13 deletions
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index fdf65aaad3..124b4e5d1c 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -117,9 +117,9 @@
{{end}}
{{else if and .PageIsComparePull (gt .CommitCount 0)}}
{{if .HasPullRequest}}
- <div class="ui segment">
- {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
- </div>
+ <div class="ui segment">
+ {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
+ </div>
{{else}}
{{if and $.IsSigned (not .Repository.IsArchived)}}
<div class="ui info message show-form-container">
diff --git a/templates/repo/diff/csv_diff.tmpl b/templates/repo/diff/csv_diff.tmpl
index c4af70461f..b86e9d2a72 100644
--- a/templates/repo/diff/csv_diff.tmpl
+++ b/templates/repo/diff/csv_diff.tmpl
@@ -43,4 +43,4 @@
</table>
{{end}}
</td>
-</tr> \ No newline at end of file
+</tr>
diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl
index 01f7e3f8e8..91092c412f 100644
--- a/templates/repo/diff/image_diff.tmpl
+++ b/templates/repo/diff/image_diff.tmpl
@@ -106,4 +106,4 @@
</div>
</td>
</tr>
-{{end}} \ No newline at end of file
+{{end}}
diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl
index 6304369416..9e65d6d420 100644
--- a/templates/repo/diff/new_review.tmpl
+++ b/templates/repo/diff/new_review.tmpl
@@ -13,16 +13,12 @@
<a class="muted close px-3">{{svg "octicon-x" 16}}</a>
</div>
<div class="ui field">
- <textarea name="content" tabindex="0" rows="2"
- placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
+ <textarea name="content" tabindex="0" rows="2" placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
</div>
<div class="ui divider"></div>
- <button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
- class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
- <button type="submit" name="type" value="comment"
- class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
- <button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
- class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
+ <button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
+ <button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
+ <button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }} class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
</form>
</div>
</div>