diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 3d3752dc4..48d0d8472 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -1,254 +1,267 @@ -
+
+
+
消息
+
- -
-<% if @new_message_count >0 %> - <%# 课程消息 %> - <% unless @user_course_messages.nil? %> - <% @user_course_messages.each do |ucm| %> - <% if ucm.course_message_type == "News" %> -
    -
  • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
  • -
  • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
  • -
  • ">发布通知
  • -
  • - <%= link_to ucm.course_message.title, {:controller => 'news', :action => 'show', :id => ucm.course_message.id }, - :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{ucm.course_message.title}" %>
  • -
  • <%= time_tag(ucm.course_message.created_on).html_safe %>
  • -
- <% end %> - <% if ucm.course_message_type == "Comment" %> -
    -
  • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
  • -
  • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
  • -
  • ">回复了通知
  • -
  • - <%= link_to ucm.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ucm.course_message.commented.id }, - :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{ucm.course_message.comments.html_safe}" %>
  • -
  • <%= time_tag(ucm.course_message.created_on).html_safe %>
  • -
- <% end %> - <% if ucm.course_message_type == "HomeworkCommon" %> - - <% end %> - <% if ucm.course_message_type == "Poll" %> - - <% end %> - <% if ucm.course_message_type == "Message" %> -
+
+ 有 8 封未读全部设为已读 +
+
+ <% if @new_message_count >0 %> + <%# 课程消息 %> + <% unless @user_course_messages.nil? %> + <% @user_course_messages.each do |ucm| %> + <% if ucm.course_message_type == "News" %> +
    +
  • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
  • +
  • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
  • +
  • ">发布通知
  • +
  • + <%= link_to ucm.course_message.title, {:controller => 'news', :action => 'show', :id => ucm.course_message.id }, + :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", + :title => "#{ucm.course_message.title}" %>
  • +
  • <%= time_tag(ucm.course_message.created_on).html_safe %>
  • +
+ <% end %> + <% if ucm.course_message_type == "Comment" %> +
    +
  • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
  • +
  • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
  • +
  • ">回复了通知
  • +
  • + <%= link_to ucm.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ucm.course_message.commented.id }, + :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", + :title => "#{ucm.course_message.comments.html_safe}" %>
  • <%= time_tag(ucm.course_message.created_on).html_safe %>
  • - <% else %> -
  • ">回复帖子
  • +
+ <% end %> + <% if ucm.course_message_type == "HomeworkCommon" %> + + <% end %> + <% if ucm.course_message_type == "Poll" %> + + <% end %> + <% if ucm.course_message_type == "Message" %> + + <% end %> + <% if ucm.course_message_type == "StudentWorksScore" %> + + <% end %> + <% if ucm.course_message_type == "JournalsForMessage" %> + - <% end %> - <% if ucm.course_message_type == "StudentWorksScore" %> - - <% end %> - <% if ucm.course_message_type == "JournalsForMessage" %> - + + <% end %> + <% end %> -
<% end %> - <% end %> - - <% unless @user_forge_messages.nil? %> - <% @user_forge_messages.each do |ufm| %> - <% if ufm.forge_message_type == "Issue" %> - - <% end %> - <% if ufm.forge_message_type == "Journal" %> - - <% end %> - <% if ufm.forge_message_type == "Message" %> - - <% end %> - <% if ufm.forge_message_type == "News" %> - - <% end %> - <% if ufm.forge_message_type == "Comment" %> -
    -
  • <%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %>
  • -
  • <%=link_to ufm.forge_message.author, user_path(ufm.forge_message.author), :class => "newsBlue" %>
  • -
  • 回复了新闻
  • -
  • - <%= link_to "#{ufm.forge_message.comments.html_safe}", - {:controller => 'news', :action => 'show', :id => ufm.forge_message.commented.id },:class =>"#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ufm.forge_message.comments.html_safe}"%>
  • -
  • <%= time_tag(ufm.forge_message.created_on).html_safe %>
  • -
+ + <% unless @user_forge_messages.nil? %> + <% @user_forge_messages.each do |ufm| %> + <% if ufm.forge_message_type == "Issue" %> + + <% end %> + <% if ufm.forge_message_type == "Journal" %> + + <% end %> + <% if ufm.forge_message_type == "Message" %> + + <% end %> + <% if ufm.forge_message_type == "News" %> + + <% end %> + <% if ufm.forge_message_type == "Comment" %> +
    +
  • <%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %>
  • +
  • <%=link_to ufm.forge_message.author, user_path(ufm.forge_message.author), :class => "newsBlue" %>
  • +
  • 回复了新闻
  • +
  • + <%= link_to "#{ufm.forge_message.comments.html_safe}", + {:controller => 'news', :action => 'show', :id => ufm.forge_message.commented.id },:class =>"#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ufm.forge_message.comments.html_safe}"%>
  • +
  • <%= time_tag(ufm.forge_message.created_on).html_safe %>
  • +
+ <% end %> <% end %> <% end %> - <% end %> - <%# 公共贴吧 %> - <% unless @user_memo_messages.nil? %> - <% @user_memo_messages.each do |urm| %> - <% if urm.memo_type == "Memo" %> - + <%# 公共贴吧 %> + <% unless @user_memo_messages.nil? %> + <% @user_memo_messages.each do |urm| %> + <% if urm.memo_type == "Memo" %> + + <% end %> <% end %> <% end %> - <% end %> - <%# 用户留言消息 %> - <% unless @user_feedback_messages.nil? %> - <% @user_feedback_messages.each do |ufm| %> - <% if ufm.journals_for_message_type == "JournalsForMessage" %> - + <% end %> <% end %> <% end %> + <% else %> +
暂无消息!
<% end %> -<% else %> -
暂无消息!
-<% end %> -
+
+
+
- + + + + + + + + + + + diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index 17b17f59f..651c760d5 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -679,4 +679,18 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} .uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} .showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;} .mr15{ margin-right:15px;} -.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} \ No newline at end of file +.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} + +/*消息*/ +.newsReadSetting{ + width: 700px; + background-color: #F6F6F6; + border-bottom: 1px solid #EEE; + margin: 10px auto; + height: 39px; + line-height: 39px; + vertical-align: middle; + font-size: 14px; + color: #7A7A7A; + padding-left: 10px; +} \ No newline at end of file