2012-02-19 18:05:35 +01:00
|
|
|
= form_for [@project, @wiki] do |f|
|
2012-02-19 15:35:31 +01:00
|
|
|
-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
|
|
|
|
|
2013-01-04 22:35:31 +01:00
|
|
|
.ui-box.ui-box-show
|
|
|
|
.ui-box-head
|
2013-03-04 04:43:52 +01:00
|
|
|
%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;"
|
2013-01-04 22:35:31 +01:00
|
|
|
.ui-box-body
|
2012-07-26 13:45:17 +02:00
|
|
|
.input
|
|
|
|
%span.cgray
|
2012-09-06 09:50:47 +02:00
|
|
|
Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
2012-08-24 17:35:21 +02:00
|
|
|
To link to a (new) page you can just type
|
2012-07-26 13:45:17 +02:00
|
|
|
%code [Link Title](page-slug)
|
2012-08-24 17:35:21 +02:00
|
|
|
\.
|
2012-07-26 13:45:17 +02:00
|
|
|
|
2013-01-04 22:35:31 +01:00
|
|
|
.ui-box-bottom
|
2012-07-26 13:45:17 +02:00
|
|
|
= f.label :content
|
2012-10-12 08:19:34 +02:00
|
|
|
.input= f.text_area :content, class: 'span8 js-gfm-input'
|
2013-03-04 04:43:52 +01:00
|
|
|
.ui-box-bottom
|
|
|
|
= f.label :commit_message
|
|
|
|
.input= f.text_field :message, class: 'span8'
|
2012-02-19 15:35:31 +01:00
|
|
|
.actions
|
2013-01-29 21:18:19 +01:00
|
|
|
= f.submit 'Save', class: "btn-save btn"
|
2013-03-20 05:28:10 +01:00
|
|
|
- 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"
|