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

70 lines
2.3 KiB
Plaintext
Raw Normal View History

<h3>
<%=l(:label_message_plural)%>
</h3>
<%= render 'tab_messages' %>
<h4><%=l(:label_borad_course) %></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 course in @course_ms -%>
<% @count=@count + 1 %>
<tr class="<%= cycle("odd", "even") %>">
<td style="text-align: center;">
<%= @count %>
</td>
<td align="center">
<%= Board.where('id=?',course.board_id).first.course_id %>
</td>
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if course.try(:author).try(:realname) == ' '%><%= course.try(:author)%><% else %><%=course.try(:author).try(:realname) %><% end %>'>
<% if course.try(:author).try(:realname) == ' '%>
<%= link_to(course.try(:author), user_path(course.author)) %>
<% else %>
<%= link_to(course.try(:author).try(:realname), user_path(course.author)) %>
<% end %>
</td>
<td class="center">
<%= format_date(course.created_on) %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=course.subject %>'>
<%= link_to(course.subject, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
</td>
<td class="center">
<%= link_to(course.replies_count, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
</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)) -%>