mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Fix gigitty link
The modal didn't really work on mobiles. On mobiles you also need the schedule link because it's hard to point your mobile to a QR code on your mobile...
This commit is contained in:
parent
9df85e5ae4
commit
e6049adc52
7 changed files with 31 additions and 33 deletions
|
|
@ -228,7 +228,7 @@ linters:
|
|||
- "app/views/schedules/_schedule.html.haml"
|
||||
- "app/views/schedules/_schedule_item.html.haml"
|
||||
- "app/views/schedules/_schedule_tabs.html.haml"
|
||||
- "app/views/schedules/_qr_code_modal.html.haml"
|
||||
- "app/views/schedules/app.html.haml"
|
||||
- "app/views/schedules/events.html.haml"
|
||||
- "app/views/schedules/show.html.haml"
|
||||
- "app/views/schedules/show.xml.haml"
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@ class SchedulesController < ApplicationController
|
|||
end
|
||||
@selected_schedules_ids.compact!
|
||||
@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
|
||||
|
|
@ -63,6 +60,10 @@ class SchedulesController < ApplicationController
|
|||
@tag = day.strftime('%Y-%m-%d') if day
|
||||
end
|
||||
|
||||
def app
|
||||
@qr_code = RQRCode::QRCode.new(conference_schedule_url).as_svg(offset: 20, color: '000', shape_rendering: 'crispEdges', module_size: 11)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def respond_to_options
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Ability
|
|||
event.state == 'confirmed'
|
||||
end
|
||||
|
||||
can [:show, :events], Schedule do |schedule|
|
||||
can [:show, :events, :app], Schedule do |schedule|
|
||||
schedule.program.schedule_public
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
/ 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
|
||||
19
app/views/schedules/app.html.haml
Normal file
19
app/views/schedules/app.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.container
|
||||
.page-header
|
||||
%h1
|
||||
Get the schedule on your mobile with Giggity!
|
||||
= link_to 'https://f-droid.org/packages/net.gaast.giggity' do
|
||||
%img.img-responsive.center-block{ alt: 'Get it on F-Droid', src: 'https://fdroid.gitlab.io/artwork/badge/get-it-on.png' }
|
||||
%p
|
||||
The schedule URL:
|
||||
%p.lead.text-center
|
||||
= link_to conference_schedule_url(format: :xml) do
|
||||
= conference_schedule_url(format: :xml)
|
||||
%p
|
||||
Or point your phone at the QR code:
|
||||
.img-responsive.text-center
|
||||
= raw @qr_code
|
||||
%p.text-muted
|
||||
Not free of surveilance capitalism yet? Use the
|
||||
= link_to 'https://play.google.com/store/apps/details?id=net.gaast.giggity' do
|
||||
google play store...
|
||||
|
|
@ -26,7 +26,9 @@
|
|||
|
||||
.visible-md-inline.visible-lg-inline
|
||||
= render partial: 'carousel', locals: { date: date, hrs_per_slide: 3 }
|
||||
= render partial: 'qr_code_modal', locals: { qr_code: @qr_code }
|
||||
%p.pull-right
|
||||
= link_to app_conference_schedule_path do
|
||||
Get the mobile app!
|
||||
|
||||
:javascript
|
||||
// change of active tab and the button title when a date is clicked
|
||||
|
|
|
|||
|
|
@ -193,6 +193,9 @@ Osem::Application.routes.draw do
|
|||
resources :physical_tickets, only: [:index, :show]
|
||||
resource :subscriptions, only: [:create, :destroy]
|
||||
resource :schedule, only: [:show] do
|
||||
collection do
|
||||
get 'app'
|
||||
end
|
||||
member do
|
||||
get :events
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue