summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-07-14 18:51:48 -0400
committerDavid Gay <david@davidgay.org>2021-07-14 18:52:30 -0400
commit8159ff22e530d30bad99952894bc9392cd287248 (patch)
treeb62508512305bd6902a933089cfd072e4831a074
parentf039c9401b1e9417e18472c35bea39cb659d2f45 (diff)
Display activity-select (description, costs, and requirements) on hearth plantings view
-rw-r--r--CHANGELOG.md3
-rw-r--r--app/views/characters/hearth/hearth_plantings/index.html.erb14
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 @@
<p>You have <span class="font-bold"><%= @hearth.available_planting_spots %></span> available planting spots.</p>
<div class="my-4">
- <%= 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 %>
+ <div data-controller="activity-select">
+ <%= 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 %>
+ <div data-activity-select-target="output" class="my-1"></div>
+ </div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">