tabs显示
This commit is contained in:
parent
131c5ba31b
commit
e4cbc7533e
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<!-- fq -->
|
||||
|
||||
<% if @bid.homework_type == 1%>
|
||||
<%= render :partial => 'homework' %>
|
||||
|
||||
<% else %>
|
||||
<style>
|
||||
input[type="submit"].bid_btn {
|
||||
|
@ -88,3 +90,4 @@
|
|||
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -131,12 +131,12 @@
|
|||
<div id="content">
|
||||
<div class="tabs_new">
|
||||
<ul>
|
||||
<li><%= link_to(l(:label_overview), project_path(@project))%></li>
|
||||
<li><%= link_to(l(:label_homework), {:controller => 'projects', :action => 'homework'})%></li>
|
||||
<li><%= link_to(l(:label_course_file), project_files_path(@project))%></li>
|
||||
<li><%= link_to(l(:label_course_news), {:controller => 'news', :action => 'index', :project_id => @project})%></li>
|
||||
<li><%= link_to l(:label_overview), project_path(@project), :class => link_class(:overview)%></li>
|
||||
<li><%= link_to l(:label_homework), {:controller => 'projects', :action => 'homework'}, :class => link_class('Homework')%></li>
|
||||
<li><%= link_to l(:label_course_file), project_files_path(@project), :class => link_class(:files)%></li>
|
||||
<li><%= link_to l(:label_course_news), {:controller => 'news', :action => 'index', :project_id => @project}, :class => link_class(:news)%></li>
|
||||
<!-- <li><%= link_to(l(:label_course_repository), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => nil, :path => nil, :rev => nil, :course => 1 })%></li> -->
|
||||
<li><%= link_to(l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project}) %></li></ul>
|
||||
<li><%= link_to l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project}, :class => link_class(:settings)%></li></ul>
|
||||
</div>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
|
@ -155,4 +155,4 @@
|
|||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -105,13 +105,12 @@
|
|||
</div>
|
||||
<!-- end -->
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<div id="content">
|
||||
<div class="tabs_new">
|
||||
<ul>
|
||||
<li><%= link_to(l(:label_question_student), { :controller => 'bids', :action => 'show' })%></li>
|
||||
<li><%= link_to(l(:label_homework_commit), { :controller => 'bids', :action => 'show_project' })%></li>
|
||||
<li><%= link_to(l(:label_homework_respond), { :controller => 'bids', :action => 'homework_respond' })%></li>
|
||||
<ul>
|
||||
<li><%= link_to l(:label_question_student), { :controller => 'bids', :action => 'show' },:class => link_class(:respond)%></li>
|
||||
<li><%= link_to l(:label_homework_commit), { :controller => 'bids', :action => 'show_project' },:class => link_class(:project)%></li>
|
||||
<li><%= link_to l(:label_homework_respond), { :controller => 'bids', :action => 'homework_respond' },:class => link_class(:homework_respond)%></li>
|
||||
<ul>
|
||||
</div>
|
||||
<%= yield %>
|
||||
|
|
|
@ -74,6 +74,7 @@ module Redmine
|
|||
def current_menu_item
|
||||
controller.current_menu_item
|
||||
end
|
||||
|
||||
|
||||
# Renders the application main menu
|
||||
def render_main_menu(project)
|
||||
|
|
Loading…
Reference in New Issue