aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/editor
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-16 08:34:49 -0500
committerUnknwon <u@gogs.io>2017-02-16 08:34:49 -0500
commitf129e0ecb57634bc02972b7ff5a3175a829c0534 (patch)
tree431b039af0aea15f9e9719355587278a5f679a7d /templates/repo/editor
parent88143f1934af6e2d1e2e4f260a9dc08f836437ca (diff)
repo/editor: fix breadcrumb path cuts parent dirs (#3859)
Diffstat (limited to 'templates/repo/editor')
-rw-r--r--templates/repo/editor/edit.tmpl2
-rw-r--r--templates/repo/editor/upload.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index b189d4f2..64b09c37 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -18,7 +18,7 @@
<input id="file-name" value="{{$v}}" placeholder="{{$.i18n.Tr "repo.editor.name_your_file"}}" data-ec-url-prefix="{{$.EditorconfigURLPrefix}}" required autofocus>
<span class="octicon octicon-info poping up" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center" data-variation="tiny inverted"></span>
{{else}}
- <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $v}}">{{$v}}</a></span>
+ <span class="section"><a href="{{EscapePound $.BranchLink}}/{{index $.TreePaths $i | EscapePound}}">{{$v}}</a></span>
{{end}}
{{end}}
<span>{{.i18n.Tr "repo.editor.or"}} <a href="{{EscapePound $.BranchLink}}{{if not .IsNewFile}}/{{EscapePound .TreePath}}{{end}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>
diff --git a/templates/repo/editor/upload.tmpl b/templates/repo/editor/upload.tmpl
index e1192ef0..23fdc8ba 100644
--- a/templates/repo/editor/upload.tmpl
+++ b/templates/repo/editor/upload.tmpl
@@ -17,7 +17,7 @@
<input type="text" id="file-name" value="{{$v}}" placeholder="{{$.i18n.Tr "repo.editor.add_subdir"}}" autofocus>
<span class="octicon octicon-info poping up" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center" data-variation="tiny inverted"></span>
{{else}}
- <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $v}}">{{$v}}</a></span>
+ <span class="section"><a href="{{EscapePound $.BranchLink}}/{{index $.TreePaths $i | EscapePound}}">{{$v}}</a></span>
{{end}}
{{end}}
<span>{{.i18n.Tr "repo.editor.or"}} <a href="{{EscapePound $.BranchLink}}{{if not .IsNewFile}}/{{EscapePound .TreePath}}{{end}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>