created items and configured back office ui a bit
This commit is contained in:
5
app/controllers/items_controller.rb
Normal file
5
app/controllers/items_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class ItemsController < ApplicationController
|
||||
active_scaffold :"item" do |conf|
|
||||
conf.columns[:unit].form_ui = :select
|
||||
end
|
||||
end
|
||||
4
app/controllers/media_types_controller.rb
Normal file
4
app/controllers/media_types_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class MediaTypesController < ApplicationController
|
||||
active_scaffold :"media_type" do |conf|
|
||||
end
|
||||
end
|
||||
5
app/controllers/multi_media_descriptions_controller.rb
Normal file
5
app/controllers/multi_media_descriptions_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class MultiMediaDescriptionsController < ApplicationController
|
||||
active_scaffold :"multi_media_description" do |conf|
|
||||
conf.columns[:media_type].form_ui = :select
|
||||
end
|
||||
end
|
||||
4
app/controllers/units_controller.rb
Normal file
4
app/controllers/units_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class UnitsController < ApplicationController
|
||||
active_scaffold :"unit" do |conf|
|
||||
end
|
||||
end
|
||||
4
app/helpers/items_helper.rb
Normal file
4
app/helpers/items_helper.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
module ItemsHelper
|
||||
|
||||
|
||||
end
|
||||
2
app/helpers/media_types_helper.rb
Normal file
2
app/helpers/media_types_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module MediaTypesHelper
|
||||
end
|
||||
2
app/helpers/multi_media_descriptions_helper.rb
Normal file
2
app/helpers/multi_media_descriptions_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module MultiMediaDescriptionsHelper
|
||||
end
|
||||
2
app/helpers/units_helper.rb
Normal file
2
app/helpers/units_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module UnitsHelper
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
class Category < ActiveRecord::Base
|
||||
has_many :sub_categories
|
||||
belongs_to :section
|
||||
end
|
||||
4
app/models/category.rb
Normal file
4
app/models/category.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class Category < ActiveRecord::Base
|
||||
has_many :sub_categories
|
||||
belongs_to :section
|
||||
end
|
||||
4
app/models/item.rb
Normal file
4
app/models/item.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class Item < ActiveRecord::Base
|
||||
belongs_to :unit
|
||||
has_many :multi_media_descriptions
|
||||
end
|
||||
3
app/models/media_type.rb
Normal file
3
app/models/media_type.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class MediaType < ActiveRecord::Base
|
||||
has_many :multi_media_descriptions
|
||||
end
|
||||
5
app/models/multi_media_description.rb
Normal file
5
app/models/multi_media_description.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class MultiMediaDescription < ActiveRecord::Base
|
||||
belongs_to :item
|
||||
belongs_to :media_type
|
||||
|
||||
end
|
||||
@@ -1,3 +1,3 @@
|
||||
class Section < ActiveRecord::Base
|
||||
has_many :categories
|
||||
has_many :categories
|
||||
end
|
||||
|
||||
2
app/models/unit.rb
Normal file
2
app/models/unit.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Unit < ActiveRecord::Base
|
||||
end
|
||||
@@ -1,12 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ribicabackoffice</title>
|
||||
<title>Ribica Back Office</title>
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<%= link_to "Items", items_path %>
|
||||
<%= link_to "Sections", sections_path %>
|
||||
<%= link_to "Units", units_path %>
|
||||
<%= link_to "Media Types", media_types_path %>
|
||||
</div>
|
||||
|
||||
|
||||
<%= yield %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user