Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
66ea9a00b4
|
@ -65,7 +65,7 @@ module ApplicationHelper
|
|||
if user.is_a?(User)
|
||||
name = h(user.name(options[:format]))
|
||||
if user.active? || (User.current.admin? && user.logged?)
|
||||
link_to name, user_path(user), :class => user.css_classes
|
||||
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.forge_domain}, :class => user.css_classes
|
||||
else
|
||||
name
|
||||
end
|
||||
|
@ -1500,16 +1500,16 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_dynamic_nav
|
||||
home_link = link_to l(:field_homepage), home_path
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
home_link = link_to l(:field_homepage), "http://"+Setting.forge_domain+":3000"
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1,}
|
||||
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher'}
|
||||
courses_link = link_to l(:label_course_practice), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0}
|
||||
courses_link = link_to l(:label_course_practice), {:host=>Setting.course_domain}
|
||||
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}
|
||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index'}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1, :host=>Setting.contest_domain}
|
||||
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
|
||||
forum_link = link_to l(:label_project_module_forums), forums_path
|
||||
stores_link = link_to l(:label_stores_index), stores_path
|
||||
forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index", :host => Setting.forge_domain}
|
||||
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index', :host => Setting.forge_domain}
|
||||
|
||||
#@nav_dispaly_project_label
|
||||
nav_list = Array.new
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
<%=link_to_user(User.current)%>
|
||||
<ul class="sub_menu">
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<li><%=link_to l(:label_my_course), user_courses_user_path(User.current) %></li>
|
||||
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li>
|
||||
<% end -%>
|
||||
<li><%=link_to l(:label_my_projects), user_projects_user_path(User.current) %></li>
|
||||
<li><%=link_to l(:label_user_edit), my_account_path %></li>
|
||||
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li>
|
||||
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.forge_domain}%></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id }, {:class => 'my-message'} if User.current.logged?%>
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.forge_domain }, {:class => 'my-message'} if User.current.logged?%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0}, :target => "_blank" %></span>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
|
||||
|
@ -167,7 +167,7 @@
|
|||
</div>
|
||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||
<p class="layout">
|
||||
<span style="display: inline-block; width: 250px;"><%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}", :target => "_blank" )%></span>
|
||||
<span style="display: inline-block; width: 250px;"><%= link_to( project.name, :controller => 'projects', :action => 'show', :host=> Setting.project_domain, :id => project.id, :class => "d-g-blue d-p-project-name", :title => "#{project.name}", :target => "_blank" )%></span>
|
||||
<%= content_tag "span", show_grade(project),
|
||||
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
||||
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
||||
|
@ -186,7 +186,7 @@
|
|||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门课程</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :project_sort_type => 1}, :target => "_blank" %></span>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :project_sort_type => 1, :host => Setting.course_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
||||
|
@ -200,7 +200,7 @@
|
|||
</div>
|
||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||
<p class="layout">
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}", :target => "_blank" )%>
|
||||
<%= link_to( project.name, :controller => 'projects', :action => 'show', :id => project.id, :host => Setting.course_domain, :class => "d-g-blue d-p-project-name",:title => "#{project.name}", :target => "_blank" )%>
|
||||
<span style="cursor: pointer; display: inline-block; float: right; color: #ec6300; white-space: nowrap;">学生人数:<%= link_to "#{studentCount(project)}", project_member_path(project, :role => 2) ,:course =>'1', :target => "_blank" %></span>
|
||||
</p>
|
||||
<p class="layout-1" >
|
||||
|
@ -216,7 +216,7 @@
|
|||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>热门竞赛</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1}, :target => "_blank" %></span>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
||||
|
|
|
@ -235,4 +235,12 @@ tags_max_length:
|
|||
default: 13
|
||||
tags_show_search_results:
|
||||
format: int
|
||||
default: 5
|
||||
default: 5
|
||||
forge_domain:
|
||||
default: forge.trustie.net
|
||||
project_domain:
|
||||
default: project.trustie.net
|
||||
contest_domain:
|
||||
default: contest.trustie.net
|
||||
course_domain:
|
||||
default: course.trustie.net
|
|
@ -203,7 +203,7 @@ Redmine::AccessControl.map do |map|
|
|||
end
|
||||
#by young
|
||||
Redmine::MenuManager.map :top_menu do |menu|
|
||||
menu.push :home, :home_path
|
||||
menu.push :home, {:hsot => Setting.forge_domain}
|
||||
menu.push :course_practice, {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
menu.push :project_deposit, { :controller => 'projects', :action => 'index', :project_type => 0}, :caption => :label_project_deposit
|
||||
menu.push :software_user, {:controller => 'users', :action => 'index'}
|
||||
|
@ -264,15 +264,15 @@ end
|
|||
# end
|
||||
|
||||
Redmine::MenuManager.map :account_menu do |menu|
|
||||
menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
||||
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :register, {:controller => 'account', :action => 'register', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
||||
# menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
|
||||
menu.push :logout, :signout_path, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
||||
menu.push :logout, {:controller => 'account', :action => 'logout', :host => Setting.forge_domain}, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
||||
end
|
||||
########fq
|
||||
Redmine::MenuManager.map :bid_menu do |menu|
|
||||
menu.push :respond, { :controller => 'bids', :action => 'show' }, :caption => :label_user_response
|
||||
menu.push :project, { :controller => 'bids', :action => 'show_project' }, :caption => :label_bidding_project
|
||||
menu.push :project, { :controller => 'bids', :action => 'show_project', :host => Setting.project_domain }, :caption => :label_bidding_project
|
||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||
end
|
||||
|
@ -341,29 +341,29 @@ Redmine::MenuManager.map :course_menu do |menu|
|
|||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses'}
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain}
|
||||
#menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
# menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_enterprise_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu_self do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.forge_domain}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.forge_domain}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
#end
|
||||
|
|
Loading…
Reference in New Issue