diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-17 21:02:25 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-17 21:02:25 +0000 |
commit | 5ddfd3d2e6c13873cfaacdfd53c3e853d605f951 (patch) | |
tree | 665c2d0cb91833f3e33b1a42734aebcdb459d5c7 /app/views | |
parent | a6929cddd59e6f2a1df5b722194d84e8fb68b9d4 (diff) |
Tinkering
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/events/_form.html.erb | 23 | ||||
-rw-r--r-- | app/views/events/index.html.erb | 57 |
2 files changed, 52 insertions, 28 deletions
diff --git a/app/views/events/_form.html.erb b/app/views/events/_form.html.erb index 4c718ae..e4ee1a0 100644 --- a/app/views/events/_form.html.erb +++ b/app/views/events/_form.html.erb @@ -1,3 +1,21 @@ +<hr> +<h3>Create a new event</h3> + +<ul class="nav nav-tabs"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Assessment/Inspection</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">SyRIF</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Exercise</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> +</ul> + <%= form_with(model: event) do |form| %> <% if event.errors.any? %> <div style="color: red"> @@ -17,11 +35,12 @@ </div> <div> - <%= form.label :name, style: "display: block" %> + <%= form.label "Event name", style: "display: block" %> <%= form.text_field :name %> </div> <div> - <%= form.submit style: "background: green; color: white; margin-top: 2px;"%> + <%= form.submit style: "background: green; color: white; margin-top: 1.1em;"%> </div> <% end %> +<hr> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 5c9402f..2a8cc5f 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -6,51 +6,56 @@ <%# <%= link_to "New event", new_event_path %1> %> -<style type="text/css" media="screen"> - table { - width: 100%; - border-collapse: collapse; - background: lightgreen; - margin-top: 30px; - table-layout: fixed; - border: 2px solid; - } - th, td { - border: 1px solid; - padding: 3px; - } -</style> +<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: 5%"> - <col style="width: 10%"> - <col style="width: 85%"> + <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>Bunter</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: lightgray; color: gray"><%= e.day %></td> - <td style="background: lightgray; color: gray">Toss</td> - <td style="background: lightgray; color: gray"><%= e.strftime("%A") %></td> + <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: lightgray; color: gray"><%= e.day %></td> - <td style="background: lightgray; color: gray">Toss</td> - <td style="background: lightgray; color: gray"><%= e.strftime("%A") %></td> + <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.day %></td> - <td>Toss</td> + <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 %> |