#276: updated UI for repositories

This commit is contained in:
Vokhmin Alexey V 2013-08-25 19:49:04 +04:00
parent 55bc1a8096
commit 75d5bc501f
2 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -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')