summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-11-16 00:50:06 +0100
committerGitHub <noreply@github.com>2020-11-15 23:50:06 +0000
commitefcba9b011b328a425d8b2c8d9f2273bfbaa7340 (patch)
tree92f7812aa0f184b6b76b957eee56d19b14f31ef6 /templates
parent0de546009e466486cd88dfa98d07d8775bd3087d (diff)
downloadgitea-efcba9b011b328a425d8b2c8d9f2273bfbaa7340.tar.gz
gitea-efcba9b011b328a425d8b2c8d9f2273bfbaa7340.zip
Render diff stats server-side (#13579)
Eliminates a flash on page load on the diff stat bars.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/box.tmpl21
-rw-r--r--templates/repo/diff/stats.tmpl6
2 files changed, 9 insertions, 18 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 05f056feb8..d34d9b8fd9 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -38,12 +38,7 @@
<li>
<div class="diff-counter count pull-right">
{{if not .IsBin}}
- <span class="add" data-line="{{.Addition}}">+{{.Addition}}</span>
- <span class="bar">
- <div class="pull-left add"></div>
- <div class="pull-left del"></div>
- </span>
- <span class="del" data-line="{{.Deletion}}">-{{.Deletion}}</span>
+ {{template "repo/diff/stats" .}}
{{else}}
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
{{end}}
@@ -60,12 +55,7 @@
<h4 class="ui top attached normal header rounded">
<div class="diff-counter count ui left">
{{if not $file.IsRenamed}}
- <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
- <span class="bar">
- <div class="pull-left add"></div>
- <div class="pull-left del"></div>
- </span>
- <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
+ {{template "repo/diff/stats" .}}
{{end}}
</div>
<span class="file">{{$file.Name}}</span>
@@ -101,12 +91,7 @@
{{if $file.IsBin}}
{{$.i18n.Tr "repo.diff.bin"}}
{{else if not $file.IsRenamed}}
- <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
- <span class="bar">
- <div class="pull-left add"></div>
- <div class="pull-left del"></div>
- </span>
- <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
+ {{template "repo/diff/stats" .}}
{{end}}
</div>
<span class="file">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl
new file mode 100644
index 0000000000..7e5d34c3dd
--- /dev/null
+++ b/templates/repo/diff/stats.tmpl
@@ -0,0 +1,6 @@
+<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
+<span class="bar">
+ <div class="pull-left add" style="width: {{DiffStatsWidth .Addition .Deletion}}%"></div>
+ <div class="pull-left del"></div>
+</span>
+<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
t/38630/stable29'>backport/38630/stable29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/l10n/he/files_sharing.po
blob: c788cef35e2439067f1f0ffa782d54881f6c6b49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-08-29 02:01+0200\n"
"PO-Revision-Date: 2012-08-29 00:03+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"Language-Team: Hebrew (http://www.transifex.com/projects/p/owncloud/language/he/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: he\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"

#: templates/authenticate.php:4
msgid "Password"
msgstr ""

#: templates/authenticate.php:6
msgid "Submit"
msgstr ""