spina-conferences-primer_theme 0.1.4 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +2 -0
- data/app/controllers/spina/conferences/primer_theme/presentations_controller.rb +6 -0
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +6 -5
- data/app/views/spina/application/_navigation.html.haml +3 -4
- data/app/views/spina/conferences/primer_theme/conferences/_conference.html.haml +15 -16
- data/app/views/spina/conferences/primer_theme/conferences/_conference.ics.erb +0 -2
- data/app/views/spina/conferences/primer_theme/conferences/_event.html.haml +11 -12
- data/app/views/spina/conferences/primer_theme/conferences/_event.ics.erb +0 -2
- data/app/views/spina/conferences/primer_theme/conferences/_institution.html.haml +5 -6
- data/app/views/spina/conferences/primer_theme/conferences/_institution_logo.html.haml +4 -3
- data/app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml +13 -14
- data/app/views/spina/conferences/primer_theme/conferences/_presentation.ics.erb +0 -2
- data/app/views/spina/conferences/primer_theme/conferences/_presentation_type.html.haml +5 -6
- data/app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml +8 -9
- data/app/views/spina/pages/_committee_bio.html.haml +6 -5
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 665965738e060bd5c6c9f90e5452f9cd84f92456a6e04e6de2fe85b594ecc397
|
4
|
+
data.tar.gz: b3a31fb3bb0f867801f9f8fff03265ad9d33ec4cc8bb6acfdbe4b72ec8e8ff8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e149a65b5ef03f743d3d9249a7cbe6e1b463090d10e1af8f833dbf49cebf416cc97e899d5c1340afc12cc67101a2b202a697d719c4a2ef11c35051d8079d03c
|
7
|
+
data.tar.gz: 2fb6e336499d4b36b4cfba6521bd3dace00bc325668a618e97e55e2ac4c79de7f4fac45a3d8baf94ca9291488c5867ff49e2b5e6da77970bde371b1d8e6cd5cc
|
@@ -25,6 +25,8 @@ module Spina
|
|
25
25
|
presentation_types: [:translations],
|
26
26
|
presentations: [session: [:room], presenters: [:institution]])
|
27
27
|
.find(params[:id])
|
28
|
+
rescue ActiveRecord::RecordNotFound
|
29
|
+
send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
|
28
30
|
end
|
29
31
|
|
30
32
|
def set_tab
|
@@ -9,6 +9,10 @@ module Spina
|
|
9
9
|
|
10
10
|
def show
|
11
11
|
add_breadcrumb @presentation.name
|
12
|
+
respond_to do |format|
|
13
|
+
format.html
|
14
|
+
format.ics { head :not_found }
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
private
|
@@ -16,6 +20,8 @@ module Spina
|
|
16
20
|
def set_presentation
|
17
21
|
@presentation = Admin::Conferences::Presentation.includes(:presenters, attachments: [attachment_type: [:translations]])
|
18
22
|
.find(params[:id])
|
23
|
+
rescue ActiveRecord::RecordNotFound
|
24
|
+
send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
|
19
25
|
end
|
20
26
|
|
21
27
|
def set_conference
|
@@ -16,11 +16,11 @@ module Spina
|
|
16
16
|
def ancestors
|
17
17
|
return [] if current_page.blank?
|
18
18
|
|
19
|
-
render Primer::BreadcrumbComponent.new(mb: 4) do
|
19
|
+
render Primer::BreadcrumbComponent.new(mb: 4) do |component|
|
20
20
|
current_page.ancestors.each do |ancestor|
|
21
21
|
component.slot(:item, href: 'ancestor.materialized_path') { ancestor.menu_title }
|
22
22
|
end
|
23
|
-
component.slot(:item, selected: true) { menu_title }
|
23
|
+
component.slot(:item, selected: true) { current_page.menu_title }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -42,15 +42,16 @@ module Spina
|
|
42
42
|
t :'.title', title: current_page.present? ? current_page.seo_title : @title, suffix: current_account.name # rubocop:disable Rails/HelperInstanceVariable
|
43
43
|
end
|
44
44
|
|
45
|
-
def partable_for(*
|
45
|
+
def partable_for(*part_names, parent: current_page)
|
46
46
|
association = case parent
|
47
47
|
when Spina::Page then :page_partable
|
48
48
|
when Spina::StructureItem then :structure_partable
|
49
49
|
when Spina::Account then :layout_partable
|
50
50
|
else :partable
|
51
51
|
end
|
52
|
-
|
53
|
-
|
52
|
+
parts = parent.parts.where(name: part_names)
|
53
|
+
part_parents = parts.collect { |part| part.try(association) }
|
54
|
+
[*parts, *part_parents]
|
54
55
|
end
|
55
56
|
|
56
57
|
def calendar(name:, &block)
|
@@ -1,10 +1,9 @@
|
|
1
1
|
.Header.bg-blue.px-3.px-md-4.px-lg-5
|
2
|
-
.Header-item.
|
2
|
+
.Header-item.mt-n1.mb-n1= link_to render('logo'), root_path, class: 'Header-link'
|
3
3
|
.Header-item.Header-item--full.d-flex.d-lg-none{ aria: { hidden: true } }
|
4
|
-
|
5
|
-
%details.details-reset.text-right
|
4
|
+
%details.details-reset
|
6
5
|
%summary.btn-link.Header-link= octicon 'three-bars', height: 24
|
7
|
-
.
|
6
|
+
.px-3.px-md-4.px-lg-5.bg-blue.Popover.left-0.right-0.mt-3
|
8
7
|
= render partial: 'mobile_navigation_item', collection: main_navigation_items, cached: true
|
9
8
|
= link_to 'Conferences', frontend_conferences_url, class: %w[d-block py-2 border-top border-white-fade text-white]
|
10
9
|
= render partial: 'navigation_item', collection: main_navigation_items, cached: true
|
@@ -1,16 +1,15 @@
|
|
1
|
-
-
|
2
|
-
.d-flex.flex-
|
3
|
-
|
4
|
-
|
5
|
-
.
|
6
|
-
|
7
|
-
|
8
|
-
%
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
cities: conference.institutions.pluck(:city).uniq.to_sentence
|
1
|
+
.d-flex.flex-column.flex-md-row-reverse.flex-justify-start.flex-md-justify-between
|
2
|
+
%ul.list-style-none.d-flex.flex-wrap.flex-md-justify-end.pl-md-2.pb-2.pb-md-0{ class: dom_class(conference.institutions) }
|
3
|
+
= render partial: 'institution', collection: conference.institutions, cached: -> institution { [institution, institution.logo] }
|
4
|
+
.flex-auto
|
5
|
+
%h3.mb-1
|
6
|
+
= link_to conference.name, frontend_conference_path(conference)
|
7
|
+
%ul.text-gray.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
8
|
+
%li.mr-sm-3
|
9
|
+
= octicon 'calendar'
|
10
|
+
= t :'.dates_html', start_date: time_tag(conference.start_date, format: :date), finish_date: time_tag(conference.finish_date)
|
11
|
+
- if conference.institutions.any?
|
12
|
+
%li
|
13
|
+
= octicon 'location'
|
14
|
+
%address.d-inline= t :'.locations', institutions: conference.institutions.pluck(:name).to_sentence,
|
15
|
+
cities: conference.institutions.pluck(:city).uniq.to_sentence
|
@@ -1,12 +1,11 @@
|
|
1
|
-
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.
|
11
|
-
|
12
|
-
.text-gray= event.description.try(:html_safe)
|
1
|
+
.d-flex.flex-column.flex-sm-row
|
2
|
+
.flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-4
|
3
|
+
%span.f3-light.mb-1
|
4
|
+
= octicon 'clock', class: 'v-align-baseline'
|
5
|
+
= t :'.times_html', start_time: time_tag(event.start_time, format: :short), finish_time: time_tag(event.finish_time, format: :time)
|
6
|
+
.text-gray
|
7
|
+
= octicon 'location'
|
8
|
+
%address.d-inline= event.location
|
9
|
+
.flex-auto
|
10
|
+
%h3.mb-1= event.name
|
11
|
+
.text-gray= event.description.try(:html_safe)
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
= institution.name
|
1
|
+
%li
|
2
|
+
- if institution.logo.present?
|
3
|
+
= render partial: 'institution_logo', object: institution.logo, locals: { institution: institution }
|
4
|
+
- else
|
5
|
+
= institution.name
|
@@ -1,3 +1,4 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
1
|
+
- cache institution_logo do
|
2
|
+
- if institution_logo.file.present?
|
3
|
+
= image_tag main_app.url_for(institution_logo.file.variant(resize_to_limit: [300, 60])), srcset: srcset(institution_logo.file,
|
4
|
+
variant: { resize_to_limit: [300, 60] }), alt_description: institution.name, draggable: false, class: 'p-1'
|
@@ -1,14 +1,13 @@
|
|
1
|
-
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.
|
11
|
-
|
12
|
-
.
|
13
|
-
|
14
|
-
%address.d-inline= presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
1
|
+
.d-flex.flex-column.flex-sm-row
|
2
|
+
.flex-shrink-0.mr-sm-3.mb-3.mb-sm-0.col-sm-3
|
3
|
+
%span.f3-light.mb-1
|
4
|
+
= octicon 'clock', class: 'v-align-baseline'
|
5
|
+
= time_tag presentation.start_datetime, format: :short
|
6
|
+
.text-gray
|
7
|
+
= octicon 'location'
|
8
|
+
%address.d-inline= presentation.session.room_name
|
9
|
+
.flex-auto
|
10
|
+
%h3.mb-1= link_to presentation.title, frontend_conference_presentation_path(conference, presentation)
|
11
|
+
.text-gray
|
12
|
+
= octicon presentation.presenters.many? ? 'people' : 'person'
|
13
|
+
%address.d-inline= presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
%span.count{ title: t(:'.results') }= presentation_type.presentations.count
|
1
|
+
%li
|
2
|
+
= link_to frontend_conference_url(presentation_type.conference, presentation_type: presentation_type.id, tab: 'presentations'),
|
3
|
+
class: 'filter-item', aria: { current: @presentation_type == presentation_type ? 'page' : nil } do
|
4
|
+
= presentation_type.name.pluralize
|
5
|
+
%span.count{ title: t(:'.results') }= presentation_type.presentations.count
|
@@ -1,9 +1,8 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
4
|
-
=
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
= link_to sponsor.content(:name), sponsor.content(:website)
|
1
|
+
%li.d-inline-block.m-2.v-align-middle
|
2
|
+
- if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
|
3
|
+
= link_to sponsor.content(:website) do
|
4
|
+
= image_tag(main_app.url_for(sponsor.content(:logo).file.variant(resize_to_limit: [200, 60])),
|
5
|
+
srcset: srcset(sponsor.content(:logo).file, variant: { resize_to_limit: [200, 60] }),
|
6
|
+
alt_description: sponsor.content(:name), draggable: false)
|
7
|
+
- else
|
8
|
+
= link_to sponsor.content(:name), sponsor.content(:website)
|
@@ -2,11 +2,12 @@
|
|
2
2
|
.d-flex.flex-column.flex-md-row.flex-items-start
|
3
3
|
- cache partable_for(:profile_picture, parent: committee_bio) do
|
4
4
|
- if committee_bio.has_content?(:profile_picture) && committee_bio.content(:profile_picture).persisted?
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
.flex-shrink-0
|
6
|
+
= render Primer::AvatarComponent.new(src: src(committee_bio.content(:profile_picture).file, resize_to_fill: [150, 150]),
|
7
|
+
srcset: concat_srcset(committee_bio.content(:profile_picture).file,
|
8
|
+
variant: { resize_to_limit: [150, 150] }),
|
9
|
+
draggable: false, alt: committee_bio.content(:name), size: 150, mr: [nil, nil, 3, nil],
|
10
|
+
mb: [3, nil, 0, nil])
|
10
11
|
.flex-auto
|
11
12
|
.d-flex.flex-column.flex-md-row.mb-1
|
12
13
|
- cache partable_for(:name, :role, parent: committee_bio) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-conferences-primer_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Malčić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|