Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #256 from TechforgoodCAST/dev
Browse files Browse the repository at this point in the history
v0.3.21
  • Loading branch information
jdudley1123 authored Apr 8, 2020
2 parents 6a6b9ba + 17a2fed commit 7911a0e
Show file tree
Hide file tree
Showing 4 changed files with 527 additions and 428 deletions.
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ GEM
addressable (>= 2.3.2)
nokogiri
safely_block (>= 0.1.1)
ahoy_matey (3.0.1)
ahoy_matey (3.0.2)
activesupport (>= 5)
device_detector
geocoder (>= 1.4.5)
Expand All @@ -85,7 +85,7 @@ GEM
msgpack (~> 1.0)
builder (3.2.4)
byebug (11.1.1)
capybara (3.31.0)
capybara (3.32.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
Expand Down Expand Up @@ -155,7 +155,7 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.4.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -177,15 +177,15 @@ GEM
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
parallel (1.19.1)
parser (2.7.0.5)
parser (2.7.1.0)
ast (~> 2.4.0)
pg (1.2.3)
pg (1.2.3-x64-mingw32)
polyamorous (2.3.2)
activerecord (>= 5.2.1)
psych (3.1.0)
psych (3.1.0-x64-mingw32)
public_suffix (4.0.3)
public_suffix (4.0.4)
puma (3.12.4)
pundit (2.0.1)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -281,7 +281,7 @@ GEM
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo-data (1.2019.3)
tzinfo (>= 1.0.0)
Expand All @@ -299,7 +299,7 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (5.0.0)
webpacker (5.0.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
Expand Down
6 changes: 6 additions & 0 deletions app/controllers/offers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ def show
end

@offer = Offer.find(params[:id])

previous_url = URI(request.referer || '').path
if previous_url.include? "topic"
session[:previous_url] = previous_url
end
@back_url = session[:previous_url]
end
end
6 changes: 3 additions & 3 deletions app/views/offers/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= render partial: 'projects/subnav' %>

<div class="max-w-3xl mx-auto px-4 my-8">
<p class="mb-6"><%= link_to '‹ Back', :back, class: 'underline' %></p>
<p class="mb-6"><%= link_to '‹ Back', @back_url, class: 'underline' %></p>
<%= render partial: 'layouts/notices' %>

<div class="card">
Expand All @@ -23,8 +23,8 @@

<div class="mb-8">
<% if current_user.is_project_member?(@project, %w[contributor mentor]) %>
<% link = @offer.sign_up_link || project_offer_book_path(@project, @offer) %>
<% link_id = @offer.sign_up_link.nil? ? 'email-support' : 'external-support' %>
<% link = @offer.sign_up_link.blank? ? project_offer_book_path(@project, @offer) : @offer.sign_up_link %>
<% link_id = @offer.sign_up_link.blank? ? 'email-support' : 'external-support' %>
<%= link_to 'Book your place', link, class: 'btn bg-orange-500 hover:bg-orange-600 text-white ', id: link_id %>
<% end %>
</div>
Expand Down
Loading

0 comments on commit 7911a0e

Please sign in to comment.