diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 976b0f816..898ed5da2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -24,13 +24,10 @@ class ProjectsController < ApplicationController menu_item l(:label_sort_by_time), :only => :index menu_item l(:label_sort_by_active), :only => :index menu_item l(:label_sort_by_influence), :only => :index - # else - # layout 'base_courses' - # menu_item :overview - # menu_item l(:label_homework), :only => :homework - # menu_item l(:label_course_file), :only => :index - # menu_item l(:label_course_news), :only => :index - # menu_item l(:label_settings), :only => :settings + + menu_item l(:label_homework), :only => :homework + menu_item l(:label_course_file), :only => :index + menu_item l(:label_course_news), :only => :index # end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5204788cf..b8a3fd791 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -31,7 +31,18 @@ module ApplicationHelper extend Forwardable def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter - + + #Added by young + #Define the course menu's link class + def link_class(label) + if current_menu_item == label + @class = 'selected' + else + @class = '' + end + return @class + end + #Ended by young # Return true if user is authorized for controller/action, otherwise false def authorize_for(controller, action) User.current.allowed_to?({:controller => controller, :action => action}, @project) diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb index 3b7af6c97..dc842d9ab 100644 --- a/app/views/bids/show_project.html.erb +++ b/app/views/bids/show_project.html.erb @@ -1,6 +1,8 @@ + <% if @bid.homework_type == 1%> <%= render :partial => 'homework' %> + <% else %>