Commit 8e900113 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle wiki for for twbs3

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent eaec2350
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= label_tag 'commit_message', class: "control-label" do = label_tag 'commit_message', class: "control-label" do
Commit message Commit message
.col-sm-10 .col-sm-10
= text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3 = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control'
.form-actions .form-actions
= hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'content', '', id: "file-content"
......
= form_for [@project, @wiki], method: @wiki.persisted? ? :put : :post do |f| = form_for [@project, @wiki], method: @wiki.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f|
-if @wiki.errors.any? -if @wiki.errors.any?
#error_explanation #error_explanation
%h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:" %h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:"
...@@ -6,29 +6,30 @@ ...@@ -6,29 +6,30 @@
- @wiki.errors.full_messages.each do |msg| - @wiki.errors.full_messages.each do |msg|
%li= msg %li= msg
.issue-box
%h3.title
.edit-wiki-header
= @wiki.title.titleize
= f.hidden_field :title, value: @wiki.title = f.hidden_field :title, value: @wiki.title
= f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium" .form-group
= f.label :format, class: "pull-right", style: "padding-right: 20px;" = f.label :format, class: 'control-label'
.context .col-sm-10
= f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "form-control"
.row
.col-sm-2
.col-sm-10 .col-sm-10
%span.cgray %p.cgray
Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. 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 To link to a (new) page you can just type
%code [Link Title](page-slug) %code [Link Title](page-slug)
\. \.
.description
.form-group .form-group
= f.label :content = f.label :content, class: 'control-label'
.col-sm-10= f.text_area :content, class: 'span8 js-gfm-input', rows: 18 .col-sm-10
.description = f.text_area :content, class: 'form-control js-gfm-input', rows: 18
.form-group .form-group
= f.label :commit_message = f.label :commit_message, class: 'control-label'
.col-sm-10= f.text_field :message, class: 'span8', rows: 18 .col-sm-10= f.text_field :message, class: 'form-control', rows: 18
.form-actions .form-actions
- if @wiki && @wiki.persisted? - if @wiki && @wiki.persisted?
= f.submit 'Save changes', class: "btn-save btn" = f.submit 'Save changes', class: "btn-save btn"
......
%ul.nav.nav-tabs %ul.nav.nav-tabs.append-bottom-20
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', project_wiki_path(@project, :home) = link_to 'Home', project_wiki_path(@project, :home)
......
= render 'nav' = render 'nav'
%h3.page-title %h3.page-title
Editing page Editing -
= render 'main_links' %span.light #{@wiki.title.titleize}
= render 'main_links'
%hr
= render 'form' = render 'form'
.pull-right .pull-right
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment