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)
|
if user.is_a?(User)
|
||||||
name = h(user.name(options[:format]))
|
name = h(user.name(options[:format]))
|
||||||
if user.active? || (User.current.admin? && user.logged?)
|
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
|
else
|
||||||
name
|
name
|
||||||
end
|
end
|
||||||
|
@ -1500,16 +1500,16 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_dynamic_nav
|
def render_dynamic_nav
|
||||||
home_link = link_to l(:field_homepage), home_path
|
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_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'}
|
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}
|
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}
|
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'}
|
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'}
|
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
|
||||||
forum_link = link_to l(:label_project_module_forums), forums_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), stores_path
|
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index', :host => Setting.forge_domain}
|
||||||
|
|
||||||
#@nav_dispaly_project_label
|
#@nav_dispaly_project_label
|
||||||
nav_list = Array.new
|
nav_list = Array.new
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
<%=link_to_user(User.current)%>
|
<%=link_to_user(User.current)%>
|
||||||
<ul class="sub_menu">
|
<ul class="sub_menu">
|
||||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
<% 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 -%>
|
<% end -%>
|
||||||
<li><%=link_to l(:label_my_projects), user_projects_user_path(User.current) %></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), my_account_path %></li>
|
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.forge_domain}%></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
<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">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
|
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||||
<p class="layout">
|
<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),
|
<%= content_tag "span", show_grade(project),
|
||||||
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
||||||
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
<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>
|
<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">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||||
<p class="layout">
|
<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>
|
<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>
|
||||||
<p class="layout-1" >
|
<p class="layout-1" >
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
<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>
|
<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">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
||||||
|
|
|
@ -236,3 +236,11 @@ tags_max_length:
|
||||||
tags_show_search_results:
|
tags_show_search_results:
|
||||||
format: int
|
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
|
end
|
||||||
#by young
|
#by young
|
||||||
Redmine::MenuManager.map :top_menu do |menu|
|
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 :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 :project_deposit, { :controller => 'projects', :action => 'index', :project_type => 0}, :caption => :label_project_deposit
|
||||||
menu.push :software_user, {:controller => 'users', :action => 'index'}
|
menu.push :software_user, {:controller => 'users', :action => 'index'}
|
||||||
|
@ -264,15 +264,15 @@ end
|
||||||
# end
|
# end
|
||||||
|
|
||||||
Redmine::MenuManager.map :account_menu do |menu|
|
Redmine::MenuManager.map :account_menu do |menu|
|
||||||
menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
|
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? }
|
||||||
menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
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 :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
|
end
|
||||||
########fq
|
########fq
|
||||||
Redmine::MenuManager.map :bid_menu do |menu|
|
Redmine::MenuManager.map :bid_menu do |menu|
|
||||||
menu.push :respond, { :controller => 'bids', :action => 'show' }, :caption => :label_user_response
|
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' },
|
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||||
end
|
end
|
||||||
|
@ -341,29 +341,29 @@ Redmine::MenuManager.map :course_menu do |menu|
|
||||||
|
|
||||||
end
|
end
|
||||||
Redmine::MenuManager.map :user_menu do |menu|
|
Redmine::MenuManager.map :user_menu do |menu|
|
||||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses'}
|
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_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 :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
|
end
|
||||||
Redmine::MenuManager.map :user_enterprise_menu do |menu|
|
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 :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||||
|
|
||||||
end
|
end
|
||||||
Redmine::MenuManager.map :user_menu_self do |menu|
|
Redmine::MenuManager.map :user_menu_self do |menu|
|
||||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||||
menu.push :user_information, {:controller => 'users', :action => 'info'}
|
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.forge_domain}
|
||||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.forge_domain}
|
||||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||||
|
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
|
|
Loading…
Reference in New Issue