From 5037e6782b09767ab954717922d2067f6d7ec3f0 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 6 Feb 2015 02:59:45 +0300 Subject: [PATCH] #369: Change color of buttons --- app/views/platforms/maintainers/_list.html.slim | 8 +++----- app/views/platforms/platforms/_form.html.slim | 3 ++- app/views/platforms/platforms/clone.html.slim | 9 ++++----- app/views/platforms/products/_form.html.slim | 8 +++----- app/views/platforms/repositories/_form.html.slim | 8 +++----- .../platforms/repositories/remove_project.html.slim | 2 +- app/views/projects/build_lists/_filter.html.haml | 6 +++--- app/views/shared/_autocomplete_form.html.slim | 2 +- app/views/users/profile/_projects.html.slim | 2 +- 9 files changed, 21 insertions(+), 27 deletions(-) diff --git a/app/views/platforms/maintainers/_list.html.slim b/app/views/platforms/maintainers/_list.html.slim index 916ea771b..58a037952 100644 --- a/app/views/platforms/maintainers/_list.html.slim +++ b/app/views/platforms/maintainers/_list.html.slim @@ -3,11 +3,9 @@ .col-md-6 = f.input :name, label: false .col-md-6 - = f.button :submit, t('layout.search.header') - |   - = t('layout.or') - |   - a href=platform_maintainers_path(@platform) + => f.button :submit, t('layout.search.header') + => t('layout.or') + a.btn.btn-default href=platform_maintainers_path(@platform) = t('layout.clear') diff --git a/app/views/platforms/platforms/_form.html.slim b/app/views/platforms/platforms/_form.html.slim index 10c5a4382..8e9a4fb2e 100644 --- a/app/views/platforms/platforms/_form.html.slim +++ b/app/views/platforms/platforms/_form.html.slim @@ -60,5 +60,6 @@ .col-sm-offset-3.col-sm-9 => f.button :submit, t('layout.save') - a.btn.btn-primary href=(@platform.new_record? ? root_path : platform_path(@platform)) + => t('layout.or') + a.btn.btn-default href=(@platform.new_record? ? root_path : platform_path(@platform)) = t('layout.cancel') diff --git a/app/views/platforms/platforms/clone.html.slim b/app/views/platforms/platforms/clone.html.slim index b1467aeff..f51a02649 100644 --- a/app/views/platforms/platforms/clone.html.slim +++ b/app/views/platforms/platforms/clone.html.slim @@ -10,9 +10,8 @@ = f.input :description, as: :text .button_block - button type="submit" class="btn btn-default" data-disable-with=t('layout.processing') + button type="submit" class="btn btn-primary" data-disable-with=t('layout.processing') = t('layout.clone') - |   - = t('layout.or') - |   - = link_to t('layout.cancel'), platform_path(@platform) + =<> t('layout.or') + a.btn.btn-default href=platform_path(@platform) + = t('layout.cancel') diff --git a/app/views/platforms/products/_form.html.slim b/app/views/platforms/products/_form.html.slim index 59bc486cf..bcc7f3252 100644 --- a/app/views/platforms/products/_form.html.slim +++ b/app/views/platforms/products/_form.html.slim @@ -35,10 +35,8 @@ = f.input :autostart_status, collection: Product::AUTOSTART_STATUSES.collect{|status| [Product.human_autostart_status(status), status]} -= f.button :submit, t('layout.save') -|   -= t('layout.or') -|   -a href=( @product.new_record? ? platform_path(@platform) : platform_product_path(@platform, @product) ) +=> f.button :submit, t('layout.save') +=> t('layout.or') +a.btn.btn-default href=( @product.new_record? ? platform_path(@platform) : platform_product_path(@platform, @product) ) = t('layout.cancel') diff --git a/app/views/platforms/repositories/_form.html.slim b/app/views/platforms/repositories/_form.html.slim index cf64b7714..2cc3f06ba 100644 --- a/app/views/platforms/repositories/_form.html.slim +++ b/app/views/platforms/repositories/_form.html.slim @@ -7,9 +7,7 @@ - if @platform.main? = f.input :publish_builds_only_from_branch -= f.button :submit, t('layout.save') -|   -= t('layout.or') -|   -a href=(@repository.new_record? ? platform_repositories_path(@platform) : platform_repository_path(@platform, @repository)) +=> f.button :submit, t('layout.save') +=> t('layout.or') +a.btn.btn-default href=(@repository.new_record? ? platform_repositories_path(@platform) : platform_repository_path(@platform, @repository)) = t('layout.cancel') diff --git a/app/views/platforms/repositories/remove_project.html.slim b/app/views/platforms/repositories/remove_project.html.slim index fb1588c08..0a6ef4462 100644 --- a/app/views/platforms/repositories/remove_project.html.slim +++ b/app/views/platforms/repositories/remove_project.html.slim @@ -7,4 +7,4 @@ .row = simple_form_for :repository, url: remove_project_platform_repository_path(@platform, @repository), html: { method: :delete } do |f| = f.input :projects_list, as: :text - = f.button :submit, t('layout.delete') + = f.button :submit, t('layout.delete'), class: 'btn-danger' diff --git a/app/views/projects/build_lists/_filter.html.haml b/app/views/projects/build_lists/_filter.html.haml index 55eea66cf..f2a2b67d7 100644 --- a/app/views/projects/build_lists/_filter.html.haml +++ b/app/views/projects/build_lists/_filter.html.haml @@ -73,13 +73,13 @@ %button.btn.btn-default{ type: 'button', disabled: true } = t('layout.processing') .btn-group{ 'ng-hide' => 'isRequest' } - %button.btn.btn-default{ type: 'button', 'ng-click' => 'refresh(true)' } + %button.btn.btn-primary{ type: 'button', 'ng-click' => 'refresh(true)' } = t('layout.search.header') .btn-group - %button.btn.btn-default{ type: 'button', 'ng-click' => 'clear()' }= t('reset') + %button.btn.btn-primary{ type: 'button', 'ng-click' => 'clear()' }= t('reset') -if @project and can?(:create, @project.build_lists.build) .btn-group - %button.btn.btn-default{ id: 'filter_new_build', type: 'button', + %button.btn.btn-primary{ id: 'filter_new_build', type: 'button', onclick: "location.href='#{new_project_build_list_path(@project)}'" } = t('layout.build_lists.new_header') = hidden_field_tag :name_with_owner, @project.try(:name_with_owner) diff --git a/app/views/shared/_autocomplete_form.html.slim b/app/views/shared/_autocomplete_form.html.slim index e4eb9d614..12fb97458 100644 --- a/app/views/shared/_autocomplete_form.html.slim +++ b/app/views/shared/_autocomplete_form.html.slim @@ -35,7 +35,7 @@ h4 typeahead = "extra.label for extra in #{ctrl_as}get#{field}($viewValue)" typeahead-on-select = "#{ctrl_as}select#{func_name}($item, $model, $label)" ] .col-md-4 - button[ class='btn btn-default' type='button' + button[ class='btn btn-primary' type='button' ng-click="#{ctrl_as}add#{func_name}()" ] = t('layout.add') diff --git a/app/views/users/profile/_projects.html.slim b/app/views/users/profile/_projects.html.slim index e6efcd289..2cb509f02 100644 --- a/app/views/users/profile/_projects.html.slim +++ b/app/views/users/profile/_projects.html.slim @@ -38,7 +38,7 @@ .col-md-5 => f.button :submit, t('.search') => t('.or') - = link_to t('.clear'), subject + = link_to t('.clear'), subject, class: 'btn btn-default' hr table.table.table-striped ng-show='!processing'