Update BuildListItems for new requirement
This commit is contained in:
parent
6b993db2fc
commit
8c7b196764
|
@ -89,7 +89,7 @@ class BuildList < ActiveRecord::Base
|
||||||
|
|
||||||
items_hash.each do |level, items|
|
items_hash.each do |level, items|
|
||||||
items.each do |item|
|
items.each do |item|
|
||||||
self.items << self.items.build(:name => item, :level => level.to_i)
|
self.items << self.items.build(:name => item['name'], :version => item['version'], :level => level.to_i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,11 +95,13 @@
|
||||||
%table.table
|
%table.table
|
||||||
%tr
|
%tr
|
||||||
%th.first= t("activerecord.attributes.build_list/item.name")
|
%th.first= t("activerecord.attributes.build_list/item.name")
|
||||||
|
%th= t("activerecord.attributes.build_list/item.version")
|
||||||
%th.last= t("activerecord.attributes.build_list/item.status")
|
%th.last= t("activerecord.attributes.build_list/item.status")
|
||||||
|
|
||||||
- group.each do |item|
|
- group.each do |item|
|
||||||
%tr{:class => cycle("odd", "even")}
|
%tr{:class => cycle("odd", "even")}
|
||||||
%td= item.name
|
%td= item.name
|
||||||
|
%td= item.version
|
||||||
%td.last= item.human_status
|
%td.last= item.human_status
|
||||||
|
|
||||||
- content_for :sidebar, render(:partial => 'sidebar')
|
- content_for :sidebar, render(:partial => 'sidebar')
|
|
@ -477,6 +477,7 @@ ru:
|
||||||
name: Название
|
name: Название
|
||||||
level: Уровень
|
level: Уровень
|
||||||
status: Статус
|
status: Статус
|
||||||
|
version: Версия
|
||||||
build_list: Сборочный лист
|
build_list: Сборочный лист
|
||||||
download:
|
download:
|
||||||
name: Название
|
name: Название
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddVersionToBuildListItems < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :build_list_items, :version, :string
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :build_list_items, :version
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue