diff --git a/app/assets/images/pictograms/axis-arrow.svg b/app/assets/images/pictograms/axis-arrow.svg new file mode 100644 index 0000000..c569201 --- /dev/null +++ b/app/assets/images/pictograms/axis-arrow.svg @@ -0,0 +1 @@ + diff --git a/app/assets/images/pictograms/weight-gram.svg b/app/assets/images/pictograms/weight-gram.svg new file mode 100644 index 0000000..6f63b13 --- /dev/null +++ b/app/assets/images/pictograms/weight-gram.svg @@ -0,0 +1 @@ + diff --git a/app/assets/images/pictograms/weight-kilogram.svg b/app/assets/images/pictograms/weight-kilogram.svg deleted file mode 100644 index e7ebb64..0000000 --- a/app/assets/images/pictograms/weight-kilogram.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/controllers/quantities_controller.rb b/app/controllers/quantities_controller.rb new file mode 100644 index 0000000..15bbf93 --- /dev/null +++ b/app/controllers/quantities_controller.rb @@ -0,0 +1,2 @@ +class QuantitiesController < ApplicationController +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e67c212..c5a0bd5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -125,8 +125,9 @@ module ApplicationHelper def navigation_menu menu_tabs = [ - ['units', "weight-kilogram", :restricted, 'right'], - ['users', "account-multiple-outline", :admin], + ['quantities', 'axis-arrow', :restricted, 'right'], + ['units', 'weight-gram', :restricted], + ['users', 'account-multiple-outline', :admin], ] menu_tabs.map do |name, image, status, css_class| diff --git a/app/helpers/quantities_helper.rb b/app/helpers/quantities_helper.rb new file mode 100644 index 0000000..9e6aa8b --- /dev/null +++ b/app/helpers/quantities_helper.rb @@ -0,0 +1,2 @@ +module QuantitiesHelper +end diff --git a/app/helpers/units_helper.rb b/app/helpers/units_helper.rb new file mode 100644 index 0000000..d8b2f3f --- /dev/null +++ b/app/helpers/units_helper.rb @@ -0,0 +1,2 @@ +module UnitsHelper +end diff --git a/config/locales/en.yml b/config/locales/en.yml index 84b8cbb..c2af10e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -53,6 +53,8 @@ en: revert: Revert sign_out: Sign out source_code: Get code + quantities: + navigation: Quantities units: navigation: Units no_items: There are no configured units. You can Add some or Import from defaults. diff --git a/config/routes.rb b/config/routes.rb index c4ec47f..1d13054 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,5 @@ Rails.application.routes.draw do - devise_for :users, path: '', path_names: {registration: 'profile'}, - controllers: {registrations: :registrations} + resources :quantities resources :units, except: [:show], path_names: {new: '(/:id)/new'} do member { post :rebase } @@ -13,6 +12,8 @@ Rails.application.routes.draw do end end + devise_for :users, path: '', path_names: {registration: 'profile'}, + controllers: {registrations: :registrations} resources :users, only: [:index, :show, :update] do member { get :disguise } collection { get :revert } diff --git a/test/controllers/quantities_controller_test.rb b/test/controllers/quantities_controller_test.rb new file mode 100644 index 0000000..5772874 --- /dev/null +++ b/test/controllers/quantities_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class QuantitiesControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/controllers/units_controller_test.rb b/test/controllers/units_controller_test.rb new file mode 100644 index 0000000..c029378 --- /dev/null +++ b/test/controllers/units_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UnitsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end