隐藏非项目信息
This commit is contained in:
parent
6d0f22fd60
commit
936198a8bd
|
@ -37,6 +37,13 @@ module ApplicationHelper
|
|||
# super
|
||||
# end
|
||||
|
||||
# 隐藏项目以外的信息
|
||||
# return: true 显示,false 不显示
|
||||
def hidden_unproject_infos
|
||||
hidden_info = Setting.find_by_name("hidden_non_project")
|
||||
(hidden_info && hidden_info.value == "1") ? true : false
|
||||
end
|
||||
|
||||
# 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换
|
||||
def get_user_by_mail mail
|
||||
user = User.find_by_mail(mail)
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<li class="fl"><a href="<%= about_us_path %>" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||
<li class="fl"><%= link_to l(:label_surpport_group), "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li class="fl"><%= link_to l(:label_surpport_group), "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|</li>
|
||||
<% end %>
|
||||
<li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
<li class="navHomepageMenu fl">
|
||||
<%= link_to "资源库", user_resource_user_path(User.current, :type => 6), :class => "c_white f16 db p10" %>
|
||||
</li>
|
||||
<li class="navHomepageMenu fl">
|
||||
<% if hidden_unproject_infos %>
|
||||
<li class="navHomepageMenu fl">
|
||||
<%= link_to "题库", user_homeworks_user_path(User.current), :class => "c_white f16 db p10"%>
|
||||
</li>
|
||||
<li class="navHomepageMenu fl mr30">
|
||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||
</li>
|
||||
</li>
|
||||
<li class="navHomepageMenu fl mr30">
|
||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
@ -251,9 +251,10 @@
|
|||
});
|
||||
</script>
|
||||
</div>
|
||||
<% if hidden_unproject_infos %>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% end %>
|
||||
|
||||
<div id="fade" class="black_overlay">123</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
|
|
|
@ -298,6 +298,7 @@
|
|||
<div class="cl"></div>
|
||||
</div><!--Container end-->
|
||||
|
||||
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% end %>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
|
|
|
@ -157,9 +157,7 @@
|
|||
</div>
|
||||
|
||||
<div class="user_leftnav ">
|
||||
<% hidden_courses = Setting.find_by_name("hidden_courses") %>
|
||||
<% unvisiable = hidden_courses && hidden_courses.value == "1"%>
|
||||
<% if !unvisiable %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_01" class="user_icons_course">
|
||||
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
|
||||
|
@ -220,7 +218,9 @@
|
|||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType">
|
||||
<% if hidden_unproject_infos %>
|
||||
<li>
|
||||
<ul class="homepagePostTypeHomework fl">
|
||||
<li class="f14"><strong>课程消息</strong></li>
|
||||
|
@ -12,7 +13,7 @@
|
|||
<li><%= link_to "班级问卷", user_message_path(User.current, :type => 'poll'), :class => "homepagePostTypeQuiz postTypeGrey" %></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
<li>
|
||||
<ul class="homepagePostTypeProject fl">
|
||||
<li class="f14"><strong>项目消息</strong></li>
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
<li>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 1, :search => @switch_search) %>" id="resource_type_all" class="resourcesTypeAll resourcesGrey" data-method="get" data-remote="true">全部 </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 2, :search => @switch_search) %>" id="resource_type_course" class="homepagePostTypeAssignment postTypeGrey'" data-method="get" data-remote="true">班级资源 </a>
|
||||
<%#= link_to '课程资源' ,user_resource_user_path(:id => @user.id, :type => 2), id="resource_type_course", :remote => true, :method => 'get', :class=> 'homepagePostTypeAssignment postTypeGrey' %>
|
||||
</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 2, :search => @switch_search) %>" id="resource_type_course" class="homepagePostTypeAssignment postTypeGrey'" data-method="get" data-remote="true">班级资源 </a>
|
||||
<%#= link_to '课程资源' ,user_resource_user_path(:id => @user.id, :type => 2), id="resource_type_course", :remote => true, :method => 'get', :class=> 'homepagePostTypeAssignment postTypeGrey' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 3, :search => @switch_search) %>" id="resource_type_project" class="homepagePostTypeQuiz postTypeGrey" data-method="get" data-remote="true">项目资源 </a>
|
||||
<%#= link_to '项目资源' ,user_resource_user_path(:id => @user.id, :type => 3), id="resource_type_project", :remote => true, :method => 'get', :class => 'homepagePostTypeQuiz postTypeGrey' %>
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
<ul class="homepagePostType">
|
||||
<li>
|
||||
<ul class="homepagePostTypeHomework fl">
|
||||
<% hidden_courses = Setting.find_by_name("hidden_courses") %>
|
||||
<% unvisiable = hidden_courses && hidden_courses.value == "1"%>
|
||||
<% if !unvisiable %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li class="f14">课程动态</li>
|
||||
<li><%= link_to "作业动态", {:controller => "users", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
|
||||
|
||||
<%# 课程消息 %>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--项目消息-->
|
||||
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
|
||||
|
|
Loading…
Reference in New Issue