gitlabhq/app/views/wikis/_form.html.haml

34 lines
1.2 KiB
Plaintext
Raw Normal View History

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
%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
.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)
\.
2013-01-04 22:35:31 +01:00
.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'
2012-02-19 15:35:31 +01:00
.actions
2013-01-29 21:18:19 +01:00
= f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_wiki_path(@project, :index), class: "btn btn-cancel"