Hello tinyforms
This commit is contained in:
5
app/views/forms/index.html.erb
Normal file
5
app/views/forms/index.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<%= link_to "new form", new_form_url %>
|
||||
<hr>
|
||||
<% @forms.each do |form| %>
|
||||
<%= link_to form.title, form_url(form) %>
|
||||
<% end %>
|
||||
5
app/views/forms/new.html.erb
Normal file
5
app/views/forms/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<%= form_for @form do |f| %>
|
||||
<%= f.text_field :title %>
|
||||
<%= f.text_field :thank_you_url %>
|
||||
<%= f.submit %>
|
||||
<% end %>
|
||||
18
app/views/forms/show.html.erb
Normal file
18
app/views/forms/show.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<% @form.header_values.each do |value| %>
|
||||
<th><%= value %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @submissions.each do |submission| %>
|
||||
<tr>
|
||||
<% @form.header_values.each do |column| %>
|
||||
<td><%= submission.data[column] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
3
app/views/home/index.html.erb
Normal file
3
app/views/home/index.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1>Welcome</h1>
|
||||
|
||||
<%= link_to "Login", login_url %>
|
||||
15
app/views/layouts/application.html.erb
Normal file
15
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Tinyform</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
13
app/views/layouts/mailer.html.erb
Normal file
13
app/views/layouts/mailer.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
/* Email styles need to be inline */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
1
app/views/layouts/mailer.text.erb
Normal file
1
app/views/layouts/mailer.text.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= yield %>
|
||||
1
app/views/submissions/create.html.erb
Normal file
1
app/views/submissions/create.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
Thanks
|
||||
Reference in New Issue
Block a user