seminar2_old/app/views/admin/seminars/_index.html.erb

61 lines
2.7 KiB
Plaintext
Raw Normal View History

2016-06-29 06:57:45 +00:00
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<% if f == 'seminar.title' %>
<th class='span4'><%= t(f)%></th>
<% else %>
<%= thead(f) %>
<% end %>
<% end %>
</tr>
</thead>
<tbody>
<% @seminars.each do |seminar| %>
<tr>
<td><%= seminar.category.title %></td>
<td>
<a href="<%= page_for_seminar(seminar) %>?method=show_data" target="_blank"><%= seminar.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if admin_for_seminar(seminar) %>
2016-06-29 06:57:45 +00:00
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/copy"><%= t("seminar.copy") %></a></li>
2016-06-29 06:57:45 +00:00
<li><a href="<%= admin_seminar_item_contents_path(:seminar_main_id=>seminar.id.to_s) %>"><%= t('seminar.set_seminar_item_content') %></a></li>
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/seminar_signup_field"><%= t('seminar.set_seminar_signup_field') %></a></li>
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/seminar_submission_field"><%= t('seminar.set_seminar_submission_field') %></a></li>
<li><a href="<%=reviewer_setting_admin_seminar_path(seminar.id)%>"><%= t('seminar.reviewer_setting') %></a></li>
2016-06-29 06:57:45 +00:00
<li><a href="#" class="delete text-error" rel="/admin/seminars/<%=seminar.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= SeminarMain.time_range(seminar.seminar_start_date, seminar.seminar_end_date) %></td>
<td><%= SeminarMain.time_range(seminar.signup_start_date, seminar.signup_end_date) %></td>
<td><a href="/admin/seminars/<%=seminar.id.to_s%>/seminar_signup">
<% @seminar_review = seminar.seminar_reviews.where(:reviewer_id => current_user.member_profile_id.to_s).first %>
<% if @seminar_review.present? && !@can_edit %>
<%= @seminar_review.get_all_seminar_signup_ids.count %>
<% else %>
<%= seminar.seminar_signups.count %>
<% end %>
</a></td>
<td>
<% if can_see_seminar_signup(seminar) %>
<a href="/admin/seminars/<%=seminar.id.to_s%>/export?format=xlsx" target="_blank"><%= t('seminar.export') %></a>
<% end %>
</td>
2016-06-29 06:57:45 +00:00
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@seminars), class: "pagination pagination-centered"
end
%>