diff options
Diffstat (limited to 'app/views/projects/wikis/_form.html.haml')
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml new file mode 100644 index 00000000000..7cf08815f78 --- /dev/null +++ b/app/views/projects/wikis/_form.html.haml @@ -0,0 +1,36 @@ += form_for [@project, @wiki] do |f| + -if @wiki.errors.any? + #error_explanation + %h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:" + %ul + - @wiki.errors.full_messages.each do |msg| + %li= msg + + .ui-box.ui-box-show + .ui-box-head + %h3.page_title + .edit-wiki-header + = @wiki.title.titleize + = f.hidden_field :title, value: @wiki.title + = f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium" + = f.label :format, class: "pull-right", style: "padding-right: 20px;" + .ui-box-body + .input + %span.cgray + Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. + To link to a (new) page you can just type + %code [Link Title](page-slug) + \. + + .ui-box-bottom + = f.label :content + .input= f.text_area :content, class: 'span8 js-gfm-input' + .ui-box-bottom + = f.label :commit_message + .input= f.text_field :message, class: 'span8' + .actions + = f.submit 'Save', class: "btn-save btn" + - if @wiki && @wiki.persisted? + = link_to "Cancel", project_wiki_path(@project, @wiki), class: "btn btn-cancel" + - else + = link_to "Cancel", project_wiki_path(@project, :home), class: "btn btn-cancel" |