aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext/test/dummy/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'actiontext/test/dummy/app/views')
-rw-r--r--actiontext/test/dummy/app/views/layouts/application.html.erb14
-rw-r--r--actiontext/test/dummy/app/views/layouts/mailer.html.erb13
-rw-r--r--actiontext/test/dummy/app/views/layouts/mailer.text.erb1
-rw-r--r--actiontext/test/dummy/app/views/messages/_form.html.erb27
-rw-r--r--actiontext/test/dummy/app/views/messages/edit.html.erb6
-rw-r--r--actiontext/test/dummy/app/views/messages/index.html.erb29
-rw-r--r--actiontext/test/dummy/app/views/messages/new.html.erb5
-rw-r--r--actiontext/test/dummy/app/views/messages/show.html.erb13
-rw-r--r--actiontext/test/dummy/app/views/people/_trix_content_attachment.html.erb3
9 files changed, 111 insertions, 0 deletions
diff --git a/actiontext/test/dummy/app/views/layouts/application.html.erb b/actiontext/test/dummy/app/views/layouts/application.html.erb
new file mode 100644
index 0000000000..f221f512b7
--- /dev/null
+++ b/actiontext/test/dummy/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Dummy</title>
+ <%= csrf_meta_tags %>
+
+ <%= stylesheet_link_tag 'application', media: 'all' %>
+ <%= javascript_pack_tag 'application' %>
+ </head>
+
+ <body>
+ <%= yield %>
+ </body>
+</html>
diff --git a/actiontext/test/dummy/app/views/layouts/mailer.html.erb b/actiontext/test/dummy/app/views/layouts/mailer.html.erb
new file mode 100644
index 0000000000..cbd34d2e9d
--- /dev/null
+++ b/actiontext/test/dummy/app/views/layouts/mailer.html.erb
@@ -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>
diff --git a/actiontext/test/dummy/app/views/layouts/mailer.text.erb b/actiontext/test/dummy/app/views/layouts/mailer.text.erb
new file mode 100644
index 0000000000..37f0bddbd7
--- /dev/null
+++ b/actiontext/test/dummy/app/views/layouts/mailer.text.erb
@@ -0,0 +1 @@
+<%= yield %>
diff --git a/actiontext/test/dummy/app/views/messages/_form.html.erb b/actiontext/test/dummy/app/views/messages/_form.html.erb
new file mode 100644
index 0000000000..3b8a174884
--- /dev/null
+++ b/actiontext/test/dummy/app/views/messages/_form.html.erb
@@ -0,0 +1,27 @@
+<%= form_with(model: message, local: true) do |form| %>
+ <% if message.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(message.errors.count, "error") %> prohibited this message from being saved:</h2>
+
+ <ul>
+ <% message.errors.full_messages.each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= form.label :subject %>
+ <%= form.text_field :subject %>
+ </div>
+
+ <div class="field">
+ <%= form.label :content %>
+ <%= form.rich_text_area :content, class: "trix-content" %>
+ </div>
+
+ <div class="actions">
+ <%= form.submit %>
+ </div>
+<% end %>
diff --git a/actiontext/test/dummy/app/views/messages/edit.html.erb b/actiontext/test/dummy/app/views/messages/edit.html.erb
new file mode 100644
index 0000000000..90ad68c788
--- /dev/null
+++ b/actiontext/test/dummy/app/views/messages/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing Message</h1>
+
+<%= render 'form', message: @message %>
+
+<%= link_to 'Show', @message %> |
+<%= link_to 'Back', messages_path %>
diff --git a/actiontext/test/dummy/app/views/messages/index.html.erb b/actiontext/test/dummy/app/views/messages/index.html.erb
new file mode 100644
index 0000000000..a8c97468c6
--- /dev/null
+++ b/actiontext/test/dummy/app/views/messages/index.html.erb
@@ -0,0 +1,29 @@
+<p id="notice"><%= notice %></p>
+
+<h1>Messages</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Subject</th>
+ <th>Content</th>
+ <th colspan="3"></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @messages.each do |message| %>
+ <tr>
+ <td><%= message.subject %></td>
+ <td><%= message.content %></td>
+ <td><%= link_to 'Show', message %></td>
+ <td><%= link_to 'Edit', edit_message_path(message) %></td>
+ <td><%= link_to 'Destroy', message, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Message', new_message_path %>
diff --git a/actiontext/test/dummy/app/views/messages/new.html.erb b/actiontext/test/dummy/app/views/messages/new.html.erb
new file mode 100644
index 0000000000..6cbd3b8ffe
--- /dev/null
+++ b/actiontext/test/dummy/app/views/messages/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New Message</h1>
+
+<%= render 'form', message: @message %>
+
+<%= link_to 'Back', messages_path %>
diff --git a/actiontext/test/dummy/app/views/messages/show.html.erb b/actiontext/test/dummy/app/views/messages/show.html.erb
new file mode 100644
index 0000000000..25fad1efba
--- /dev/null
+++ b/actiontext/test/dummy/app/views/messages/show.html.erb
@@ -0,0 +1,13 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <strong>Subject:</strong>
+ <%= @message.subject %>
+</p>
+
+<div class="trix-content">
+ <%= @message.content.html_safe %>
+</div>
+
+<%= link_to 'Edit', edit_message_path(@message) %> |
+<%= link_to 'Back', messages_path %>
diff --git a/actiontext/test/dummy/app/views/people/_trix_content_attachment.html.erb b/actiontext/test/dummy/app/views/people/_trix_content_attachment.html.erb
new file mode 100644
index 0000000000..7db2334126
--- /dev/null
+++ b/actiontext/test/dummy/app/views/people/_trix_content_attachment.html.erb
@@ -0,0 +1,3 @@
+<span class="mentionable-person" gid="<%= person.to_gid %>">
+ <%= person.name %>
+</span>