diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 025989465..d540944b1 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -463,6 +463,19 @@ table.tablesorter tr td.buttons a span.delete { #fork-and-edit {display:block;} +.notify.blue div.success { + border: 1px solid #bad099; + background: #d7e599; + float: left; +} + +div.notify.blue div.error { + float: left; + border: 1px solid #ddd; + background-color: #FBE3E4; + border-color: #FBC2C4; +} + div.notify.blue div.nocolor { float: left; border: 1px solid #a9c6dd; diff --git a/app/helpers/build_lists_helper.rb b/app/helpers/build_lists_helper.rb index 4e14740b8..ec670a549 100644 --- a/app/helpers/build_lists_helper.rb +++ b/app/helpers/build_lists_helper.rb @@ -1,11 +1,11 @@ module BuildListsHelper def build_list_status_color(status) if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? status - return 'green' + return 'success' end if [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND, BuildServer::PROJECT_NOT_FOUND,BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? status - return 'red' + return 'error' end 'nocolor' @@ -21,14 +21,4 @@ module BuildListsHelper '' end - - def build_list_status(build_list) - if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? build_list.status - "success" - elsif [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND, BuildServer::PROJECT_NOT_FOUND, - BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? build_list.status - "error" - end - end - end diff --git a/app/views/build_lists/_build_list.html.haml b/app/views/build_lists/_build_list.html.haml index 67a70608b..04443371e 100644 --- a/app/views/build_lists/_build_list.html.haml +++ b/app/views/build_lists/_build_list.html.haml @@ -1,4 +1,4 @@ -%tr{:id => "row#{build_list_counter}", :class => "#{build_list_status(build_list)}"} +%tr{:id => "row#{build_list_counter}", :class => "#{build_list_status_color(build_list.status)}"} %td= link_to (build_list.bs_id.present? ? build_list.bs_id : t("layout.build_lists.bs_id_not_set")), build_list %td= build_list.human_status %td= link_to build_list.project.name, build_list.project @@ -6,4 +6,4 @@ %td= build_list.arch.name %td= link_to build_list.user.try(:fullname), build_list.user %td= link_to image_tag('x.png', :class => 'delete-row', :id => "delete-row#{build_list_counter}"), cancel_build_list_path(build_list), :method => :put, :confirm => t('layout.confirm') if build_list.can_cancel? and can?(:cancel, build_list) - %td= build_list.notified_at \ No newline at end of file + %td= build_list.notified_at