Merge branch 'master' into form-submission-thank-you-page

This commit is contained in:
Yannick 2020-04-22 20:22:33 +02:00
commit efe6a916f1
2 changed files with 54 additions and 30 deletions

View File

@ -56,14 +56,13 @@ body {
color: white;
}
.button {
vertical-align: middle;
}
.table-wrapper {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.animation-ctn {
text-align: center;

View File

@ -1,25 +1,50 @@
<h1><%= @form.title %></h1>
<p>
<%= submission_url(@form) %>
</p>
<p>
<%= link_to 'Google spreadsheet', @form.spreadsheet_url %>
</p>
<table>
<thead>
<tr>
<% @form.spreadsheet_headers.each do |value| %>
<th><%= value %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @submissions.each do |submission| %>
<tr>
<% @form.spreadsheet_headers.each do |column| %>
<div class="section">
<div class="container">
<div class="content is-paddingless">
<h1 class="is-family-secondary"><%= @form.title %></h1>
<div class="columns">
<div class="column">
<p>
<button class="button">
<span class="icon is-small">
<i class="fas fa-link"></i>
</span>
</button>
<%= submission_url(@form) %>
</p>
</div>
<div class="column">
<p>
<button class="button is-success">
<span class="icon is-small">
<i class="fas fa-file-excel"></i>
</span>
</button>
<%= link_to 'Google spreadsheet', @form.spreadsheet_url, { :class => "has-text-dark"} %>
</p>
</div>
</div>
</div>
<div class="box table-wrapper">
<table class="table is-fullwidth is-striped is-hoverable">
<thead>
<tr>
<% @form.spreadsheet_headers.each do |value| %>
<th><%= value %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @submissions.each do |submission| %>
<tr>
<% @form.spreadsheet_headers.each do |column| %>
<td><%= submission.data[column] %></td>
<% end %>
</tr>
<% end %>
</tr>
<% end %>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>