From eeedbbc79b910c9cb68a4f99f174bc721d276772 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 27 Mar 2013 15:38:19 +0400 Subject: [PATCH 1/2] #31: update notification about removing product_build_list --- .../product_build_lists/show.html.haml | 18 ++++++++++-------- .../locales/models/product_build_list.en.yml | 4 ++-- .../locales/models/product_build_list.ru.yml | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/views/platforms/product_build_lists/show.html.haml b/app/views/platforms/product_build_lists/show.html.haml index 848a2684d..02f6a3376 100644 --- a/app/views/platforms/product_build_lists/show.html.haml +++ b/app/views/platforms/product_build_lists/show.html.haml @@ -45,14 +45,16 @@ %br = submit_tag t('layout.update') .both - - unless pbl.not_delete - .flash_notify - .alert.alert-error - - if pbl.autostarted? - = t('layout.product_build_lists.will_be_exist_2_weeks') - - else - = t('layout.product_build_lists.will_be_exist_3_months') - .both +- unless pbl.not_delete + .flash_notify + .alert.alert-error + - days = pbl.autostarted? ? ProductBuildList::LIVE_TIME : ProductBuildList::MAX_LIVE_TIME + - days = (pbl.created_at.to_date - days.ago.to_date).to_i + - if days > 1 + = t('layout.product_build_lists.will_be_exist_n_days', :n => days) + - else + = t('layout.product_build_lists.will_be_removed_today') + .both = render 'results', :subject => pbl diff --git a/config/locales/models/product_build_list.en.yml b/config/locales/models/product_build_list.en.yml index 2a711bd90..dfff38f36 100644 --- a/config/locales/models/product_build_list.en.yml +++ b/config/locales/models/product_build_list.en.yml @@ -1,8 +1,8 @@ en: layout: product_build_lists: - will_be_exist_2_weeks: Product build list will be exist in two weeks - will_be_exist_3_months: Product build list will be exist in three months + will_be_exist_n_days: Product build list will be exist in %{n} days + will_be_removed_today: Product build list will be removed today logs: Logs (last 100 lines) work_env: Work environment iso_builder_folder: folder with contents of the GIT project diff --git a/config/locales/models/product_build_list.ru.yml b/config/locales/models/product_build_list.ru.yml index 00dde5ad7..ff145f323 100644 --- a/config/locales/models/product_build_list.ru.yml +++ b/config/locales/models/product_build_list.ru.yml @@ -1,8 +1,8 @@ ru: layout: product_build_lists: - will_be_exist_2_weeks: Cборочный лист продукта будет доступен в течение двух недель - will_be_exist_3_months: Cборочный лист продукта будет доступен в течение трех месяцев + will_be_exist_n_days: Cборочный лист продукта будет доступен в течение %{n} дней + will_be_removed_today: Cборочный лист продукта будет удален в течение дня logs: Логи (последнии 100 строк) work_env: Рабочее пространство iso_builder_folder: папка с содержимым GIT проекта From a100f3b3b1fd142aceb1da44b1dc268ac14595ca Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 27 Mar 2013 15:44:19 +0400 Subject: [PATCH 2/2] #31: update position of alert message --- app/views/platforms/product_build_lists/show.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/platforms/product_build_lists/show.html.haml b/app/views/platforms/product_build_lists/show.html.haml index 02f6a3376..cff945996 100644 --- a/app/views/platforms/product_build_lists/show.html.haml +++ b/app/views/platforms/product_build_lists/show.html.haml @@ -32,9 +32,7 @@ = link_to t("layout.build_lists.cancel"), cancel_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl), :method => :put, :confirm => t("layout.confirm"), :class => 'button' .both - -- if pbl.build_started? || pbl.build_canceling? - = render 'shared/log', { :build_started => true, :get_log_path => log_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) } + %br - if pbl.build_completed? && can?(:update, pbl) = form_for pbl, :url => platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) do |f| @@ -56,6 +54,9 @@ = t('layout.product_build_lists.will_be_removed_today') .both +- if pbl.build_started? || pbl.build_canceling? + = render 'shared/log', { :build_started => true, :get_log_path => log_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) } + = render 'results', :subject => pbl :javascript