From 34ba4e135202db79ceb29c738ee476c5f54acf50 Mon Sep 17 00:00:00 2001 From: randx Date: Fri, 3 Aug 2012 00:20:09 +0300 Subject: [PATCH] Gitlab Markdown help page --- app/views/help/index.html.haml | 3 +++ app/views/help/markdown.html.haml | 25 +++++++++++++++++++++++++ app/views/notes/_form.html.haml | 5 +++-- config/routes.rb | 1 + 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 app/views/help/markdown.html.haml diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index e9602e33..66f7c722 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -28,3 +28,6 @@ %li %h5= link_to "API", help_api_path + + %li + %h5= link_to "Gitlab Markdown", help_markdown_path diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml new file mode 100644 index 00000000..8d6fb2a5 --- /dev/null +++ b/app/views/help/markdown.html.haml @@ -0,0 +1,25 @@ +- bash_lexer = Pygments::Lexer[:bash] +%h3.page_title Gitlab Markdown +.back_link + = link_to help_path do + ← to index +%hr + +%p.slead We extend Markdown with some GITLAB specific syntax. It allows you to link to: + +%ul + %li issues (#123) + %li merge request (!123) + %li commits (1234567) + %li team members (@foo) + %li snippets ($123) + +%p.slead in + +%ul + %li commit messages + %li notes/comments/wall posts + %li issues + %li merge requests + %li milestones + %li wiki pages diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index aeaf57e6..55f69f8f 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -8,7 +8,9 @@ = f.hidden_field :noteable_id = f.hidden_field :noteable_type = f.text_area :note, :size => 255 - %p.hint Markdown is enabled. + %p.hint + = link_to "Gitlab Markdown", help_markdown_path, :target => '_blank' + is enabled. .row.note_advanced_opts.hide .span4 @@ -31,5 +33,4 @@ .input= f.file_field :attachment, :class => "input-file" %span Any file less than 10 MB - = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note" diff --git a/config/routes.rb b/config/routes.rb index 664f4649..11430baf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -29,6 +29,7 @@ Gitlab::Application.routes.draw do get 'help/api' => 'help#api' get 'help/web_hooks' => 'help#web_hooks' get 'help/system_hooks' => 'help#system_hooks' + get 'help/markdown' => 'help#markdown' # # Admin Area