2014-08-21 09:27:52 +00:00
|
|
|
<% # encoding: utf-8 %>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
th {
|
|
|
|
background: #fff;
|
|
|
|
border-bottom: 2px solid #333;
|
|
|
|
padding: 10px 5px;
|
|
|
|
font: 15px/1 '微軟正黑體',sans-serif;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
td {
|
|
|
|
padding: 10px 5px;
|
|
|
|
font: 13px/1.5 'arial',sans-serif;
|
|
|
|
vertical-align: top;
|
|
|
|
text-align: left;
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
}
|
|
|
|
tr{
|
|
|
|
background: #fafafa
|
|
|
|
}
|
|
|
|
.odd{
|
|
|
|
background: #fff;
|
|
|
|
}
|
|
|
|
td a {
|
|
|
|
text-decoration: none;
|
|
|
|
color: #333;
|
|
|
|
}
|
|
|
|
td a:hover {
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
.pagination{
|
|
|
|
margin: 10px 0;
|
|
|
|
}
|
|
|
|
.pagination ul{
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
.pagination li:first-child {
|
|
|
|
border-radius: 5px 0 0 5px;
|
|
|
|
}
|
|
|
|
.pagination li {
|
|
|
|
background: none repeat scroll 0 0 #FFFFFF !important;
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
border-right: 0px solid #ccc;
|
|
|
|
display: block;
|
|
|
|
float: left;
|
|
|
|
font: 13px/30px 'open sans',sans-serif !important;
|
|
|
|
padding: 0 10px !important;
|
|
|
|
}
|
|
|
|
.pagination li:last-child {
|
|
|
|
border-radius: 0 5px 5px 0;
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
}
|
|
|
|
.pagination li a {
|
|
|
|
color: #333;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.pagination li a:hover {
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
// Popup window code
|
|
|
|
function newPopup(url) {
|
|
|
|
popupWindow = window.open(
|
|
|
|
url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th><%= t('announcement.categories') %></th>
|
|
|
|
<th><%= t('announcement.default_widget.title') %></th>
|
|
|
|
<th><%= t('announcement.default_widget.postdate') %></th>
|
|
|
|
<th><%= t('announcement.default_widget.bulletin_create_dept') %></th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @bulletins.each_with_index do |post, i| %>
|
|
|
|
<tr <%= (i % 2 == 0) ? 'class=odd' : '' %>>
|
|
|
|
<td><%= post.category.title rescue nil %></td>
|
|
|
|
<td><a href="JavaScript:newPopup('<%= panel_announcement_widget_show_sync_data_path(post) %>');"><%= post.title %></a></td>
|
|
|
|
<td><%= display_date(post.postdate) %></td>
|
|
|
|
<%
|
|
|
|
unit_field = User.get_member_list_attribute_field("staff","unit")
|
|
|
|
unit = User.get_member_list_attribute_value(post.create_user_id,unit_field.id).get_value_by_locale(I18n.locale) rescue nil
|
|
|
|
%>
|
|
|
|
<td><%= unit %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2014-11-24 02:32:41 +00:00
|
|
|
<%= paginate( @bulletins, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil if params[:show_page] == 'true' %>
|
2014-08-21 09:27:52 +00:00
|
|
|
|
|
|
|
|