From 73744a9c6840fb0ba6f285ca81f9fba75ec22d5f Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 4 May 2021 17:55:28 -0400 Subject: Initial draft of timer setup, with results outputting and items being awarded --- app/views/activities/_results.html.erb | 7 +++++++ app/views/activities/_timer.html.erb | 8 ++++++++ app/views/activities/show.html.erb | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 app/views/activities/_results.html.erb create mode 100644 app/views/activities/_timer.html.erb create mode 100644 app/views/activities/show.html.erb (limited to 'app/views/activities') diff --git a/app/views/activities/_results.html.erb b/app/views/activities/_results.html.erb new file mode 100644 index 0000000..baa4ab0 --- /dev/null +++ b/app/views/activities/_results.html.erb @@ -0,0 +1,7 @@ +
+ <% results.each do |result| %> + <% if result[:type] == "item" %> +

You got <%= result[:quantity] %> <%= result[:item].name %>.

+ <% end %> + <% end %> +
diff --git a/app/views/activities/_timer.html.erb b/app/views/activities/_timer.html.erb new file mode 100644 index 0000000..418c378 --- /dev/null +++ b/app/views/activities/_timer.html.erb @@ -0,0 +1,8 @@ +<% if current_char.activity %> +
+ +
+ <%= link_to "Stop", location_path(current_char.activity.location) %> +<% end %> diff --git a/app/views/activities/show.html.erb b/app/views/activities/show.html.erb new file mode 100644 index 0000000..4e77061 --- /dev/null +++ b/app/views/activities/show.html.erb @@ -0,0 +1,11 @@ +

<%= @activity.name %>

+

<%= @activity.description %>

+ +
+
+ +
+ <%= render "timer" %> +
+ +<%= link_to "Start", start_activity_path(@activity), method: :post %> -- cgit v1.2.3