summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-31 17:08:31 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-31 17:08:31 +0200
commit5b2aa853a3e1b1ef5fd5ae4a23cf7850988c9f43 (patch)
treec5014e5dd4e4686fe51ec13845d96eec506f2b83
parentd7a48443ce3dae559726de4d9f5ce358877bfbcd (diff)
downloadgitlab-ce-5b2aa853a3e1b1ef5fd5ae4a23cf7850988c9f43.tar.gz
Fix compare view and services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/assets/stylesheets/generic/forms.scss4
-rw-r--r--app/assets/stylesheets/generic/ui_box.scss3
-rw-r--r--app/assets/stylesheets/sections/commits.scss4
-rw-r--r--app/views/projects/compare/_form.html.haml36
-rw-r--r--app/views/projects/compare/show.html.haml2
-rw-r--r--app/views/projects/edit.html.haml16
-rw-r--r--app/views/projects/new_tree/show.html.haml4
-rw-r--r--app/views/projects/services/_form.html.haml6
8 files changed, 40 insertions, 35 deletions
diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss
index 0cc14e46689..667c8b939c6 100644
--- a/app/assets/stylesheets/generic/forms.scss
+++ b/app/assets/stylesheets/generic/forms.scss
@@ -33,3 +33,7 @@ fieldset legend {
label.control-label {
@extend .col-sm-2;
}
+
+.inline-input-group {
+ width: 250px;
+}
diff --git a/app/assets/stylesheets/generic/ui_box.scss b/app/assets/stylesheets/generic/ui_box.scss
index e25d33468a7..7a977eae70d 100644
--- a/app/assets/stylesheets/generic/ui_box.scss
+++ b/app/assets/stylesheets/generic/ui_box.scss
@@ -158,7 +158,8 @@
.title {
background: #D65;
color: #fff;
- text-shadow: 0 1px 1px #900;
+ text-shadow: none;
+ font-weight: 500;
}
}
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index a971cfd8e42..7b1b0ea4723 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -399,8 +399,8 @@
.commits-compare-switch{
background: url("switch_icon.png") no-repeat center center;
- width: 22px;
- height: 22px;
+ width: 32px;
+ height: 32px;
text-indent: -9999px;
float: left;
margin-right: 9px;
diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml
index 605b2a8428b..0762655fb93 100644
--- a/app/views/projects/compare/_form.html.haml
+++ b/app/views/projects/compare/_form.html.haml
@@ -1,21 +1,21 @@
-= form_tag project_compare_index_path(@project), method: :post do
- .clearfix
- .pull-left
- - if params[:to] && params[:from]
- = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
- .input-prepend
- %span.add-on from
- = text_field_tag :from, params[:from], class: "span3 input-xpadding"
- = "..."
- .input-prepend
- %span.add-on to
- = text_field_tag :to, params[:to], class: "span3 input-xpadding"
- .pull-left
- &nbsp;
- = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
- - if compare_to_mr_button?
- = link_to compare_mr_path, class: 'prepend-left-10' do
- %strong Make a merge request
+= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline' do
+ .clearfix.append-bottom-20
+ - if params[:to] && params[:from]
+ = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
+ .form-group
+ .input-group.inline-input-group
+ %span.input-group-addon from
+ = text_field_tag :from, params[:from], class: "form-control"
+ = "..."
+ .form-group
+ .input-group.inline-input-group
+ %span.input-group-addon to
+ = text_field_tag :to, params[:to], class: "form-control"
+ &nbsp;
+ = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
+ - if compare_to_mr_button?
+ = link_to compare_mr_path, class: 'prepend-left-10' do
+ %strong Make a merge request
:javascript
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 4be62d36917..e9456c24960 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -6,7 +6,7 @@
= render "form"
- if @commits.size > 100
- .alert.alert-block
+ .alert.alert-warning
%p
%strong Warning! This comparison includes more than 100 commits.
%p To preserve performance the line diff is not shown.
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index c3201dc0049..51f2e23840c 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -134,9 +134,9 @@
.title Transfer project
.errors-holder
.form-holder
- = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project' }) do |f|
+ = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
.form-group
- = f.label :namespace_id do
+ = f.label :namespace_id, class: 'control-label' do
%span Namespace
.col-sm-10
.form-group
@@ -154,15 +154,15 @@
.title Rename repository
.errors-holder
.form-holder
- = form_for(@project) do |f|
+ = form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
- = f.label :path do
+ = f.label :path, class: 'control-label' do
%span Path
- .col-sm-10
+ .col-sm-9
.form-group
- .input-append
- = f.text_field :path
- %span.add-on .git
+ .input-group
+ = f.text_field :path, class: 'form-control'
+ %span.input-group-addon .git
%ul
%li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location.
diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/new_tree/show.html.haml
index 68206d9b7be..b206bc000a6 100644
--- a/app/views/projects/new_tree/show.html.haml
+++ b/app/views/projects/new_tree/show.html.haml
@@ -8,7 +8,7 @@
.col-sm-10
%span.monospace= @path[-1] == "/" ? @path : @path + "/"
&nbsp;
- = text_field_tag 'file_name', params[:file_name], placeholder: "sample.rb", required: true
+ = text_field_tag 'file_name', params[:file_name], placeholder: "sample.rb", required: true, class: 'form-control'
%span
&nbsp;
on
@@ -18,7 +18,7 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.col-sm-10
- = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3
+ = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control'
.file-holder
.file-title
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index a6f87c93169..a3b5296ed1e 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -10,7 +10,7 @@
%hr
-= form_for(@service, as: :service, url: project_service_path(@project, @service.to_param), method: :put) do |f|
+= form_for(@service, as: :service, url: project_service_path(@project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f|
- if @service.errors.any?
.alert.alert-danger
%ul
@@ -32,9 +32,9 @@
= f.label name, class: "control-label"
.col-sm-10
- if type == 'text'
- = f.text_field name, class: "input-lg", placeholder: placeholder
+ = f.text_field name, class: "form-control", placeholder: placeholder
- elsif type == 'textarea'
- = f.text_area name, rows: 5, class: "input-lg", placeholder: placeholder
+ = f.text_area name, rows: 5, class: "form-control", placeholder: placeholder
- elsif type == 'checkbox'
= f.check_box name