Surprise Rails app!
This commit is contained in:
25
app/views/door_logs/_form.html.erb
Normal file
25
app/views/door_logs/_form.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= form_for(@door_log) do |f| %>
|
||||
<% if @door_log.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@door_log.errors.count, "error") %> prohibited this door_log from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @door_log.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :key %><br />
|
||||
<%= f.text_field :key %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :data %><br />
|
||||
<%= f.number_field :data %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
8
app/views/door_logs/download.html.erb
Normal file
8
app/views/door_logs/download.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Download results:</b>
|
||||
<%= @results.inspect %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Back', door_logs_path %>
|
||||
6
app/views/door_logs/edit.html.erb
Normal file
6
app/views/door_logs/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing door_log</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @door_log %> |
|
||||
<%= link_to 'Back', door_logs_path %>
|
||||
22
app/views/door_logs/index.html.erb
Normal file
22
app/views/door_logs/index.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<h1>Listing door_logs</h1>
|
||||
|
||||
<%= link_to 'Download Door Logs', download_path %>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
<th>Data</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @door_logs.each do |door_log| %>
|
||||
<tr>
|
||||
<td><%= door_log.key %></td>
|
||||
<td><%= door_log.data %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
5
app/views/door_logs/new.html.erb
Normal file
5
app/views/door_logs/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New door_log</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', door_logs_path %>
|
||||
15
app/views/door_logs/show.html.erb
Normal file
15
app/views/door_logs/show.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Key:</b>
|
||||
<%= @door_log.key %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Data:</b>
|
||||
<%= @door_log.data %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_door_log_path(@door_log) %> |
|
||||
<%= link_to 'Back', door_logs_path %>
|
||||
Reference in New Issue
Block a user