summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorskv-headless <skv-headless@yandex.ru>2014-04-15 19:02:02 +0400
committerskv-headless <skv-headless@yandex.ru>2014-04-15 19:02:02 +0400
commitd859d080942175082c1a0cf34d89c0eefd1a3c39 (patch)
tree50dc1d374da6a1563a8b4958225d937e182401c5 /app/helpers/tree_helper.rb
parentcd6232187b707b0a278bd91986ec85dcfe66046f (diff)
downloadgitlab-ce-d859d080942175082c1a0cf34d89c0eefd1a3c39.tar.gz
Editing preview
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 50501dffefb..f39d0081dce 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -91,4 +91,12 @@ module TreeHelper
def leave_edit_message
"Leave edit mode?\nAll unsaved changes will be lost."
end
+
+ def editing_preview_title(filename)
+ if gitlab_markdown?(filename) || markup?(filename)
+ 'Preview'
+ else
+ 'Diff'
+ end
+ end
end