From 8159ff22e530d30bad99952894bc9392cd287248 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 14 Jul 2021 18:51:48 -0400 Subject: Display activity-select (description, costs, and requirements) on hearth plantings view --- CHANGELOG.md | 3 ++- .../characters/hearth/hearth_plantings/index.html.erb | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c61a52..1306b65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog All notable changes to this project will be documented in this file. -## [Unreleased] +## [0.1.14] - 2021-07-14 ### Skills - Worldcall has been implemented. @@ -30,6 +30,7 @@ All notable changes to this project will be documented in this file. ### UI - Activity description is now displayed above costs and requirements. +- Activity description, costs, and requirements are now displayed on the hearth planting interface. ### Web - Favicon added (contributed by mattagarr). diff --git a/app/views/characters/hearth/hearth_plantings/index.html.erb b/app/views/characters/hearth/hearth_plantings/index.html.erb index d8e7f96..3f6964f 100644 --- a/app/views/characters/hearth/hearth_plantings/index.html.erb +++ b/app/views/characters/hearth/hearth_plantings/index.html.erb @@ -3,11 +3,15 @@

You have <%= @hearth.available_planting_spots %> available planting spots.

- <%= form_with url: start_activity_path, method: :post do |f| %> - <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] } %> - <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %> - <%= f.submit "Plant" %> - <% end %> +
+ <%= form_with url: start_activity_path, method: :post do |f| %> + <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] }, + {}, { data: { activity_select_target: "select", action: "activity-select#load" } } %> + <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %> + <%= f.submit "Plant" %> + <% end %> +
+
-- cgit v1.2.3