blob: 2a8cc5f598ff017f4ad57f453ea6936bd7d33909 (
plain) (
tree)
|
|
<p style="color: green"><%= notice %></p>
<h1>Events</h1>
<%= render partial: "events/form", locals: { event: Event.new } %>
<%# <%= link_to "New event", new_event_path %1> %>
<h4>Help on this table</h4>
<p>This is an example of some kind of table. There are lots of things wrong with it but who cares. It is a nice
table, isn't it? I'm hoping this text spans all the way across so I can see what it looks like when it renders.</p>
<table>
<col style="width: 7%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 48%">
<thead>
<tr>
<th>Date</th>
<th>Day</th>
<th>BAES Barrow</th>
<th>RRDL</th>
<th>Op. Berths</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<% @january_dates.each do |e| %>
<% if e.saturday? %>
<tr>
<td style="background: darkgreen; color: lightgray"><%= e.strftime("%d/%m") %></td>
<td style="background: darkgreen; color: lightgray"><%= e.strftime("%A") %></td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
</tr>
<% elsif e.sunday? %>
<tr>
<td style="background: darkgreen; color: lightgray"><%= e.strftime("%d/%m") %></td>
<td style="background: darkgreen; color: lightgray"><%= e.strftime("%A") %></td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
<td style="background: darkgreen; color: lightgray">-</td>
</tr>
<% else %>
<tr>
<td><%= e.strftime("%d/%m") %></td>
<td><%= e.strftime("%A") %></td>
<td>DSC 2/A</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<table class="table table-success table-striped table-bordered mt-5">
<tr>
<th>Date</th>
<th>Name</th>
</tr>
<% @events.each do |e| %>
<tr>
<td><%= e.date.to_formatted_s(:rfc822) %></td>
<td><%= e.name %></td>
</tr>
<% end %>
</table>
|