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_time), :only => :index
|
||||||
menu_item l(:label_sort_by_active), :only => :index
|
menu_item l(:label_sort_by_active), :only => :index
|
||||||
menu_item l(:label_sort_by_influence), :only => :index
|
menu_item l(:label_sort_by_influence), :only => :index
|
||||||
# else
|
|
||||||
# layout 'base_courses'
|
menu_item l(:label_homework), :only => :homework
|
||||||
# menu_item :overview
|
menu_item l(:label_course_file), :only => :index
|
||||||
# menu_item l(:label_homework), :only => :homework
|
menu_item l(:label_course_news), :only => :index
|
||||||
# menu_item l(:label_course_file), :only => :index
|
|
||||||
# menu_item l(:label_course_news), :only => :index
|
|
||||||
# menu_item l(:label_settings), :only => :settings
|
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,17 @@ module ApplicationHelper
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
|
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
|
# Return true if user is authorized for controller/action, otherwise false
|
||||||
def authorize_for(controller, action)
|
def authorize_for(controller, action)
|
||||||
User.current.allowed_to?({:controller => controller, :action => action}, @project)
|
User.current.allowed_to?({:controller => controller, :action => action}, @project)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<!-- fq -->
|
<!-- fq -->
|
||||||
|
|
||||||
<% if @bid.homework_type == 1%>
|
<% if @bid.homework_type == 1%>
|
||||||
<%= render :partial => 'homework' %>
|
<%= render :partial => 'homework' %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<style>
|
<style>
|
||||||
input[type="submit"].bid_btn {
|
input[type="submit"].bid_btn {
|
||||||
|
@ -88,3 +90,4 @@
|
||||||
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %>
|
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -131,12 +131,12 @@
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div class="tabs_new">
|
<div class="tabs_new">
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= link_to(l(:label_overview), project_path(@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'})%></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))%></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})%></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_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>
|
</div>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<%= call_hook :view_layouts_base_content %>
|
||||||
|
|
|
@ -106,12 +106,11 @@
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<div class="tabs_new">
|
<div class="tabs_new">
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= link_to(l(:label_question_student), { :controller => 'bids', :action => 'show' })%></li>
|
<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' })%></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' })%></li>
|
<li><%= link_to l(:label_homework_respond), { :controller => 'bids', :action => 'homework_respond' },:class => link_class(:homework_respond)%></li>
|
||||||
<ul>
|
<ul>
|
||||||
</div>
|
</div>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
|
@ -75,6 +75,7 @@ module Redmine
|
||||||
controller.current_menu_item
|
controller.current_menu_item
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Renders the application main menu
|
# Renders the application main menu
|
||||||
def render_main_menu(project)
|
def render_main_menu(project)
|
||||||
render_menu((project && !project.new_record?) ? :project_menu : :application_menu, project)
|
render_menu((project && !project.new_record?) ? :project_menu : :application_menu, project)
|
||||||
|
|
Loading…
Reference in New Issue