From 75d5bc501f9d33f78334daa11384ac0d8a04b61b Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Sun, 25 Aug 2013 19:49:04 +0400 Subject: [PATCH] #276: updated UI for repositories --- app/views/platforms/platforms/edit.html.haml | 6 +++--- .../platforms/repositories/edit.html.haml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/app/views/platforms/platforms/edit.html.haml b/app/views/platforms/platforms/edit.html.haml index 146b46625..61a846409 100644 --- a/app/views/platforms/platforms/edit.html.haml +++ b/app/views/platforms/platforms/edit.html.haml @@ -18,9 +18,6 @@ - if can? :regenerate_metadata, @platform .hr %h3= t('layout.platforms.metadata') - .leftside - .rightside= link_to t('layout.regeneration_statuses.regenerate_metadata'), regenerate_metadata_platform_path(@platform), :method => :put, :confirm => t('layout.confirm'), :class => 'button' - .both .leftlist= t('activerecord.attributes.regeneration_status.status') .rightlist= t("layout.regeneration_statuses.statuses.#{@platform.human_status}") .both @@ -30,6 +27,9 @@ .leftlist= t('activerecord.attributes.regeneration_status.last_regenerated_status') .rightlist= t("layout.regeneration_statuses.last_regenerated_statuses.#{@platform.human_regeneration_status}") .both + .leftside + .rightside= link_to t('layout.regeneration_statuses.regenerate_metadata'), regenerate_metadata_platform_path(@platform), :method => :put, :confirm => t('layout.confirm'), :class => 'button' + .both - if can? :destroy, @platform .hr diff --git a/app/views/platforms/repositories/edit.html.haml b/app/views/platforms/repositories/edit.html.haml index 871f57183..799ab908a 100644 --- a/app/views/platforms/repositories/edit.html.haml +++ b/app/views/platforms/repositories/edit.html.haml @@ -19,6 +19,25 @@ = f.submit t('layout.repositories.regenerate_metadata'), :confirm => t('layout.confirm') .both + - if @repository.repository_statuses.present? + %table#myTable.tablesorter.platform-repos{:cellspacing => "0", :cellpadding => "0"} + %thead + %tr + %th= t('activerecord.attributes.regeneration_status.status') + %th= t('activerecord.attributes.regeneration_status.last_regenerated_status') + %th= t('activerecord.attributes.regeneration_status.last_regenerated_at') + - unless @platform.main? + %th= t('activerecord.models.platform') + %tbody + - @repository.repository_statuses.sort_by{ |s| s.platform.name }.each do |status| + %tr{:class => cycle('odd', 'even')} + %td= t("layout.regeneration_statuses.statuses.#{status.human_status}") + %td= t("layout.regeneration_statuses.last_regenerated_statuses.#{status.human_regeneration_status}") + %td= status.last_regenerated_at + - unless @platform.main? + %td= status.platform.name + .both + - if @platform.main? - if @repository.sync_lock_file_exists? - label = t('layout.repositories.remove_sync_lock_file')