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.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
|
||||
|
|
|
@ -95,11 +95,13 @@
|
|||
%table.table
|
||||
%tr
|
||||
%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")
|
||||
|
||||
- group.each do |item|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td= item.name
|
||||
%td= item.version
|
||||
%td.last= item.human_status
|
||||
|
||||
- content_for :sidebar, render(:partial => 'sidebar')
|
|
@ -477,6 +477,7 @@ ru:
|
|||
name: Название
|
||||
level: Уровень
|
||||
status: Статус
|
||||
version: Версия
|
||||
build_list: Сборочный лист
|
||||
download:
|
||||
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