recruitment/app/views/admin/recruitments/_member_index.html.erb

46 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-01-17 18:22:24 +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| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td>
<% if user.is_employee? %>
<a href="/<%= I18n.locale.to_s + "/candidates/" + user.to_param %>" target="_blank" ><%= user.name %></a>
<% elsif user.is_employer? %>
<a href="<%= show_member_admin_recruitment_path(user.id) %>" ><%= user.profile.company_name %></a>
<% end %>
</td>
<td><%= t("recruitment.user_type.type#{user.user_type.to_s}") %></td>
<td>
<% if user.enabled %>
<a href="<%= delete_user_admin_recruitment_path(user.id, :status => "disable", :page => params[:page]) %>" data-method="delete" class="btn btn-warning"><%= t("recruitment.disable_user") %></a>
<% else %>
<a href="<%= delete_user_admin_recruitment_path(user.id, :status => "enable", :page => params[:page]) %>" data-method="delete" class="btn btn-success"><%= t("recruitment.enable_user") %></a>
<% end %>
<a href="<%= delete_user_admin_recruitment_path(user.id, :page => params[:page]) %>" data-method="delete" data-confirm="Are you sure?" class="btn btn-danger"><%= t(:_delete) %></a>
<% if user.is_employee? %>
<a href="<%= member_applications_admin_recruitment_path(user.id) %>" class="btn btn-info"><%= t("recruitment.show_applications") %></a>
<% elsif user.is_employer? %>
<a href="<%= company_postings_admin_recruitment_path(user.id) %>" class="btn btn-info"><%= t("recruitment.show_jobs") %></a>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@users), class: "pagination pagination-centered"
end
%>