socialforge/app/views/admin/messages_list.html.erb

72 lines
2.3 KiB
Plaintext

<h3>
<%=l(:label_message_plural)%>
</h3>
<%= render 'tab_messages' %>
<h4><%=l(:label_forum) %></h4>
<div class="autoscroll">
<table class="list" style="width: 100%;table-layout: fixed">
<thead>
<tr>
<th style="width: 30px;">
序号
</th>
<th style="width: 30px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(贴吧ID)">
来源(贴吧ID)
</th>
<th style="width: 50px;">
作者
</th>
<th style="width: 70px;">
时间
</th>
<th style="width: 120px;">
标题
</th>
<th style="width: 30px;">
回复数
</th>
</tr>
</thead>
<tbody>
<% @count=@page * 30%>
<% for memo in @memo -%>
<% @count=@count + 1 %>
<tr class="<%= cycle("odd", "even") %>">
<td style="text-align: center;">
<%= @count %>
</td>
<td align="center">
<%= memo.forum_id %>
</td>
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if memo.try(:author).try(:realname) == ' '%><%= memo.try(:author)%><% else %><%=memo.try(:author).try(:realname) %><% end %>'>
<% if memo.try(:author).try(:realname) == ' '%>
<%= link_to(memo.try(:author), user_path(memo.author)) %>
<% else %>
<%= link_to(memo.try(:author).try(:realname), user_path(memo.author)) %>
<% end %>
</td>
<td class="center">
<%= format_date(memo.created_at) %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=memo.subject %>'>
<% if memo.parent_id.nil? || memo.subject.starts_with?('RE:')%>
<%= link_to(memo.subject, forum_memo_path(memo.forum, memo)) %>
<% else %>
<%= link_to("RE:"+memo.subject, forum_memo_path(memo.forum, memo)) %>
<% end %>
</td>
<td class="center">
<%= link_to(memo.replies_count, forum_memo_path(memo.forum, memo)) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
</div>
<% html_title(l(:label_message_plural)) -%>