2014-01-21 04:51:49 +00:00
|
|
|
#gollum-editor{class: "#{@new ? 'create' : 'edit'}", :'data-escaped-name' => escaped_name}
|
|
|
|
= form_tag editor_path(@project, @name), name: 'gollum-editor', method: @new ? :post : :put do
|
2012-01-17 22:28:59 +00:00
|
|
|
%fieldset#gollum-editor-fields
|
|
|
|
- if @new
|
|
|
|
#gollum-editor-title-field.singleline
|
2014-01-21 04:51:49 +00:00
|
|
|
= label_tag :page, t("wiki.page_title"), class: 'jaws'
|
|
|
|
= text_field_tag :page, @name, id: "gollum-editor-page-title"
|
2012-01-17 22:28:59 +00:00
|
|
|
- else
|
2014-01-21 04:51:49 +00:00
|
|
|
= hidden_field_tag :page, @name, id: "gollum-editor-page-title"
|
2012-01-17 22:28:59 +00:00
|
|
|
|
2012-02-24 21:37:22 +00:00
|
|
|
= render 'editor_toolbar'
|
2012-01-17 22:28:59 +00:00
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
= text_area_tag :content, @content, id: "gollum-editor-body", :'data-markup-lang' => format
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
- if has_footer?
|
|
|
|
#gollum-editor-edit-footer.collapsed
|
2014-01-21 04:51:49 +00:00
|
|
|
= link_to "#", class: "button" do
|
2012-02-24 21:37:22 +00:00
|
|
|
%span= t("wiki.expand_collapse")
|
|
|
|
%h4= t("wiki.footer")
|
2012-01-31 23:20:42 +00:00
|
|
|
= text_area_tag :footer, footer.text_data
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
- if has_sidebar?
|
|
|
|
#gollum-editor-edit-sidebar.collapsed
|
2014-01-21 04:51:49 +00:00
|
|
|
= link_to "#", class: "button" do
|
2012-02-24 21:37:22 +00:00
|
|
|
%span= t("wiki.expand_collapse")
|
|
|
|
%h4= t("wiki.sidebar")
|
2012-01-31 23:20:42 +00:00
|
|
|
= text_area_tag :sidebar, sidebar.text_data
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
#gollum-editor-edit-summary.singleline
|
2014-01-21 04:51:49 +00:00
|
|
|
= label_tag :message, t("wiki.edit_commit_message"), class: "jaws"
|
|
|
|
= text_field_tag :message, t("wiki.commit_message_placeholder"), id: "gollum-editor-message-field"
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
%span.jaws
|
|
|
|
%br
|
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
= submit_tag t('wiki.save_button'), id: 'gollum-editor-submit', title: t('wiki.save_changes'), data: {'disable-with' => t('layout.saving')}
|
|
|
|
= link_to t("wiki.preview"), "javascript:void(0)", id: "gollum-editor-preview", class: "minibutton", title: t("wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
|