Added measurements to sidebar
This commit is contained in:
parent
793edbe7ae
commit
f2fa3db7f7
@ -3,6 +3,11 @@
|
||||
<li><%= link_to t(".link_summary"), project_body_trackers_path(@project) %></li>
|
||||
</ul>
|
||||
|
||||
<h3><%= t ".heading_measurements" %></h3>
|
||||
<ul>
|
||||
<li><%= link_to t(".link_measurements"), project_measurements_path(@project) %></li>
|
||||
</ul>
|
||||
|
||||
<h3><%= t ".heading_diet" %></h3>
|
||||
<ul>
|
||||
<li>
|
||||
@ -22,3 +27,4 @@
|
||||
<li><p><%= link_to t(".link_defaults"), defaults_project_body_trackers_path(@project),
|
||||
method: :post, data: {confirm: t(".confirm_defaults")} %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
@ -37,9 +37,11 @@ en:
|
||||
heading: 'Summary'
|
||||
sidebar:
|
||||
heading_body_trackers: 'Body trackers'
|
||||
heading_measurements: 'Measurements'
|
||||
heading_diet: 'Diet'
|
||||
heading_common: 'Common'
|
||||
link_summary: 'Summary'
|
||||
link_measurements: 'Measurements'
|
||||
link_ingredients: 'Ingredients'
|
||||
link_nutrients: 'Nutrients'
|
||||
link_sources: 'Data sources'
|
||||
@ -47,6 +49,9 @@ en:
|
||||
link_units: 'Units'
|
||||
link_defaults: 'Load defaults'
|
||||
confirm_defaults: 'This will load default quantities and units. Continue?'
|
||||
measurements:
|
||||
form:
|
||||
index:
|
||||
ingredients:
|
||||
contextual:
|
||||
heading_import_ingredients: 'Import'
|
||||
|
@ -6,6 +6,8 @@ resources :projects do
|
||||
resources :body_trackers, :only => [:index] do
|
||||
post 'defaults', on: :collection
|
||||
end
|
||||
resources :measurements, :only => [:index, :create, :destroy] do
|
||||
end
|
||||
resources :ingredients, :only => [:index, :create, :destroy] do
|
||||
get 'nutrients', on: :collection
|
||||
post 'toggle_nutrient_column', on: :collection
|
||||
|
2
init.rb
2
init.rb
@ -16,6 +16,7 @@ Redmine::Plugin.register :body_tracking do
|
||||
project_module :body_tracking do
|
||||
permission :view_body_trackers, {
|
||||
:body_trackers => [:index],
|
||||
:measurements => [:index],
|
||||
:ingredients => [:index, :nutrients, :filter, :filter_nutrients],
|
||||
:sources => [:index],
|
||||
:quantities => [:index],
|
||||
@ -23,6 +24,7 @@ Redmine::Plugin.register :body_tracking do
|
||||
}, read: true
|
||||
permission :manage_common, {
|
||||
:body_trackers => [:defaults],
|
||||
:measurements => [:create, :destroy],
|
||||
:ingredients => [:create, :destroy, :toggle, :import, :toggle_nutrient_column],
|
||||
:sources => [:create, :destroy],
|
||||
:quantities => [:create, :destroy, :toggle, :up, :down, :left, :right],
|
||||
|
Reference in New Issue
Block a user