-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.erb
66 lines (65 loc) · 2.71 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<h1>Browse volunteers</h1>
<p>Below is the list of volunteer applications registered.</p>
<%= link_to "Create applicant", new_applicant_path, class: "btn btn-primary" %>
<table class="table table-striped sortable">
<thead>
<tr>
<th></th>
<th></th>
<th colspan="3">Position choices</th>
<th></th>
<th colspan="3">Position choices interview times</th>
</tr>
<tr>
<th class="header"></th>
<th class="header">Locked</th>
<th class="header"><%= "Last name" %></th>
<th class="header"><%= "First name" %></th>
<th class="header"><%= "First choice"%></th>
<th class="header"><%= "Second"%></th>
<th class="header"><%= "Third"%></th>
<th class="header"><%= "Status"%></th>
<th class="header"><%= "First interview"%></th>
<th class="header"><%= "Second"%></th>
<th class="header"><%= "Thirds"%></th>
<th class="header"><%= "Created at"%></th>
</tr>
</thead>
<% @applicants.each do |applicant| %>
<tr>
<td>
<div class="btn-group btn-group-sm" style="display: flex;">
<%= link_to "Show", applicant, class: "btn btn-info" %>
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><%= link_to "Edit", edit_applicant_path(applicant) %></li>
</ul>
</div>
</div>
</td>
<td>
<%= raw "<i class=\"icon-lock\"></i> " if applicant.locked %>
</td>
<td>
<%= applicant.lastname %>
</td>
<td><%= applicant.firstname %></td>
<td><%= applicant.first_position.title_no %></td>
<td><%= applicant.second_position ?
applicant.second_position.title_no: '-' %></td>
<td><%= applicant.third_position ?
applicant.third_position.title_no : '-' %></td>
<td title="<%= (applicant.recruited_position ? applicant.recruited_position.title_no : '-') if applicant.status == 4 %>">
<%= @status[applicant.status] %>
</td>
<td><%= (applicant.interview_place_1 != '' and applicant.interview_time_1) ? applicant.interview_time_1.strftime("%d.%m %H:%M") : '-' %></td>
<td><%= (applicant.interview_place_2 != '' and applicant.interview_time_2) ? applicant.interview_time_2.strftime("%d.%m %H:%M") : '-' %></td>
<td><%= (applicant.interview_place_3 != '' and applicant.interview_time_3) ? applicant.interview_time_3.strftime("%d.%m %H:%M") : '-' %></td>
<td><%= applicant.created_at.strftime("%Y-%m-%d %H:%M:%S") %> </td>
</tr>
<% end %>
</table>
<%#= will_paginate @applicants %>