Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cookies policy consent banner "fixes #3859" #3905

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6753407
Merge pull request #3647 from AgileVentures/develop
aonomike Dec 14, 2020
5bf57d2
Merge pull request #3651 from AgileVentures/develop
mattlindsey Dec 14, 2020
6807dc9
Merge pull request #3658 from AgileVentures/staging
mattlindsey Jan 22, 2021
850f667
Merge pull request #3735 from AgileVentures/develop
tochman Jun 23, 2021
bc00d96
Merge pull request #3736 from AgileVentures/staging
tochman Jun 23, 2021
b7ed5a2
Merge pull request #3737 from AgileVentures/develop
tochman Jun 23, 2021
61471f9
Merge pull request #3738 from AgileVentures/staging
tochman Jun 23, 2021
53d3a82
Merge pull request #3740 from AgileVentures/develop
tochman Jun 23, 2021
5d9ab9b
Merge pull request #3741 from AgileVentures/staging
tochman Jun 23, 2021
dcc361b
Merge pull request #3745 from AgileVentures/develop
tochman Jun 25, 2021
d0ab483
Merge pull request #3746 from AgileVentures/staging
tochman Jun 25, 2021
20bfd93
Merge pull request #3748 from AgileVentures/develop
tochman Jun 26, 2021
011da6f
Merge pull request #3749 from AgileVentures/staging
tochman Jun 26, 2021
4eac4ca
Merge pull request #3750 from AgileVentures/develop
tochman Jun 26, 2021
b30b8cf
Merge pull request #3751 from AgileVentures/staging
tochman Jun 26, 2021
98007c1
Merge pull request #3760 from AgileVentures/develop
tochman Jul 2, 2021
5de405f
Merge pull request #3762 from AgileVentures/develop
tochman Jul 2, 2021
544c6b7
Merge pull request #3763 from AgileVentures/staging
tochman Jul 2, 2021
2ad5831
Merge pull request #3774 from AgileVentures/develop
tochman Jul 16, 2021
34ea513
Merge pull request #3775 from AgileVentures/staging
tochman Jul 16, 2021
9e8a4ac
Merge pull request #3782 from AgileVentures/develop
tochman Jul 17, 2021
2bd5851
Merge pull request #3783 from AgileVentures/staging
tochman Jul 17, 2021
b27628a
Merge pull request #3794 from AgileVentures/develop
tochman Aug 8, 2021
2a091e9
Merge pull request #3795 from AgileVentures/staging
tochman Aug 8, 2021
e22d301
Pushing staging to production (#3800)
tochman Mar 15, 2022
33b81f5
mods
wordhouse66 Aug 11, 2023
f51d4dc
add //= subscriptions css to manifest.js
wordhouse66 Aug 11, 2023
8ec8c55
added cookie consent banner
wordhouse66 Aug 16, 2023
1ae92b1
added cookie consent banner
wordhouse66 Aug 16, 2023
944df69
cookie consent banner
wordhouse66 Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ features/support/fixtures/cassettes/**
/config/master.key

/app/assets/builds/*
!/app/assets/builds/.keep
!/app/assets/builds/.keep
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ rake user:create_anonymous
rake vcr_billy_caches:reset
```

Updating the pages requires the administrator to run the `rake fetch_github:content_for_static_pages` task.
Updating the pages requires the administrator to run the `rake fetch_github:content_for_static_pages` task.
13 changes: 13 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@

@import "./actiontext.scss";

.cookies-modal {
position: fixed;
padding: 0.5rem;
z-index: 2;
left: 0.5rem;
bottom: 0.5rem;
min-width: 50%;
max-width: 24rem;
word-break: break-word;
border-radius: 6px;
background: #bad5ff;
}

.custom_menu {
width: 200px !important;
background-color: #34495e !important;
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/cookies_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class CookiesController < ApplicationController
def index
session[:cookies_accepted] = params[:cookies] if params[:cookies]
end
end
4 changes: 4 additions & 0 deletions app/helpers/cookies_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

module CookiesHelper
end
9 changes: 9 additions & 0 deletions app/views/cookies/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%= turbo_frame_tag :cookies_modal do %>
<% if session[:cookies_accepted].nil? # don't re-render if a true/false selected %>
<section class="cookies-modal">
<p>This website uses cookies. You can take a look at our privacy policy <%= link_to 'here.', '/privacy', target: '__blank' %></p>
<%= link_to "Accept cookies", cookies_path(cookies: true), method: :post %>
<%= link_to "Reject cookies", cookies_path(cookies: false), method: :post %>
</section>
<% end %>
<% end %>
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<% if current_user && current_user.incomplete? && new_user_session_url == request.referrer %>
<%= render 'layouts/require_users_profile' %>
<% end %>
<%= turbo_frame_tag :cookies_modal, src: cookies_path if session[:cookies_accepted].nil? %>

</div>

<footer id="footer">
Expand Down
3 changes: 2 additions & 1 deletion app/views/visitors/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<%= render 'layouts/require_users_profile' %>
<% end %>
<%= render 'text_and_image_trail' %>

<%= turbo_frame_tag :cookies_modal, src: cookies_path if session[:cookies_accepted].nil? %>

<footer id="footer">
<%= render 'layouts/footer' %>
</footer>
Expand Down
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ def loaderio_token
Rails.application.routes.draw do
root 'visitors#index'

get 'cookies', to: 'cookies#index'

get '/.well-known/acme-challenge/:id' => 'static_pages#letsencrypt'
get loaderio_token => 'static_pages#loaderio'
get '/get-token' => 'av_dashboard_tokens#create', as: 'get_av_dashboard_token'
Expand Down
2 changes: 1 addition & 1 deletion features/events/show_event.feature
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ Feature: Show Events
# Given the date is "2014/02/01 09:15:00 UTC"
# And I am on Events index page
# And I click on the event body for the event named "Scrum"
# Then I should be on the event "show" page for "Scrum"
# Then I should be on the event "show" page for "Scrum"