add announcement plugin
This commit is contained in:
parent
9433d59c04
commit
e4de1e34a2
|
@ -1 +1,49 @@
|
|||
Hello~ I am your plugin profile
|
||||
<%
|
||||
if @user
|
||||
@bulletins = Bulletin.where(:create_user_id => @user.id).page(params[:page]).per(10)
|
||||
else
|
||||
@bulletins = Bulletin.all.page(params[:page]).per(10)
|
||||
end
|
||||
|
||||
%>
|
||||
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1"><%= t('bulletin.category') %></th>
|
||||
<th class="span3"><%= t('bulletin.title') %></th>
|
||||
<th class="span1"><%= t('bulletin.start_date') %></th>
|
||||
<th class="span1"><%= t('bulletin.end_date') %></th>
|
||||
<th class="span1"><%= t('bulletin.tags') %></th>
|
||||
<% if not @user%>
|
||||
<th class="span1"><%= t('bulletin.last_modified') %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody_bulletin" class="sort-holder">
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<tr id="<%= dom_id bulletin%>" class="with_action">
|
||||
<td><%= bulletin.bulletin_category.title%></td>
|
||||
<td>
|
||||
<%= bulletin.title%>
|
||||
</td>
|
||||
<td><%= display_date_time(bulletin.postdate) %></td>
|
||||
<% if not bulletin.deadline.nil?%>
|
||||
<td><%= display_date_time(bulletin.deadline) %></td>
|
||||
<%else%>
|
||||
<td><%= t('bulletin.no_deadline') %></td>
|
||||
<% end %>
|
||||
<td>
|
||||
<div class="label-group">
|
||||
<% bulletin.sorted_tags.each do |tag| %>
|
||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<% if not @user%>
|
||||
<td><%= User.find(bulletin.create_user_id).name %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue