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

46 lines
2.0 KiB
Plaintext
Raw Permalink 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? %>
2018-06-27 15:51:50 +00:00
<a href="<%= show_member_admin_recruitment_path(user.id) %>" ><%= user.profile.get_company_name %></a>
2018-01-17 18:22:24 +00:00
<% 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 %>
2018-01-21 19:25:19 +00:00
<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>
2018-01-17 18:22:24 +00:00
<% if user.is_employee? %>
2018-01-21 19:25:19 +00:00
<a href="<%= member_applications_admin_recruitment_path(user.id) %>" class="btn btn-info"><%= t("recruitment.show_application") %></a>
2018-01-17 18:22:24 +00:00
<% 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
%>