socialforge/app/views/users/user_messages.html.erb

85 lines
2.8 KiB
Plaintext
Raw Normal View History

<%= render :partial => 'users/selector_for_messages'%>
2015-08-28 17:05:27 +08:00
<div class="resources mt10" id="users_setting">
2015-09-28 16:14:53 +08:00
<div>
2015-10-10 11:49:25 +08:00
<% if (!@message_alls.nil? && @message_alls.count >0) %>
2015-09-28 16:14:53 +08:00
<% if params[:type].nil? || params[:type] == "unviewed" %>
<div class="newsReadSetting">
有&nbsp;<span class="c_red"><%= unviewed_message(@user) %></span>&nbsp;条未读
<% unless (unviewed_message(@user) == 0 || User.current != @user) %>
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
<% end %>
</div>
2015-09-17 14:41:03 +08:00
<% end %>
2015-09-28 16:14:53 +08:00
<!--总消息列表-->
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
<%# 系统消息 %>
<%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
2015-12-16 16:37:00 +08:00
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
2015-09-28 16:14:53 +08:00
<%# 课程消息 %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
2015-09-19 10:54:50 +08:00
2015-09-28 16:14:53 +08:00
<!--项目消息-->
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
2015-09-28 16:14:53 +08:00
<!--公共贴吧-->
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
2015-08-24 14:29:38 +08:00
2015-09-28 16:14:53 +08:00
<!--用户留言-->
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
2015-09-01 17:37:43 +08:00
2015-08-21 09:41:59 +08:00
<% end %>
2015-09-28 16:14:53 +08:00
<ul class="wlist" style=" border:none; padding-top: 15px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
2015-08-21 09:41:59 +08:00
<% end %>
2015-09-28 16:14:53 +08:00
<!--项目消息-->
<% else %>
<div class="flash notice">您目前还没有相关消息!</div>
2015-08-21 09:41:59 +08:00
<% end %>
2015-09-28 16:14:53 +08:00
<div class="cl"></div>
</div>
2015-08-28 17:05:27 +08:00
</div>
2015-08-21 17:40:28 +08:00
2015-09-02 16:21:47 +08:00
<script>
2015-09-17 14:41:03 +08:00
function message_titile_show(obj,e)
{
obj.parent().next("div").show();
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
}
function message_titile_hide(obj)
{
obj.parent().next("div").hide();
}
2015-09-16 11:28:35 +08:00
2015-09-17 14:41:03 +08:00
function show_more_system_messages(list,content, id2, id3) {
$(list).toggleClass("show_more_li");
$(content).toggleClass("show_more_system_message");
var information = $(id2);
var val = information.attr("value");
if (val == "show_more") {
$(id2).text("[收起]");
information.attr("value", "hide_more");
information.attr("style", "color:#3ca5c6");
}
else {
$(id2).text("[展开]");
information.attr("value", "show_more");
information.attr("style", "color:#0781b4;");
}
}
2015-09-02 16:21:47 +08:00
</script>
2015-08-24 14:29:38 +08:00
2015-09-01 17:37:43 +08:00
2015-08-24 14:29:38 +08:00