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