removed redundant ribica name from subfolders
This commit is contained in:
0
back-office/app/assets/images/.keep
Normal file
0
back-office/app/assets/images/.keep
Normal file
18
back-office/app/assets/javascripts/application.js
Normal file
18
back-office/app/assets/javascripts/application.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require active_scaffold
|
||||
//= require cloudinary
|
||||
//= require_tree .
|
||||
16
back-office/app/assets/stylesheets/application.css
Normal file
16
back-office/app/assets/stylesheets/application.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
||||
* compiled file so the styles you add here take precedence over styles defined in any styles
|
||||
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
||||
* file per style scope.
|
||||
*
|
||||
*= require_tree .
|
||||
*= require_self
|
||||
*= require active_scaffold
|
||||
*/
|
||||
5
back-office/app/controllers/application_controller.rb
Normal file
5
back-office/app/controllers/application_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
end
|
||||
4
back-office/app/controllers/categories_controller.rb
Normal file
4
back-office/app/controllers/categories_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class CategoriesController < ApplicationController
|
||||
active_scaffold :"category" do |conf|
|
||||
end
|
||||
end
|
||||
0
back-office/app/controllers/concerns/.keep
Normal file
0
back-office/app/controllers/concerns/.keep
Normal file
6
back-office/app/controllers/items_controller.rb
Normal file
6
back-office/app/controllers/items_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class ItemsController < ApplicationController
|
||||
active_scaffold :"item" do |conf|
|
||||
conf.columns[:unit].form_ui = :select
|
||||
conf.columns[:sub_category].form_ui = :select
|
||||
end
|
||||
end
|
||||
4
back-office/app/controllers/media_types_controller.rb
Normal file
4
back-office/app/controllers/media_types_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class MediaTypesController < ApplicationController
|
||||
active_scaffold :"media_type" do |conf|
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class MultiMediaDescriptionsController < ApplicationController
|
||||
active_scaffold :"multi_media_description" do |conf|
|
||||
conf.columns[:media_type].form_ui = :select
|
||||
|
||||
end
|
||||
end
|
||||
4
back-office/app/controllers/sections_controller.rb
Normal file
4
back-office/app/controllers/sections_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class SectionsController < ApplicationController
|
||||
active_scaffold :"section" do |conf|
|
||||
end
|
||||
end
|
||||
5
back-office/app/controllers/sub_categories_controller.rb
Normal file
5
back-office/app/controllers/sub_categories_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class SubCategoriesController < ApplicationController
|
||||
active_scaffold :"sub_category" do |conf|
|
||||
conf.columns = [:name]
|
||||
end
|
||||
end
|
||||
4
back-office/app/controllers/units_controller.rb
Normal file
4
back-office/app/controllers/units_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class UnitsController < ApplicationController
|
||||
active_scaffold :"unit" do |conf|
|
||||
end
|
||||
end
|
||||
2
back-office/app/helpers/application_helper.rb
Normal file
2
back-office/app/helpers/application_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module ApplicationHelper
|
||||
end
|
||||
2
back-office/app/helpers/categories_helper.rb
Normal file
2
back-office/app/helpers/categories_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module CategoriesHelper
|
||||
end
|
||||
5
back-office/app/helpers/items_helper.rb
Normal file
5
back-office/app/helpers/items_helper.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module ItemsHelper
|
||||
|
||||
|
||||
|
||||
end
|
||||
2
back-office/app/helpers/media_types_helper.rb
Normal file
2
back-office/app/helpers/media_types_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module MediaTypesHelper
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
module MultiMediaDescriptionsHelper
|
||||
|
||||
end
|
||||
2
back-office/app/helpers/sections_helper.rb
Normal file
2
back-office/app/helpers/sections_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module SectionsHelper
|
||||
end
|
||||
2
back-office/app/helpers/sub_categories_helper.rb
Normal file
2
back-office/app/helpers/sub_categories_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module SubCategoriesHelper
|
||||
end
|
||||
2
back-office/app/helpers/units_helper.rb
Normal file
2
back-office/app/helpers/units_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module UnitsHelper
|
||||
end
|
||||
0
back-office/app/mailers/.keep
Normal file
0
back-office/app/mailers/.keep
Normal file
0
back-office/app/models/.keep
Normal file
0
back-office/app/models/.keep
Normal file
4
back-office/app/models/category.rb
Normal file
4
back-office/app/models/category.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class Category < ActiveRecord::Base
|
||||
has_many :sub_categories
|
||||
belongs_to :section
|
||||
end
|
||||
0
back-office/app/models/concerns/.keep
Normal file
0
back-office/app/models/concerns/.keep
Normal file
7
back-office/app/models/item.rb
Normal file
7
back-office/app/models/item.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Item < ActiveRecord::Base
|
||||
belongs_to :unit
|
||||
has_many :multi_media_descriptions
|
||||
belongs_to :sub_category
|
||||
|
||||
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code, :sub_category_id
|
||||
end
|
||||
3
back-office/app/models/media_type.rb
Normal file
3
back-office/app/models/media_type.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class MediaType < ActiveRecord::Base
|
||||
has_many :multi_media_descriptions
|
||||
end
|
||||
4
back-office/app/models/multi_media_description.rb
Normal file
4
back-office/app/models/multi_media_description.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class MultiMediaDescription < ActiveRecord::Base
|
||||
belongs_to :item
|
||||
belongs_to :media_type
|
||||
end
|
||||
3
back-office/app/models/section.rb
Normal file
3
back-office/app/models/section.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Section < ActiveRecord::Base
|
||||
has_many :categories
|
||||
end
|
||||
5
back-office/app/models/sub_category.rb
Normal file
5
back-office/app/models/sub_category.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class SubCategory < ActiveRecord::Base
|
||||
belongs_to :category
|
||||
has_many :items
|
||||
|
||||
end
|
||||
2
back-office/app/models/unit.rb
Normal file
2
back-office/app/models/unit.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Unit < ActiveRecord::Base
|
||||
end
|
||||
22
back-office/app/views/layouts/application.html.erb
Normal file
22
back-office/app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ribica Back Office</title>
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
||||
<%= cloudinary_js_config %>
|
||||
<%= 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 %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user