Add announcement detail for backend index table

This commit is contained in:
manson 2014-06-24 12:25:05 +08:00
parent 39b8b1f17a
commit c846599f3b
1 changed files with 24 additions and 1 deletions

View File

@ -16,7 +16,7 @@
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li> <li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="detail-row"><%= t(:detail) %></a></li> <li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300)"><%= t(:detail) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li> <li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
</ul> </ul>
</div> </div>
@ -25,6 +25,29 @@
<td><%= format_value b.deadline %></td> <td><%= format_value b.deadline %></td>
<td><%= b.update_user.user_name %></td> <td><%= b.update_user.user_name %></td>
</tr> </tr>
<tr class="footable-row-detail">
<td class="footable-cell-detail" colspan="6">
<div id="<%= "#{b.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
<div>
<strong><%= t(:tags) %></strong> :
<% b.tags.each do |tag| %>
<span class="label label-warning"><%= tag.name %></span>
<% end %>
</div>
<div>
<strong><%= t("announcement.email_to") %></strong> :
<% b.email_members.each do |member| %>
<span class="label"><%= member.name %></span>
<% end %>
<% unless b.other_mailaddress.nil? %>
<% b.other_mailaddress.split(',').each do |mailaddress| %>
<span class="label"><%= mailaddress %></span>
<% end %>
<% end %>
</div>
</div>
</td>
</tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>