socialforge/app/views/statistics/_statistics_list.html.erb

34 lines
1.6 KiB
Plaintext

<% @statistics.each do |statistic| %>
<div class="data_list_item cl pr">
<img src="<%= url_to_avatar(statistic.creator) %>" width="50" class="fl">
<div class="homepagePostSetting" style="top: 10px;right: 12px">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><%= link_to '编辑', edit_statistic_path(statistic) %></li>
<li><%= link_to '删除', statistic, method: :delete, data: { confirm: 'Are you sure?' } %></li>
</ul>
</li>
</ul>
</div>
<div class="fl data_itemMain">
<span class="f16 mr10"> <%= link_to "#{statistic.name}", statistic %> </span>
<p class="f13 mt5 mb5 data_detail"><%= statistic.description.try(:html_safe) %></p>
<div class="f13 mt7">
<%= render :partial => 'attachments',:locals => {:attachments => statistic.try(:attachments)} %>
</div>
<div class="data_info mt7 c_grey">
<span><%= statistic.creator.show_name %></span>
<span><%= format_time statistic.created_at %></span>
<span><%= statistic.main_category.name %></span>
<span><%= statistic.sub_category.try(:name) %></span>
</div>
</div>
</div>
<% end %>
<div class="pages fr" style="width:auto; display:inline-block;">
<ul id="issue_list_pagination" class="fr">
<%= pagination_links_full @statistics_pages, @statistics_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>