Commit 5b2aa853a3e1b1ef5fd5ae4a23cf7850988c9f43
1 parent
d7a48443
Exists in
spb-stable
and in
3 other branches
Fix compare view and services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
8 changed files
with
40 additions
and
35 deletions
Show diff stats
app/assets/stylesheets/generic/forms.scss
app/assets/stylesheets/generic/ui_box.scss
app/assets/stylesheets/sections/commits.scss
@@ -399,8 +399,8 @@ | @@ -399,8 +399,8 @@ | ||
399 | 399 | ||
400 | .commits-compare-switch{ | 400 | .commits-compare-switch{ |
401 | background: url("switch_icon.png") no-repeat center center; | 401 | background: url("switch_icon.png") no-repeat center center; |
402 | - width: 22px; | ||
403 | - height: 22px; | 402 | + width: 32px; |
403 | + height: 32px; | ||
404 | text-indent: -9999px; | 404 | text-indent: -9999px; |
405 | float: left; | 405 | float: left; |
406 | margin-right: 9px; | 406 | margin-right: 9px; |
app/views/projects/compare/_form.html.haml
1 | -= form_tag project_compare_index_path(@project), method: :post do | ||
2 | - .clearfix | ||
3 | - .pull-left | ||
4 | - - if params[:to] && params[:from] | ||
5 | - = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'} | ||
6 | - .input-prepend | ||
7 | - %span.add-on from | ||
8 | - = text_field_tag :from, params[:from], class: "span3 input-xpadding" | ||
9 | - = "..." | ||
10 | - .input-prepend | ||
11 | - %span.add-on to | ||
12 | - = text_field_tag :to, params[:to], class: "span3 input-xpadding" | ||
13 | - .pull-left | ||
14 | - | ||
15 | - = submit_tag "Compare", class: "btn btn-create commits-compare-btn" | ||
16 | - - if compare_to_mr_button? | ||
17 | - = link_to compare_mr_path, class: 'prepend-left-10' do | ||
18 | - %strong Make a merge request | 1 | += form_tag project_compare_index_path(@project), method: :post, class: 'form-inline' do |
2 | + .clearfix.append-bottom-20 | ||
3 | + - if params[:to] && params[:from] | ||
4 | + = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'} | ||
5 | + .form-group | ||
6 | + .input-group.inline-input-group | ||
7 | + %span.input-group-addon from | ||
8 | + = text_field_tag :from, params[:from], class: "form-control" | ||
9 | + = "..." | ||
10 | + .form-group | ||
11 | + .input-group.inline-input-group | ||
12 | + %span.input-group-addon to | ||
13 | + = text_field_tag :to, params[:to], class: "form-control" | ||
14 | + | ||
15 | + = submit_tag "Compare", class: "btn btn-create commits-compare-btn" | ||
16 | + - if compare_to_mr_button? | ||
17 | + = link_to compare_mr_path, class: 'prepend-left-10' do | ||
18 | + %strong Make a merge request | ||
19 | 19 | ||
20 | 20 | ||
21 | :javascript | 21 | :javascript |
app/views/projects/compare/show.html.haml
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | = render "form" | 6 | = render "form" |
7 | 7 | ||
8 | - if @commits.size > 100 | 8 | - if @commits.size > 100 |
9 | - .alert.alert-block | 9 | + .alert.alert-warning |
10 | %p | 10 | %p |
11 | %strong Warning! This comparison includes more than 100 commits. | 11 | %strong Warning! This comparison includes more than 100 commits. |
12 | %p To preserve performance the line diff is not shown. | 12 | %p To preserve performance the line diff is not shown. |
app/views/projects/edit.html.haml
@@ -134,9 +134,9 @@ | @@ -134,9 +134,9 @@ | ||
134 | .title Transfer project | 134 | .title Transfer project |
135 | .errors-holder | 135 | .errors-holder |
136 | .form-holder | 136 | .form-holder |
137 | - = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project' }) do |f| | 137 | + = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f| |
138 | .form-group | 138 | .form-group |
139 | - = f.label :namespace_id do | 139 | + = f.label :namespace_id, class: 'control-label' do |
140 | %span Namespace | 140 | %span Namespace |
141 | .col-sm-10 | 141 | .col-sm-10 |
142 | .form-group | 142 | .form-group |
@@ -154,15 +154,15 @@ | @@ -154,15 +154,15 @@ | ||
154 | .title Rename repository | 154 | .title Rename repository |
155 | .errors-holder | 155 | .errors-holder |
156 | .form-holder | 156 | .form-holder |
157 | - = form_for(@project) do |f| | 157 | + = form_for(@project, html: { class: 'form-horizontal' }) do |f| |
158 | .form-group | 158 | .form-group |
159 | - = f.label :path do | 159 | + = f.label :path, class: 'control-label' do |
160 | %span Path | 160 | %span Path |
161 | - .col-sm-10 | 161 | + .col-sm-9 |
162 | .form-group | 162 | .form-group |
163 | - .input-append | ||
164 | - = f.text_field :path | ||
165 | - %span.add-on .git | 163 | + .input-group |
164 | + = f.text_field :path, class: 'form-control' | ||
165 | + %span.input-group-addon .git | ||
166 | %ul | 166 | %ul |
167 | %li Be careful. Renaming a project's repository can have unintended side effects. | 167 | %li Be careful. Renaming a project's repository can have unintended side effects. |
168 | %li You will need to update your local repositories to point to the new location. | 168 | %li You will need to update your local repositories to point to the new location. |
app/views/projects/new_tree/show.html.haml
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | .col-sm-10 | 8 | .col-sm-10 |
9 | %span.monospace= @path[-1] == "/" ? @path : @path + "/" | 9 | %span.monospace= @path[-1] == "/" ? @path : @path + "/" |
10 | | 10 | |
11 | - = text_field_tag 'file_name', params[:file_name], placeholder: "sample.rb", required: true | 11 | + = text_field_tag 'file_name', params[:file_name], placeholder: "sample.rb", required: true, class: 'form-control' |
12 | %span | 12 | %span |
13 | | 13 | |
14 | on | 14 | on |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | = label_tag 'commit_message', class: "control-label" do | 18 | = label_tag 'commit_message', class: "control-label" do |
19 | Commit message | 19 | Commit message |
20 | .col-sm-10 | 20 | .col-sm-10 |
21 | - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3 | 21 | + = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control' |
22 | 22 | ||
23 | .file-holder | 23 | .file-holder |
24 | .file-title | 24 | .file-title |
app/views/projects/services/_form.html.haml
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | %hr | 11 | %hr |
12 | 12 | ||
13 | -= form_for(@service, as: :service, url: project_service_path(@project, @service.to_param), method: :put) do |f| | 13 | += form_for(@service, as: :service, url: project_service_path(@project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f| |
14 | - if @service.errors.any? | 14 | - if @service.errors.any? |
15 | .alert.alert-danger | 15 | .alert.alert-danger |
16 | %ul | 16 | %ul |
@@ -32,9 +32,9 @@ | @@ -32,9 +32,9 @@ | ||
32 | = f.label name, class: "control-label" | 32 | = f.label name, class: "control-label" |
33 | .col-sm-10 | 33 | .col-sm-10 |
34 | - if type == 'text' | 34 | - if type == 'text' |
35 | - = f.text_field name, class: "input-lg", placeholder: placeholder | 35 | + = f.text_field name, class: "form-control", placeholder: placeholder |
36 | - elsif type == 'textarea' | 36 | - elsif type == 'textarea' |
37 | - = f.text_area name, rows: 5, class: "input-lg", placeholder: placeholder | 37 | + = f.text_area name, rows: 5, class: "form-control", placeholder: placeholder |
38 | - elsif type == 'checkbox' | 38 | - elsif type == 'checkbox' |
39 | = f.check_box name | 39 | = f.check_box name |
40 | 40 |