Commit 8e90011369507911ea02ba357f19f0a4d18f03af
1 parent
eaec2350
Exists in
spb-stable
and in
3 other branches
Restyle wiki for for twbs3
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
4 changed files
with
30 additions
and
27 deletions
Show diff stats
app/views/projects/edit_tree/show.html.haml
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | = label_tag 'commit_message', class: "control-label" do | 19 | = label_tag 'commit_message', class: "control-label" do |
20 | Commit message | 20 | Commit message |
21 | .col-sm-10 | 21 | .col-sm-10 |
22 | - = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3 | 22 | + = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control' |
23 | .form-actions | 23 | .form-actions |
24 | = hidden_field_tag 'last_commit', @last_commit | 24 | = hidden_field_tag 'last_commit', @last_commit |
25 | = hidden_field_tag 'content', '', id: "file-content" | 25 | = hidden_field_tag 'content', '', id: "file-content" |
app/views/projects/wikis/_form.html.haml
1 | -= form_for [@project, @wiki], method: @wiki.persisted? ? :put : :post do |f| | 1 | += form_for [@project, @wiki], method: @wiki.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f| |
2 | -if @wiki.errors.any? | 2 | -if @wiki.errors.any? |
3 | #error_explanation | 3 | #error_explanation |
4 | %h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:" | 4 | %h2= "#{pluralize(@wiki.errors.count, "error")} prohibited this wiki from being saved:" |
@@ -6,29 +6,30 @@ | @@ -6,29 +6,30 @@ | ||
6 | - @wiki.errors.full_messages.each do |msg| | 6 | - @wiki.errors.full_messages.each do |msg| |
7 | %li= msg | 7 | %li= msg |
8 | 8 | ||
9 | - .issue-box | ||
10 | - %h3.title | ||
11 | - .edit-wiki-header | ||
12 | - = @wiki.title.titleize | ||
13 | - = f.hidden_field :title, value: @wiki.title | ||
14 | - = f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium" | ||
15 | - = f.label :format, class: "pull-right", style: "padding-right: 20px;" | ||
16 | - .context | ||
17 | - .col-sm-10 | ||
18 | - %span.cgray | ||
19 | - Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. | ||
20 | - To link to a (new) page you can just type | ||
21 | - %code [Link Title](page-slug) | ||
22 | - \. | 9 | + = f.hidden_field :title, value: @wiki.title |
10 | + .form-group | ||
11 | + = f.label :format, class: 'control-label' | ||
12 | + .col-sm-10 | ||
13 | + = f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "form-control" | ||
14 | + | ||
15 | + .row | ||
16 | + .col-sm-2 | ||
17 | + .col-sm-10 | ||
18 | + %p.cgray | ||
19 | + Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. | ||
20 | + To link to a (new) page you can just type | ||
21 | + %code [Link Title](page-slug) | ||
22 | + \. | ||
23 | + | ||
24 | + .form-group | ||
25 | + = f.label :content, class: 'control-label' | ||
26 | + .col-sm-10 | ||
27 | + = f.text_area :content, class: 'form-control js-gfm-input', rows: 18 | ||
28 | + | ||
29 | + .form-group | ||
30 | + = f.label :commit_message, class: 'control-label' | ||
31 | + .col-sm-10= f.text_field :message, class: 'form-control', rows: 18 | ||
23 | 32 | ||
24 | - .description | ||
25 | - .form-group | ||
26 | - = f.label :content | ||
27 | - .col-sm-10= f.text_area :content, class: 'span8 js-gfm-input', rows: 18 | ||
28 | - .description | ||
29 | - .form-group | ||
30 | - = f.label :commit_message | ||
31 | - .col-sm-10= f.text_field :message, class: 'span8', rows: 18 | ||
32 | .form-actions | 33 | .form-actions |
33 | - if @wiki && @wiki.persisted? | 34 | - if @wiki && @wiki.persisted? |
34 | = f.submit 'Save changes', class: "btn-save btn" | 35 | = f.submit 'Save changes', class: "btn-save btn" |
app/views/projects/wikis/_nav.html.haml
1 | -%ul.nav.nav-tabs | 1 | +%ul.nav.nav-tabs.append-bottom-20 |
2 | = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do | 2 | = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do |
3 | = link_to 'Home', project_wiki_path(@project, :home) | 3 | = link_to 'Home', project_wiki_path(@project, :home) |
4 | 4 |
app/views/projects/wikis/edit.html.haml