fix the show of domain and project page

This commit is contained in:
xianbo 2014-03-21 20:25:41 +08:00
parent f786d01312
commit 34fd8a933a
8 changed files with 31 additions and 27 deletions

View File

@ -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, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.forge_domain}, :class => user.css_classes
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes
else
name
end

View File

@ -214,7 +214,7 @@ module WelcomeHelper
"show_news" => true,
"show_bids" => true
}
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
activity.events_welcome(nil, nil, {:limit => limit, :types => 'welcome'})
end

View File

@ -15,11 +15,11 @@
<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),{: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>
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_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, host: Setting.forge_domain }, {: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.user_domain }, {:class => 'my-message'} if User.current.logged?%>
</li>
</ul>
</div>

View File

@ -13,7 +13,7 @@
@nav_dispaly_bid_label = 1
elsif (realUrl.match(/forums/))
@nav_dispaly_forum_label = 1
elsif (realUrl.match(/[^projects]\/course[^\.]/))
elsif (realUrl.match(/[^forge]\/course[^\.]/))
@nav_dispaly_course_label = 1
@nav_dispaly_project_label = 1
@nav_dispaly_contest_label = 1
@ -21,6 +21,10 @@
@nav_dispaly_course_all_label = 1
@nav_dispaly_teacher_all_label = 1
@nav_dispaly_forum_label = 1
elsif (realUrl.match(/user\.trustie\.net/))
@nav_dispaly_project_label = 1
@nav_dispaly_user_label = 1
@nav_dispaly_forum_label = 1
elsif (realUrl.match(/forge\.trustie\.net/))
@nav_dispaly_project_label = 1
@nav_dispaly_user_label = 1

View File

@ -95,7 +95,7 @@
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
</div>
<div class="search-bar">
<%= render :partial => "search_bar"%>
<%= render :partial => "search_project", :locals => {:project_type => 1}%>
</div>
<div style="clear: both;"></div>
</div>

View File

@ -140,8 +140,8 @@
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<ul class="user-welcome-message-list">
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
<div class="user-message-box-list">
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
<div class="user-message-box-list" style="margin-top: 10px;">
<% find_all_activities.each do |event| %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
@ -158,9 +158,9 @@
</ul>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<div class="right" style="float: right; min-height: 470px; width: 48%; ">
<ul class="welcome-message-list">
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 6px;">
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);"><strong>贴吧动态</strong></h3>
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
</div>

View File

@ -236,11 +236,11 @@ tags_max_length:
tags_show_search_results:
format: int
default: 5
forge_domain:
default: forge.trustie.net
user_domain:
default: user.trustie.net
project_domain:
default: forge.trustie.net
contest_domain:
default: forge.trustie.net
default: contest.trustie.net
course_domain:
default: forge.trustie.net
default: course.trustie.net

View File

@ -203,7 +203,7 @@ Redmine::AccessControl.map do |map|
end
#by young
Redmine::MenuManager.map :top_menu do |menu|
menu.push :home, {:host => Setting.forge_domain}
menu.push :home, {:host => Setting.user_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,7 +264,7 @@ end
# end
Redmine::MenuManager.map :account_menu do |menu|
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? }
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.project_domain}, :if => Proc.new { !User.current.logged? }
menu.push :register, {:controller => 'account', :action => 'register'}, :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, {:controller => 'account', :action => 'logout'}, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
@ -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', :host => Setting.forge_domain }
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_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', :host => Setting.project_domain}
# menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
end
Redmine::MenuManager.map :user_enterprise_menu do |menu|
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain }
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_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}
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.user_domain}
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
end
Redmine::MenuManager.map :user_menu_self do |menu|
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}
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.project_domain }
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.user_domain}
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.user_domain}
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
end
#end