app/views/apidae/objects/index.html.erb in apidae-0.1.2 vs app/views/apidae/objects/index.html.erb in apidae-0.1.3
- old
+ new
@@ -1,53 +1,30 @@
-<p id="notice"><%= notice %></p>
+<%= render layout: "/layouts/#{Rails.application.config.apidae_layout}" do |styles| %>
+ <div id="apidae_header" class="<%= styles[:header] %>">
+ <h1 class="<%= styles[:h1] %>">Apidae - Objets touristiques</h1>
+ </div>
+ <div id="apidae_dashboard" class="<%= styles[:wrapper] %>">
+ <div id="apidae_imports_panel" class="<%= styles[:body] %>">
+ <table id="apidae_objects" class="<%= styles[:table] %>">
+ <thead>
+ <tr>
+ <th>Titre</th>
+ <th>Identifiant</th>
+ <th>Type</th>
+ <th>Mise à jour</th>
+ </tr>
+ </thead>
-<h1>Listing Objects</h1>
-
-<table>
- <thead>
- <tr>
- <th>Address</th>
- <th>Apidae</th>
- <th>Apidae type</th>
- <th>Apidae subtype</th>
- <th>Title</th>
- <th>Short desc</th>
- <th>Contact</th>
- <th>Long desc</th>
- <th>Type data</th>
- <th>Latitude</th>
- <th>Longitude</th>
- <th>Openings</th>
- <th>Rates</th>
- <th>Reservation</th>
- <th colspan="3"></th>
- </tr>
- </thead>
-
- <tbody>
- <% @objects.each do |object| %>
- <tr>
- <td><%= object.address %></td>
- <td><%= object.apidae_id %></td>
- <td><%= object.apidae_type %></td>
- <td><%= object.apidae_subtype %></td>
- <td><%= object.title %></td>
- <td><%= object.short_desc %></td>
- <td><%= object.contact %></td>
- <td><%= object.long_desc %></td>
- <td><%= object.type_data %></td>
- <td><%= object.latitude %></td>
- <td><%= object.longitude %></td>
- <td><%= object.openings %></td>
- <td><%= object.rates %></td>
- <td><%= object.reservation %></td>
- <td><%= link_to 'Show', object %></td>
- <td><%= link_to 'Edit', edit_object_path(object) %></td>
- <td><%= link_to 'Destroy', object, method: :delete, data: { confirm: 'Are you sure?' } %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
-
-<br>
-
-<%= link_to 'New Object', new_object_path %>
+ <tbody>
+ <% @objects.each do |object| %>
+ <tr>
+ <td><%= object.title %></td>
+ <td><%= object.apidae_id %></td>
+ <td><%= object.apidae_type %></td>
+ <td><%= object.updated_at.strftime('Le %d/%m/%Y à %H:%M') if object.updated_at %></td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+ </div>
+ </div>
+<% end %>
\ No newline at end of file