Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
huang 2015-08-19 11:22:06 +08:00
commit e9c7125822
2 changed files with 54 additions and 2 deletions

View File

@ -76,6 +76,26 @@
<% end %> <% end %>
</ul> </ul>
<% end %> <% end %>
<% if ucm.course_message_type == "StudentWorksScore" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ucm.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><a href="javascript:void(0);" class="<%=ucm.viewed == 0?"newsBlack":"newsBlue"%>"><%= ucm.course_message.user %></a></li>
<li class="<%= ucm.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">作品评阅</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ucm.course_message.comment, nil,:class=>"#{ucm.viewed==0?"newsBlack":"newsGrey"}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ucm.course_message.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ucm.course_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ucm.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><a href="javascript:void(0);" class="<%=ucm.viewed == 0?"newsBlack":"newsBlue"%>"><%= ucm.course_message.user %></a></li>
<li class="<%= ucm.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">作品讨论</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ucm.course_message.notes, nil,:class=>"#{ucm.viewed==0?"newsBlack":"newsGrey"}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ucm.course_message.created_on).html_safe %> </li>
</ul>
<% end %>
<div class="cl"></div> <div class="cl"></div>
<% end %> <% end %>
<% end %> <% end %>
@ -113,6 +133,38 @@
<li class="homepageNewsTime fl"><%= time_tag(ufm.forge_message.created_on).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ufm.forge_message.created_on).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% if ufm.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><a href="javascript:void(0);" class="<%=ufm.viewed == 0?"newsBlack":"newsBlue"%>"><%= ufm.forge_message.author %></a></li>
<% if ufm.forge_message.parent_id.nil? %>
<li class="<%= ufm.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布帖子</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=link_to ufm.forge_message.subject, project_boards_path(ufm.forge_message.project,:parent_id => ufm.forge_message.parent_id ? ufm.forge_message.parent_id : ufm.forge_message.id, :topic_id => ufm.forge_message.id),:class=>"#{ufm.viewed==0?"newsBlack":"newsGrey"}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ufm.forge_message.created_on).html_safe %> </li>
<% else %>
<li class="<%= ufm.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复帖子</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=link_to ufm.forge_message.subject, project_boards_path(ufm.forge_message.project,:parent_id => ufm.forge_message.parent_id ? ufm.forge_message.parent_id : ufm.forge_message.id, :topic_id => ufm.forge_message.id),:class=>"#{ufm.viewed==0?"newsBlack":"newsGrey"}" %> </a></li>
<li class="homepageNewsTime fl"><%= time_tag(ufm.forge_message.created_on).html_safe %> </li>
<% end %>
</ul>
<% end %>
<% if ufm.forge_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<a href="javascript:void(0);" class="<%= ufm.viewed == 0 ? "newsBlack" : "newsBlue" %>"><%= ufm.forge_message.author %></a>
</li>
<li class="<%= ufm.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">发布了项目消息</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ufm.forge_message.title}"), {:controller => 'news', :action => 'show', :id => ufm.forge_message.id}, :class => "#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ufm.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %> <% end %>
<% end %> <% end %>
<% else %> <% else %>

View File

@ -589,7 +589,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} .homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
.homepageNewsTypeNotRead {width:95px; font-size:12px; font-weight:bold; color:#4B4B4B; display:block;} .homepageNewsTypeNotRead {width:95px; font-size:13px; font-weight:bold; color:#4B4B4B; display:block;}
.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
a.homepageWhite {color:#ffffff;} a.homepageWhite {color:#ffffff;}
@ -598,7 +598,7 @@ a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;} a.newsGrey:hover {color:#000000;}
a.newsBlue {color:#15bccf;} a.newsBlue {color:#15bccf;}
a.newsBlue:hover {color:#0781b4;} a.newsBlue:hover {color:#0781b4;}
a.newsBlack {color:#4B4B4B; font-weight:bold;} a.newsBlack {color:#4B4B4B; font-weight:bold; font-size:13px;}
a.newsBlack:hover {color:#0781b4;} a.newsBlack:hover {color:#0781b4;}
a.resourcesGrey {font-size:12px; color:#888888;} a.resourcesGrey {font-size:12px; color:#888888;}
a.resourcesGrey:hover {font-size:12px; color:#15bccf;} a.resourcesGrey:hover {font-size:12px; color:#15bccf;}