2015-04-11 14:19:52 +08:00
|
|
|
|
<%
|
|
|
|
|
btn_tips = l(:label_news_new)
|
|
|
|
|
label_tips = l(:label_news)
|
|
|
|
|
%>
|
2015-03-07 15:32:50 +08:00
|
|
|
|
<div class="project_r_h">
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<h2 class="project_h2"><%= label_tips %></h2>
|
2015-03-07 15:32:50 +08:00
|
|
|
|
</div>
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<div class="talk_top">
|
|
|
|
|
<p class="fl"><%= l(:label_total_news) %><span><%= @news_count %></span><%= l(:label_project_new_list) %></p>
|
|
|
|
|
<% if @project && User.current.allowed_to?(:manage_news, @project) %>
|
|
|
|
|
<%= link_to(btn_tips, new_project_news_path(@project),
|
|
|
|
|
:class => 'problem_new_btn fl c_dorange') %>
|
|
|
|
|
<div class="cl"></div>
|
2014-08-29 11:40:00 +08:00
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
2014-06-18 16:29:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<div>
|
|
|
|
|
<% if @newss.empty? %>
|
|
|
|
|
<p class="nodata">
|
|
|
|
|
<%= l(:label_no_data) %>
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% @newss.each do |news| %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %>
|
|
|
|
|
<div class="problem_txt fl mt5">
|
|
|
|
|
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
|
|
|
|
|
<span class="fl"> <%= l(:label_release_news) %>:</span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %><br />
|
|
|
|
|
<div class="cl mb5"></div>
|
|
|
|
|
<p id="news_description_<%= news.id %>" class="news_description mt5"><%= news.description %><br /> <%= l(:label_create_time) %> :<%= format_time(news.created_on) %></p>
|
|
|
|
|
<div class="news_foot" style="display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"><%= l(:label_expend_information) %> <span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--problem_main end-->
|
2014-06-18 16:29:29 +08:00
|
|
|
|
|
|
|
|
|
<% end %>
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<!--end-->
|
|
|
|
|
<ul class="wlist">
|
|
|
|
|
<%= pagination_links_full @news_pages, @news_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
|
</ul>
|
2014-06-18 16:29:29 +08:00
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<% other_formats_links do |f| %>
|
|
|
|
|
<%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
|
|
|
|
|
<% end %>
|
2014-06-18 16:29:29 +08:00
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
|
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
|
<% end %>
|
2014-06-18 16:29:29 +08:00
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<% html_title(l(:label_news_plural)) -%>
|
2014-06-18 16:29:29 +08:00
|
|
|
|
|
2015-04-11 14:19:52 +08:00
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
$(document).ready(function ($) {
|
|
|
|
|
$('.content-text-list').each(function () {
|
|
|
|
|
$(this).find('.delete_icon').hide();
|
|
|
|
|
$(this).mouseenter(function (event) {
|
|
|
|
|
$(this).find('.delete_icon').show();
|
|
|
|
|
});
|
|
|
|
|
$(this).mouseleave(function (event) {
|
|
|
|
|
$(this).find('.delete_icon').hide();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|