aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-04-07 21:44:55 -0400
committerUnknwon <u@gogs.io>2017-04-07 21:44:55 -0400
commit91cd350b631f721d1d6dd38bbafd3cac612e53c6 (patch)
tree9c9355f33fa24ca8a9df18ee1851047a87685a61 /templates
parent6ea9642d6415073c6312c80bf6533a5070630ad2 (diff)
repo/editor: fix wrong context for subdirectory (#4368)
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/repo/editor/edit.tmpl4
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index d2e918de..d00fae39 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.11.6.0407 \ No newline at end of file
+0.11.7.0407 \ No newline at end of file
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index a9ce124b..ef51f616 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -30,8 +30,8 @@
<div class="ui top attached tabular menu" data-write="write" data-preview="preview" data-diff="diff">
<a class="active item" data-tab="write"><i class="octicon octicon-code"></i> {{if .IsNewFile}}{{.i18n.Tr "repo.editor.new_file"}}{{else}}{{.i18n.Tr "repo.editor.edit_file"}}{{end}}</a>
{{if not .IsNewFile}}
- <a class="item" data-tab="preview" data-url="{{AppSubURL}}/api/v1/markdown" data-context="{{.RepoLink}}/src/{{.BranchName}}" data-preview-file-modes="{{.PreviewableFileModes}}"><i class="octicon octicon-eye"></i> {{.i18n.Tr "repo.release.preview"}}</a>
- <a class="item" data-tab="diff" data-url="{{.RepoLink}}/_preview/{{.BranchName}}/{{.TreePath}}" data-context="{{.BranchLink}}"><i class="octicon octicon-diff"></i> {{.i18n.Tr "repo.editor.preview_changes"}}</a>
+ <a class="item" id="preview-tab" data-tab="preview" data-url="{{AppSubURL}}/api/v1/markdown" data-root-context="{{.BranchLink}}/" data-context="{{.BranchLink}}/{{.ParentTreePath}}" data-preview-file-modes="{{.PreviewableFileModes}}"><i class="octicon octicon-eye"></i> {{.i18n.Tr "repo.release.preview"}}</a>
+ <a class="item" data-tab="diff" data-url="{{.RepoLink}}/_preview/{{.BranchName}}/{{.TreePath}}"><i class="octicon octicon-diff"></i> {{.i18n.Tr "repo.editor.preview_changes"}}</a>
{{end}}
</div>
<div class="ui bottom attached active tab segment" data-tab="write">