From 82ebb73bb4fc53ec5af428a88809ab8f11e52c0b Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 27 May 2021 17:27:42 -0400 Subject: Display cost and requirements of any activity that fails to start --- app/views/application/_flash_messages.html.erb | 6 ++++++ app/views/characters/hearth/index.html.erb | 4 ++-- app/views/layouts/application.html.erb | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 app/views/application/_flash_messages.html.erb (limited to 'app/views') diff --git a/app/views/application/_flash_messages.html.erb b/app/views/application/_flash_messages.html.erb new file mode 100644 index 0000000..a1c7467 --- /dev/null +++ b/app/views/application/_flash_messages.html.erb @@ -0,0 +1,6 @@ +<% if notice %> +
<%= notice %>
+<% end %> +<% if alert %> +
<%= alert %>
+<% end %> diff --git a/app/views/characters/hearth/index.html.erb b/app/views/characters/hearth/index.html.erb index 82dfbe8..20b6fc0 100644 --- a/app/views/characters/hearth/index.html.erb +++ b/app/views/characters/hearth/index.html.erb @@ -33,7 +33,7 @@ <%= f.hidden_field :queued_actions, value: 0 %> <%= f.submit construct_activity.name %> <% end %> -
(costs <%= construct_activity.cost_string %>)
+
(costs <%= construct_activity.costs.join(", ")%>)
<% end %> @@ -47,5 +47,5 @@ <%= f.hidden_field :queued_actions, value: 0 %> <%= f.submit construct_activity.name %> <% end %> - (costs <%= construct_activity.cost_string %>) + (costs <%= construct_activity.costs.join(", ")%>) <% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9b9b23a..7ce8860 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,8 +21,7 @@ <%= render "navbar" %> <% end %>
-

<%= notice %>

-

<%= alert %>

+ <%= render "flash_messages" %> <%= yield %>
<% if user_signed_in? %> -- cgit v1.2.3