1.增加课程问卷、项目讨论、项目新闻对应界面的标题

2.将下拉菜单放在一个局部页面中,以便User_messages页面和User_system_messages都调用它,避免代码重复。
This commit is contained in:
ouyangxuhua 2015-10-10 16:03:31 +08:00
parent 3d993304e3
commit 491e4d12c6
4 changed files with 42 additions and 66 deletions

View File

@ -68,8 +68,14 @@ module UsersHelper
'课程讨论'
when 'course_news'
'课程通知'
when 'poll'
'课程问卷'
when 'issue'
'项目任务'
when 'forge_message'
'项目讨论'
when 'forge_news'
'项目新闻'
when 'forum'
'贴吧帖子'
when 'user_feedback'

View File

@ -0,0 +1,34 @@
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType" style="width:125px; left:-125px;">
<li>
<ul class="homepagePostTypeHomework fl" style="width:70px;">
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl" style="width:55px;">
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
<%# 系统贴吧 %>
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>

View File

@ -1,37 +1,4 @@
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType" style="width:125px; left:-125px;">
<li>
<ul class="homepagePostTypeHomework fl" style="width:70px;">
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl" style="width:55px;">
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
<%# 系统贴吧 %>
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<%= render :partial => 'users/selector_for_messages'%>
<div class="resources mt10" id="users_setting">
<div>
<% if (!@message_alls.nil? && @message_alls.count >0) %>

View File

@ -1,35 +1,4 @@
<div class="homepageRightBanner">
<div class="NewsBannerName">系统消息</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="newsType">
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
<%# 课程相关消息 %>
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
<!--<li><%#= link_to "通知回复", user_message_path(User.current, :type => 'course_news_reply'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>-->
<!--<li><%#= link_to "作品评阅", user_message_path(User.current, :type => 'works_reviewers'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "作品讨论", user_message_path(User.current, :type => 'works_reply'), :class => "resourcesGrey" %></li>-->
<%# 项目相关消息 %>
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
<!--<li><%#= link_to "问题更新", user_message_path(User.current, :type => 'issue_update'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
<%# 项目相关消息 %>
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
<%# 系统贴吧 %>
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
<%# 系统消息 %>
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
</ul>
</li>
</ul>
</div>
<%= render :partial => 'users/selector_for_messages'%>
<% @sytem_messages.each do |system_message| %>
<div class="resources mt10">