OSDN Git Service

create provider
[pettanr/pettanr.git] / app / views / provider_statuses / index.html.erb
1 <h1>借受状況一覧</h1>
2 <table>
3   <tr>
4     <th>caption</th>
5     <th>name</th>
6     <th>status</th>
7     <th>received_at</th>
8     <th>receive_hour1</th>
9     <th>receive_hour2</th>
10     <th>開く</th>
11   </tr>
12   
13   <% @provider_statuses.each do |provider_status| %>
14     <tr>
15       <td>
16         <%= link_to h(truncate(provider_status.provider.caption, :length => 20)), provider_status_path(provider_status.provider) %>
17       </td>
18       <td>
19         <%= h(truncate(provider_status.provider.name, :length => 12)) %>
20       </td>
21       <td>
22         <%= h(MagicNumber['provider_status_items'][provider_status.status].first) %>
23       </td>
24       <td>
25         <%= l(provider_status.received_at) if provider_status.received_at  %>
26       </td>
27       <td>
28         <%= l(provider_status.receive_hour1) if provider_status.receive_hour1 %>
29       </td>
30       <td>
31         <%= l(provider_status.receive_hour2) if provider_status.receive_hour2 %>
32       </td>
33       <td>
34         <%= link_to '開く', provider_status.provider.demander_url %>
35       </td>
36     </tr>
37   <% end %>
38 </table>
39 <div>
40 <% if @hide.blank? %>
41   <%= link_to '待機中の貸手の借受状況だけを表示する', provider_statuses_path(:hide => 1) %>
42 <% else %>
43   <%= link_to 'すべての貸手の借受状況を表示する', provider_statuses_path %>
44 <% end %>
45 </div>
46 <div>
47   <%= link_to '貸手に切り替える', providers_path(:page => @page, :page_size => @page_size, :hide => @hide) %>
48 </div>