Added units view and sidebar link
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
class BodyTrackersController < ApplicationController
|
||||
before_action :find_project, only: [:index]
|
||||
before_action :find_project, only: [:index, :units]
|
||||
before_action :authorize
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def units
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# :find_* methods are called before :authorize,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class UnitsController < ApplicationController
|
||||
|
||||
def create
|
||||
end
|
||||
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
<h3><%= t ".heading_body_trackers" %></h3>
|
||||
<ul>
|
||||
<li><%= link_to t(".link_summary"), project_body_trackers_path(@project) %></li>
|
||||
</ul>
|
||||
|
||||
<h3><%= t ".heading_common" %></h3>
|
||||
<ul>
|
||||
<li><%= link_to t(".link_units"), units_project_body_trackers_path(@project) %></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<h2><%= t ".heading" %></h2>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<%= render :partial => 'body_trackers/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
5
app/views/body_trackers/units.html.erb
Normal file
5
app/views/body_trackers/units.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h2><%= t ".heading" %></h2>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'body_trackers/sidebar' %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user