-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay.html.erb
More file actions
58 lines (55 loc) · 2.07 KB
/
display.html.erb
File metadata and controls
58 lines (55 loc) · 2.07 KB
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
<% content_for(:title, 'Search Results | Early Arrivals Records Search (EARS)') %>
<div class="container">
<div id="main-search" class="container search-form">
<h3>Search immigration records:</h3>
<%= form_tag(action="/searchcase/display", method: "get") do %>
<%= label_tag(:q, 'Search records') %>
<%= text_field_tag(:q, params[:q], placeholder: 'Enter a name to search', aria: { label: 'Search immigration records' }) %>
<%= submit_tag("Search", :class => "search-bar") %>
<% end %>
</div>
<%= will_paginate @return %>
<table id='table'>
<caption>Search results for immigration records</caption>
<thead>
<tr>
<th class="record_col" scope="col">Last Name</th>
<th class="record_col" scope="col">First Name</th>
<th class="record_col" scope="col">Middle Name</th>
<th class="record_col" scope="col">Age</th>
<th class="record_col" scope="col">Gender</th>
<th class="record_col" scope="col">Port</th>
<th class="record_col" scope="col">Date</th>
<th class="record_col" scope="col">Ship</th>
<th class="record_col" scope="col">Destination</th>
</tr>
</thead>
<tbody>
<% @return.each do |row| %>
<tr>
<td class="record_col">
<% if row.LASTNAME.nil? %>
<%= link_to("No Lastname in NARA", {:controller => "searchcase", :action => "full_display", :data => row},{:style=>'color:#2E64FE;'}) %>
<% else %>
<%= link_to(row.LASTNAME, {:controller => "searchcase", :action => "full_display", :data => row},{:style=>'color:#2E64FE;'}) %>
<% end %>
</td>
<td class="record_col"><%= row.FIRSTNAME %></td>
<td class="record_col"><%= row.MIDDLENAME %></td>
<td class="record_col"><%= row.AGE %></td>
<td class="record_col"><%= row.GENDER %></td>
<td class="record_col"><%= row.PORT%></td>
<td class="record_col"><%= row.DATE %></td>
<td class="record_col"><%= row.SHIP %></td>
<td class="record_col"><%= row.DESTINATION %></td>
</tr>
<% end %>
</tbody>
</table>
<%= will_paginate @return %>
<div class="push"></div>
</div>
<% if flash[:notice] %>
<div class="notice"><%= flash[:notice] %></div>
<% end %>
</div>