Merge pull request #2518 from hennevogel/feature/scheudle_qr
Point to Giggity from the schedule page
This commit is contained in:
commit
1648d7062a
5 changed files with 35 additions and 0 deletions
|
|
@ -228,6 +228,7 @@ linters:
|
||||||
- "app/views/schedules/_schedule.html.haml"
|
- "app/views/schedules/_schedule.html.haml"
|
||||||
- "app/views/schedules/_schedule_item.html.haml"
|
- "app/views/schedules/_schedule_item.html.haml"
|
||||||
- "app/views/schedules/_schedule_tabs.html.haml"
|
- "app/views/schedules/_schedule_tabs.html.haml"
|
||||||
|
- "app/views/schedules/_qr_code_modal.html.haml"
|
||||||
- "app/views/schedules/events.html.haml"
|
- "app/views/schedules/events.html.haml"
|
||||||
- "app/views/schedules/show.html.haml"
|
- "app/views/schedules/show.html.haml"
|
||||||
- "app/views/schedules/show.xml.haml"
|
- "app/views/schedules/show.xml.haml"
|
||||||
|
|
@ -310,6 +311,7 @@ linters:
|
||||||
|
|
||||||
# Offense count: 1074
|
# Offense count: 1074
|
||||||
LineLength:
|
LineLength:
|
||||||
|
max: 150
|
||||||
exclude:
|
exclude:
|
||||||
- "app/views/admin/booths/_change_state_dropdown.html.haml"
|
- "app/views/admin/booths/_change_state_dropdown.html.haml"
|
||||||
- "app/views/admin/booths/index.html.haml"
|
- "app/views/admin/booths/index.html.haml"
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -135,6 +135,8 @@ gem 'country_select'
|
||||||
# as PDF generator
|
# as PDF generator
|
||||||
gem 'prawn-qrcode'
|
gem 'prawn-qrcode'
|
||||||
gem 'prawn-rails'
|
gem 'prawn-rails'
|
||||||
|
|
||||||
|
# for QR code generation
|
||||||
gem 'rqrcode'
|
gem 'rqrcode'
|
||||||
|
|
||||||
# to render XLS spreadsheets
|
# to render XLS spreadsheets
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ class SchedulesController < ApplicationController
|
||||||
end
|
end
|
||||||
@selected_schedules_ids.compact!
|
@selected_schedules_ids.compact!
|
||||||
@event_schedules_by_room_id = event_schedules.select { |s| @selected_schedules_ids.include?(s.schedule_id) }.group_by(&:room_id)
|
@event_schedules_by_room_id = event_schedules.select { |s| @selected_schedules_ids.include?(s.schedule_id) }.group_by(&:room_id)
|
||||||
|
@qr_code = RQRCode::QRCode.new(conference_schedule_url).as_svg(offset: 20, color: '000',
|
||||||
|
shape_rendering: 'crispEdges',
|
||||||
|
module_size: 11)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
27
app/views/schedules/_qr_code_modal.html.haml
Normal file
27
app/views/schedules/_qr_code_modal.html.haml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
/ Button trigger modal
|
||||||
|
%button.btn.btn-link.btn-lg.pull-right{ 'data-target': '#schedule-modal',
|
||||||
|
'data-toggle': 'modal',
|
||||||
|
type: 'button' }
|
||||||
|
Get the mobile app!
|
||||||
|
/ Modal
|
||||||
|
.modal.fade#schedule-modal{ 'aria-labelledby': 'schedule-modal-label', role: 'dialog', tabindex: '-1' }
|
||||||
|
.modal-dialog{ role: 'document' }
|
||||||
|
.modal-content
|
||||||
|
.modal-header
|
||||||
|
%button.close{ 'aria-label': 'Close', 'data-dismiss': 'modal', type: 'button' }
|
||||||
|
%span{ 'aria-hidden': 'true' }
|
||||||
|
%h4.modal-title#schedule-modal-label
|
||||||
|
Get the schedule on your mobile with Giggity!
|
||||||
|
.modal-body.center-block.text-center
|
||||||
|
= link_to 'https://f-droid.org/packages/net.gaast.giggity' do
|
||||||
|
%img.img-responsive{ alt: 'Get it on F-Droid', src: 'https://fdroid.gitlab.io/artwork/badge/get-it-on.png' }
|
||||||
|
%p
|
||||||
|
\...and point your phone at the QR code...
|
||||||
|
.img-responsive
|
||||||
|
= raw qr_code
|
||||||
|
.modal-footer
|
||||||
|
%p.small.text-muted.pull-left
|
||||||
|
Not free of surveilance capitalism yet? Try the
|
||||||
|
= link_to 'https://play.google.com/store/apps/details?id=net.gaast.giggity' do
|
||||||
|
google play store...
|
||||||
|
%button.btn.btn-default{ 'data-dismiss': 'modal', type: 'button' } Close
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
.visible-md-inline.visible-lg-inline
|
.visible-md-inline.visible-lg-inline
|
||||||
= render partial: 'carousel', locals: { date: date, hrs_per_slide: 3 }
|
= render partial: 'carousel', locals: { date: date, hrs_per_slide: 3 }
|
||||||
|
= render partial: 'qr_code_modal', locals: { qr_code: @qr_code }
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
// change of active tab and the button title when a date is clicked
|
// change of active tab and the button title when a date is clicked
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue