2012-01-17 22:28:59 +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
|
|
|
|
%fieldset#gollum-editor-fields
|
|
|
|
- if @new
|
|
|
|
#gollum-editor-title-field.singleline
|
|
|
|
= label_tag :page, t("layout.wiki.page_title"), :class => 'jaws'
|
|
|
|
= text_field_tag :page, @name, :id => "gollum-editor-page-title"
|
|
|
|
- else
|
|
|
|
= hidden_field_tag :page, @name, :id => "gollum-editor-page-title"
|
|
|
|
|
|
|
|
= render :partial => 'editor_toolbar'
|
|
|
|
|
|
|
|
= text_area_tag :content, @content, :id => "gollum-editor-body", :'data-markup-lang' => format
|
|
|
|
|
|
|
|
- if has_footer?
|
|
|
|
#gollum-editor-edit-footer.collapsed
|
|
|
|
= link_to "#", :class => "button" do
|
|
|
|
%span= t("layout.wiki.expand_collapse")
|
|
|
|
%h4
|
|
|
|
Footer
|
2012-01-31 16:40:46 +00:00
|
|
|
= text_area_tag :footer, footer.raw_data.force_encoding(Encoding::UTF_8), :id => "gollum-editor-footer"
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
- if has_sidebar?
|
|
|
|
#gollum-editor-edit-sidebar.collapsed
|
|
|
|
= link_to "#", :class => "button" do
|
|
|
|
%span= t("layout.wiki.expand_collapse")
|
|
|
|
%h4
|
|
|
|
Sidebar
|
2012-01-31 16:40:46 +00:00
|
|
|
= text_area_tag :sidebar, sidebar.raw_data.force_encoding(Encoding::UTF_8), :id => "gollum-editor-sidebar"
|
2012-01-17 22:28:59 +00:00
|
|
|
|
|
|
|
#gollum-editor-edit-summary.singleline
|
|
|
|
= label_tag :message, t("layout.wiki.edit_commit_message"), :class => "jaws"
|
|
|
|
= text_field_tag :message, t("layout.wiki.commit_message_placeholder"), :id => "gollum-editor-message-field"
|
|
|
|
|
|
|
|
%span.jaws
|
|
|
|
%br
|
|
|
|
|
|
|
|
= submit_tag t("layout.wiki.save_button"), :id => "gollum-editor-submit", :title => t("layout.wiki.save_changes")
|
2012-01-18 00:41:36 +00:00
|
|
|
= link_to t("layout.wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview",
|
|
|
|
:class => "minibutton", :title => t("layout.wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
|
2012-01-16 21:48:38 +00:00
|
|
|
|
|
|
|
- content_for :javascripts do
|
|
|
|
= javascript_include_tag 'gollum/editor/gollum.editor.js'
|
|
|
|
|
|
|
|
- content_for :stylesheets do
|
|
|
|
= stylesheet_link_tag 'gollum/editor.css'
|