spina-conferences-primer_theme 0.1.11 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spina/conferences/primer_theme/application.js +0 -1
- data/app/assets/stylesheets/spina/conferences/primer_theme/_turbolinks.sass +1 -1
- data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +1 -1
- data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +8 -6
- data/app/controllers/spina/conferences/primer_theme/presentations_controller.rb +1 -6
- data/app/helpers/spina/conferences/primer_theme/application_helper.rb +7 -26
- data/app/helpers/spina/conferences/primer_theme/asset_helper.rb +9 -11
- data/app/views/conferences_primer_theme/pages/homepage.html.haml +4 -5
- data/app/views/layouts/conferences_primer_theme/application.html.haml +3 -1
- data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +3 -2
- data/app/views/layouts/spina/conferences/primer_theme/conferences.html.haml +3 -2
- data/app/views/layouts/spina/conferences/primer_theme/presentations.html.haml +4 -2
- data/app/views/spina/admin/layout_partables/texts/_form.html.haml +4 -0
- data/app/views/spina/application/_cookies.html.haml +2 -9
- data/app/views/spina/application/_current_conference_alert.html.haml +1 -1
- data/app/views/spina/application/_footer.html.haml +5 -14
- data/app/views/spina/application/_footer_content.html.haml +13 -0
- data/app/views/spina/application/_image_collection.html.haml +2 -2
- data/app/views/spina/application/_list_item.html.haml +1 -1
- data/app/views/spina/application/_navigation_item.html.haml +1 -1
- data/app/views/spina/application/_text.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/conferences/_conference.html.haml +8 -8
- data/app/views/spina/conferences/primer_theme/conferences/_event.html.haml +10 -10
- data/app/views/spina/conferences/primer_theme/conferences/_events.html.haml +14 -13
- data/app/views/spina/conferences/primer_theme/conferences/_header.html.haml +27 -0
- data/app/views/spina/conferences/primer_theme/conferences/_information.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml +14 -12
- data/app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml +12 -13
- data/app/views/spina/conferences/primer_theme/conferences/_sponsor.html.haml +2 -2
- data/app/views/spina/conferences/primer_theme/conferences/_sponsors.html.haml +3 -3
- data/app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml +14 -0
- data/app/views/spina/conferences/primer_theme/conferences/index.html.haml +12 -9
- data/app/views/spina/conferences/primer_theme/conferences/show.html.haml +33 -63
- data/app/views/spina/conferences/primer_theme/presentations/_abstract.html.haml +1 -1
- data/app/views/spina/conferences/primer_theme/presentations/_attachment.html.haml +1 -2
- data/app/views/spina/conferences/primer_theme/presentations/_attachments.html.haml +3 -2
- data/app/views/spina/conferences/primer_theme/presentations/show.html.haml +8 -6
- data/app/views/spina/pages/_committee_bio.html.haml +22 -20
- data/app/views/spina/pages/_committee_bios.html.haml +1 -0
- data/app/views/spina/pages/_constitution.html.haml +5 -4
- data/app/views/spina/pages/_contact.html.haml +1 -1
- data/app/views/spina/pages/_document.html.haml +3 -5
- data/app/views/spina/pages/_documents.html.haml +1 -1
- data/app/views/spina/pages/_event.html.haml +10 -10
- data/app/views/spina/pages/_events_list.html.haml +2 -2
- data/app/views/spina/pages/_homepage_content.html.haml +13 -14
- data/app/views/spina/pages/_jumbotron.html.haml +1 -1
- data/app/views/spina/pages/_minutes.html.haml +1 -1
- data/app/views/spina/pages/_minutes_entry.html.haml +6 -4
- data/app/views/spina/pages/_partner_societies.html.haml +2 -2
- data/app/views/spina/pages/_partner_society.html.haml +21 -19
- data/config/initializers/primer.rb +3 -0
- data/config/initializers/themes/conferences_primer_theme.rb +1 -1
- data/config/locales/en.rb +5 -0
- data/config/locales/en.yml +12 -10
- data/db/migrate/20210206170704_change_current_conference_alert_to_text.rb +29 -0
- data/lib/spina/conferences/primer_theme.rb +2 -1
- data/lib/spina/conferences/primer_theme/breadcrumbs/builder.rb +2 -2
- data/lib/spina/conferences/primer_theme/version.rb +1 -1
- metadata +27 -22
- data/app/views/spina/conferences/primer_theme/conferences/_tab.html.haml +0 -1
@@ -0,0 +1,27 @@
|
|
1
|
+
- cache [@conference, @conference.institutions, @conference.parts.collect(&:partable), @conference.content(:gallery)&.images,
|
2
|
+
@conference.content(:sponsors)&.structure_items,
|
3
|
+
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
4
|
+
.container-lg.p-responsive.mb-4{ class: dom_class(@conference), id: dom_id(@conference) }
|
5
|
+
= render(Primer::HeadingComponent.new( mb: [1, nil, 2, nil])) { @conference.name }
|
6
|
+
%ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
7
|
+
%li.mr-sm-3.mb-1
|
8
|
+
= render Primer::OcticonComponent.new(icon: 'calendar')
|
9
|
+
= t :'.dates_html', start_date: time_tag(@conference.start_date, format: :date), finish_date: time_tag(@conference.finish_date)
|
10
|
+
- if @conference.institutions.any?
|
11
|
+
- cache @conference.institutions do
|
12
|
+
%li.mb-1
|
13
|
+
= render Primer::OcticonComponent.new(icon: 'location')
|
14
|
+
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
15
|
+
= t :'.locations', institutions: @conference.institutions.pluck(:name).to_sentence,
|
16
|
+
cities: @conference.institutions.pluck(:city).uniq.to_sentence
|
17
|
+
- if @conference.institutions.any?
|
18
|
+
%ul.list-style-none.d-flex.flex-wrap.mt-4{ class: dom_class(@conference.institutions) }
|
19
|
+
= render partial: 'institution', collection: @conference.institutions,
|
20
|
+
cached: -> institution { [institution, institution.logo] }
|
21
|
+
- cache [partable_for(:sponsors, parent: @conference), @conference.content(:sponsors)&.structure_items,
|
22
|
+
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
23
|
+
- if @conference.has_content?(:sponsors) && @conference.content(:sponsors).structure_items.any?
|
24
|
+
= render partial: 'sponsors', object: @conference.content(:sponsors)
|
25
|
+
- cache [partable_for(:gallery, parent: @conference), @conference.content(:gallery)&.images] do
|
26
|
+
- if @conference.has_content? :gallery
|
27
|
+
.mb-4= render partial: 'image_collection', object: @conference.content(:gallery), locals: { controls: true }
|
@@ -1,4 +1,4 @@
|
|
1
1
|
- if text.present?
|
2
|
-
|
2
|
+
= render(Primer::MarkdownComponent.new(my: 4)) { text.try(:html_safe) }
|
3
3
|
- else
|
4
|
-
= render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info')
|
4
|
+
= render Primer::BlankslateComponent.new(title: t(:'.no_information'), icon: 'info', my: 4)
|
@@ -1,13 +1,15 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
|
4
|
-
=
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil]) do
|
2
|
+
= render Primer::BaseComponent.new(tag: :div, flex_shrink: 0, mr: [nil, nil, 3, nil], mb: [3, nil, 0, nil], col: [nil, nil, 3, nil]) do
|
3
|
+
= render Primer::TextComponent.new(tag: :div, font_size: 3, font_weight: :light, mb: 1) do
|
4
|
+
= render Primer::OcticonComponent.new(icon: 'clock', vertical_align: :baseline)
|
5
5
|
= time_tag presentation.start_datetime, format: :short
|
6
|
-
.
|
7
|
-
=
|
8
|
-
|
9
|
-
.flex
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
= render Primer::TextComponent.new(tag: :div, color: :gray) do
|
7
|
+
= render Primer::OcticonComponent.new(icon: 'location')
|
8
|
+
= render(Primer::BaseComponent.new(tag: :address, display: :inline)) { presentation.session.room_name }
|
9
|
+
= render Primer::BaseComponent.new(tag: :div, flex: :auto) do
|
10
|
+
= render Primer::HeadingComponent.new(tag: :h3, mb: 1) do
|
11
|
+
= render(Primer::LinkComponent.new(href: frontend_conference_presentation_path(conference, presentation), data: { turbo_frame: '_top' })) { presentation.title }
|
12
|
+
= render Primer::TextComponent.new(tag: :div, color: :gray) do
|
13
|
+
= render Primer::OcticonComponent.new(icon: presentation.presenters.many? ? 'people' : 'person')
|
14
|
+
= render Primer::BaseComponent.new(tag: :address, display: :inline) do
|
15
|
+
= presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
@@ -1,27 +1,26 @@
|
|
1
|
-
- cache [@conference.presentations, @presentation_type, @
|
2
|
-
|
3
|
-
|
4
|
-
.col-12.col-lg-3.pr-lg-4.mb-4.mb-lg-0
|
1
|
+
- cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
|
2
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, nil, :row], my: 4) do
|
3
|
+
= render Primer::FlexItemComponent.new(pr: [nil, nil, nil, 4], mb: [4, nil, nil, 0], col: [12, nil, nil, 3]) do
|
5
4
|
%ul.filter-list
|
6
5
|
- cache [@conference.presentations, @presentation_type] do
|
7
6
|
%li
|
8
7
|
= link_to frontend_conference_url(@conference, tab: 'presentations'),
|
9
|
-
class: 'filter-item', aria: { current:
|
8
|
+
class: 'filter-item', aria: { current: ('page' if @presentation_type.blank?) } do
|
10
9
|
= t('.all_presentation_types')
|
11
10
|
%span.count{ title: t(:'.results') }= @conference.presentations.count
|
12
11
|
= render partial: 'presentation_type', collection: @conference.presentation_types.sorted,
|
13
12
|
cached: -> presentation_type { [presentation_type, @presentation_type] }
|
14
|
-
.
|
15
|
-
- if @
|
16
|
-
%filter-input
|
13
|
+
= render Primer::FlexItemComponent.new(col: [12, nil, nil, 9]) do
|
14
|
+
- if @presentations.any?
|
15
|
+
%filter-input{ aria: { owns: 'presentation_list' } }
|
17
16
|
.subnav.subnav-flush
|
18
|
-
.subnav-search.
|
19
|
-
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input
|
17
|
+
.subnav-search.float-left.ml-0
|
18
|
+
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
20
19
|
= octicon 'search', class: 'subnav-search-icon'
|
21
20
|
%div{ id: 'presentation_list' }
|
22
|
-
- if @
|
23
|
-
%ul{ class: dom_class(@
|
24
|
-
= render partial: 'presentation', collection: @
|
21
|
+
- if @presentations.any?
|
22
|
+
%ul{ class: dom_class(@presentations), data: { filter: { list: true } } }
|
23
|
+
= render partial: 'presentation', collection: @presentations.sorted, layout: 'list_item',
|
25
24
|
locals: { conference: @conference }, cached: -> presentation { [presentation, presentation.presenters] }
|
26
25
|
- else
|
27
26
|
= render Primer::BlankslateComponent.new(title: t(:'.no_presentations'), icon: 'mortar-board')
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
= render Primer::FlexItemComponent.new(m: 2, vertical_align: :middle) do
|
2
2
|
- if sponsor.has_content?(:logo) && sponsor.content(:logo).file.present?
|
3
3
|
= link_to sponsor.content(:website) do
|
4
4
|
= image_tag(main_app.url_for(sponsor.content(:logo).file.variant(resize_to_limit: [200, 60])),
|
5
5
|
srcset: srcset(sponsor.content(:logo).file, variant: { resize_to_limit: [200, 60] }),
|
6
6
|
alt_description: sponsor.content(:name), draggable: false)
|
7
7
|
- else
|
8
|
-
=
|
8
|
+
= render(Primer::LinkComponent.new(href: sponsor.content(:website) || '')) { sponsor.content(:name) }
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.
|
2
|
-
|
1
|
+
= render Primer::SubheadComponent.new(spacious: true) do |component|
|
2
|
+
= component.heading(tag: :h2) { t :'.title' }
|
3
3
|
|
4
|
-
|
4
|
+
= render Primer::FlexComponent.new(flex_wrap: true, classes: dom_class(sponsors), ml: -2, mr: -2, mt: -2, mb: -2) do
|
5
5
|
= render partial: 'sponsor', collection: sponsors.structure_items.sorted_by_structure,
|
6
6
|
cached: -> sponsor { [sponsor, sponsor.structure_parts.collect(&:structure_partable)] }
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- cache partable_for(:submission_url, :submission_date, :submission_text, parent: @conference) do
|
2
|
+
= render Primer::FlashComponent.new(variant: :warning, full: true, icon: 'clock', classes: dom_class(@conference)) do |component|
|
3
|
+
- cache partable_for(:submission_date, parent: @conference) do
|
4
|
+
= render Primer::TextComponent.new(tag: :div, display: :inline) do
|
5
|
+
= t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
|
6
|
+
- cache partable_for(:submission_text, parent: @conference) do
|
7
|
+
- if @conference.content(:submission_text).present?
|
8
|
+
= render(Primer::TextComponent.new(tag: :div, color: :gray, display: :inline)) { @conference.content(:submission_text).html_safe }
|
9
|
+
- cache partable_for(:submission_url, parent: @conference) do
|
10
|
+
- if @conference.content(:submission_url).present?
|
11
|
+
- component.action do
|
12
|
+
= render Primer::ButtonComponent.new(tag: :a, href: @conference.content(:submission_url), button_type: :primary,
|
13
|
+
variant: :small) do
|
14
|
+
= t :'.submit_abstract'
|
@@ -1,19 +1,22 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
-
|
4
|
-
.
|
5
|
-
.subnav
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
= render Primer::FlexComponent.new(direction: [:column_reverse, nil, :row, nil]) do
|
2
|
+
= render Primer::FlexItemComponent.new(flex_auto: true, mb: [4, nil, 0, nil]) do
|
3
|
+
%filter-input{ aria: { owns: 'conference_list' } }
|
4
|
+
- if @conferences.any?
|
5
|
+
.subnav.subnav-flush
|
6
|
+
.subnav-search.float-left.ml-0
|
7
|
+
= search_field_tag 'search', nil, class: %w[form-control subnav-search-input], aria: { label: t(:'.search') }
|
8
|
+
= render Primer::OcticonComponent.new(icon: 'search', classes: 'subnav-search-icon')
|
9
|
+
= render Primer::FlexItemComponent.new(mb: [4, nil, 0, nil]) do
|
9
10
|
= render Primer::ButtonComponent.new(tag: :a, href: frontend_conferences_url(protocol: :webcal, format: :ics), button_type: :primary,
|
10
|
-
ml: [0,
|
11
|
+
ml: [0, nil, 6, nil]) do
|
11
12
|
= render Primer::OcticonComponent.new(icon: 'calendar')
|
12
13
|
= t(:'.subscribe')
|
14
|
+
|
13
15
|
%div{ id: 'conference_list' }
|
14
16
|
- if @conferences.any?
|
15
17
|
%ul{ class: dom_class(@conferences), data: { filter: { list: true } } }
|
16
18
|
= render partial: 'conference', collection: @conferences, layout: 'list_item',
|
19
|
+
locals: { list_item_id: ->(local_assigns) { dom_id(local_assigns[:conference]) } },
|
17
20
|
cached: -> conference { [conference, conference.institutions, conference.institutions.collect(&:logo)] }
|
18
21
|
- else
|
19
22
|
= render Primer::BlankslateComponent.new(title: t(:'.no_conferences'), icon: 'mortar-board')
|
@@ -1,68 +1,38 @@
|
|
1
1
|
- if @conference.has_content?(:submission_date) && @conference.content(:submission_date) >= Date.today
|
2
|
-
- content_for
|
3
|
-
- cache partable_for(:submission_url, :submission_date, :submission_text, parent: @conference) do
|
4
|
-
= render Primer::FlashComponent.new(variant: :warning, full: true) do
|
5
|
-
- cache partable_for(:submission_url, parent: @conference) do
|
6
|
-
- if @conference.content(:submission_url).present?
|
7
|
-
= link_to t(:'.submit_abstract'), @conference.content(:submission_url),
|
8
|
-
class: %i[btn btn-primary flash-action]
|
9
|
-
- cache partable_for(:submission_date, parent: @conference) do
|
10
|
-
%p
|
11
|
-
= octicon('clock')
|
12
|
-
= t :'.submit_by_html', date: time_tag(@conference.content(:submission_date), format: :full)
|
13
|
-
- cache partable_for(:submission_text, parent: @conference) do
|
14
|
-
- if @conference.content(:submission_text).present?
|
15
|
-
%p= @conference.content(:submission_text).html_safe
|
2
|
+
- content_for(:flash) { render 'submission_flash' }
|
16
3
|
|
17
|
-
- content_for
|
18
|
-
- cache [@conference, @conference.institutions, @conference.parts.collect(&:partable), @conference.content(:gallery)&.images,
|
19
|
-
@conference.content(:sponsors)&.structure_items,
|
20
|
-
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
21
|
-
.container-lg.p-responsive.mb-4{ class: dom_class(@conference), id: dom_id(@conference) }
|
22
|
-
%h1.mb-1.mb-md-2= @conference.name
|
23
|
-
%ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
24
|
-
%li.mr-sm-3.mb-1
|
25
|
-
= octicon 'calendar'
|
26
|
-
= t :'.dates_html', start_date: time_tag(@conference.start_date, format: :date), finish_date: time_tag(@conference.finish_date)
|
27
|
-
- if @conference.institutions.any?
|
28
|
-
- cache @conference.institutions do
|
29
|
-
%li.mb-1
|
30
|
-
= octicon 'location'
|
31
|
-
%address.d-inline= t :'.locations', institutions: @conference.institutions.pluck(:name).to_sentence,
|
32
|
-
cities: @conference.institutions.pluck(:city).uniq.to_sentence
|
33
|
-
- if @conference.institutions.any?
|
34
|
-
%ul.list-style-none.d-flex.flex-wrap.mt-4{ class: dom_class(@conference.institutions) }
|
35
|
-
= render partial: 'institution', collection: @conference.institutions,
|
36
|
-
cached: -> institution { [institution, institution.logo] }
|
37
|
-
- cache [partable_for(:sponsors, parent: @conference), @conference.content(:sponsors)&.structure_items,
|
38
|
-
@conference.content(:sponsors)&.structure_items&.collect_concat(&:structure_parts)&.collect(&:structure_partable)] do
|
39
|
-
- if @conference.has_content?(:sponsors) && @conference.content(:sponsors).structure_items.any?
|
40
|
-
= render partial: 'sponsors', object: @conference.content(:sponsors)
|
41
|
-
- cache [partable_for(:gallery, parent: @conference), @conference.content(:gallery)&.images] do
|
42
|
-
- if @conference.has_content? :gallery
|
43
|
-
.mb-4= render partial: 'image_collection', object: @conference.content(:gallery), locals: { controls: true }
|
4
|
+
- content_for(:header) { render 'header' }
|
44
5
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
6
|
+
= turbo_frame_tag 'conference_tabs' do
|
7
|
+
= render Primer::UnderlineNavComponent.new do |component|
|
8
|
+
- component.body(role: 'tablist') do
|
9
|
+
= render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'information',
|
10
|
+
presentation_type: @presentation_type&.id),
|
11
|
+
aria: { selected: (@tab == 'information').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
12
|
+
= t(:'.tabs.information')
|
13
|
+
= render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'presentations',
|
14
|
+
presentation_type: @presentation_type&.id),
|
15
|
+
aria: { selected: (@tab == 'presentations').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
16
|
+
= t(:'.tabs.presentations')
|
17
|
+
= render Primer::LinkComponent.new(href: frontend_conference_url(@conference, tab: 'events',
|
18
|
+
presentation_type: @presentation_type&.id),
|
19
|
+
aria: { selected: (@tab == 'events').to_s }, classes: 'UnderlineNav-item', role: 'tab') do
|
20
|
+
= t(:'.tabs.events')
|
21
|
+
- component.actions do
|
22
|
+
= render Primer::ButtonComponent.new(tag: :a, href: frontend_conference_url(@conference, protocol: :webcal, format: :ics),
|
23
|
+
button_type: :primary, variant: :small) do
|
24
|
+
= render Primer::OcticonComponent.new(icon: 'calendar')
|
25
|
+
= t(:'.subscribe')
|
26
|
+
- case @tab
|
27
|
+
- when 'information'
|
61
28
|
- cache [partable_for(:text, parent: @conference), @tab] do
|
62
|
-
= render partial: 'information',
|
63
|
-
|
64
|
-
- cache [@conference.presentations, @presentation_type, @
|
65
|
-
|
66
|
-
|
29
|
+
= render partial: 'information', locals: { text: (@conference.content(:text) if @conference.has_content? :text) }
|
30
|
+
- when 'presentations'
|
31
|
+
- cache [@conference.presentations, @presentation_type, @presentations, @presentations.collect(&:presenters), @tab] do
|
32
|
+
= render partial: 'presentations'
|
33
|
+
- when 'events'
|
67
34
|
- cache [@conference.events, @tab] do
|
68
|
-
= render partial: 'events',
|
35
|
+
= render partial: 'events', locals: { events: @conference.events }
|
36
|
+
- else
|
37
|
+
= render Primer::BlankslateComponent.new(title: t('.no_tab'), description: t('.tab_does_not_exist', tab: @tab), icon: 'x-circle',
|
38
|
+
my: 4)
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
= render(Primer::MarkdownComponent.new(my: 4)) { abstract.html_safe }
|
@@ -1,6 +1,5 @@
|
|
1
1
|
- cache [attachment, attachment.attachment] do
|
2
2
|
- unless attachment.attachment.blank?
|
3
|
-
=
|
4
|
-
href: main_app.rails_blob_path(attachment.attachment.file, disposition: :attachment)) do
|
3
|
+
= component.button(tag: :a, href: main_app.rails_blob_path(attachment.attachment.file, disposition: :attachment)) do
|
5
4
|
= render Primer::OcticonComponent.new(icon: 'download')
|
6
5
|
= attachment.name
|
@@ -1,4 +1,5 @@
|
|
1
1
|
- cache [attachments, attachments.collect(&:attachment)] do
|
2
2
|
- if attachments.any?
|
3
|
-
.
|
4
|
-
= render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] }
|
3
|
+
= render Primer::ButtonGroupComponent.new(mt: 1) do |component|
|
4
|
+
= render partial: 'attachment', collection: attachments, cached: -> attachment { [attachment, attachment.attachment] },
|
5
|
+
locals: { component: component }
|
@@ -1,16 +1,18 @@
|
|
1
1
|
- cache [@presentation, @presentation.presenters, @presentation.attachments.collect(&:attachment)] do
|
2
2
|
- cache [@presentation, @presentation.presenters] do
|
3
|
-
|
3
|
+
= render(Primer::HeadingComponent.new(mb: [1, nil, 2, nil])) { @presentation.title }
|
4
4
|
%ul.text-gray-dark.list-style-none.d-flex.flex-column.flex-sm-row.flex-wrap
|
5
5
|
%li.mr-sm-3.mb-1
|
6
|
-
=
|
7
|
-
|
6
|
+
= render Primer::OcticonComponent.new(icon: @presentation.presenters.many? ? 'people' : 'person')
|
7
|
+
= render Primer::TextComponent.new(tag: :address, display: :inline) do
|
8
|
+
= @presentation.presenters.collect(&:full_name_and_institution).to_sentence
|
8
9
|
%li.mr-sm-3.mb-1
|
9
|
-
=
|
10
|
+
= render Primer::OcticonComponent.new(icon: 'clock')
|
10
11
|
= time_tag @presentation.start_datetime, format: :short
|
11
12
|
%li.mb-1
|
12
|
-
=
|
13
|
-
|
13
|
+
= render Primer::OcticonComponent.new(icon: 'location')
|
14
|
+
= render Primer::TextComponent.new(tag: :address, display: :inline) do
|
15
|
+
= t :'.room_and_institution', room: @presentation.session.room_name, institution: @presentation.room.institution.name
|
14
16
|
|
15
17
|
= render partial: 'attachments', object: @presentation.attachments
|
16
18
|
= render partial: 'abstract', object: @presentation.abstract
|
@@ -1,34 +1,36 @@
|
|
1
1
|
- cache [committee_bio, committee_bio.structure_parts.collect(&:structure_partable)] do
|
2
|
-
.
|
2
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], align_items: :start) do
|
3
3
|
- cache partable_for(:profile_picture, parent: committee_bio) do
|
4
|
-
- if committee_bio.has_content?(:profile_picture) && committee_bio.content(:profile_picture).persisted?
|
5
|
-
.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
.d-flex.flex-column.flex-md-row.mb-1
|
4
|
+
- if committee_bio.has_content?(:profile_picture) && committee_bio.content(:profile_picture).persisted? && committee_bio.content(:profile_picture).file.present?
|
5
|
+
= render Primer::AvatarComponent.new(src: main_app.url_for(committee_bio.content(:profile_picture).file.variant(resize_to_fill: [150, 150])),
|
6
|
+
srcset: srcset_string(committee_bio.content(:profile_picture).file,
|
7
|
+
variant: { resize_to_limit: [150, 150] }),
|
8
|
+
draggable: false, alt: committee_bio.content(:name), size: 150, mr: [nil, nil, 3, nil],
|
9
|
+
mb: [3, nil, 0, nil], flex_shrink: 0)
|
10
|
+
= render Primer::FlexItemComponent.new(flex_auto: true) do
|
11
|
+
= render Primer::FlexComponent.new(direction: [:column, nil, :row, nil], mb: 1) do
|
13
12
|
- cache partable_for(:name, :role, :institution, parent: committee_bio) do
|
14
|
-
.
|
15
|
-
- if committee_bio.has_content?(:name)
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
= render Primer::BoxComponent.new do
|
14
|
+
- if committee_bio.has_content?(:name)
|
15
|
+
= render(Primer::HeadingComponent.new(tag: :h3)) do
|
16
|
+
- if committee_bio.has_content?(:role)
|
17
|
+
= t :'.name_and_role', name: committee_bio.content(:name), role: committee_bio.content(:role)
|
18
|
+
- else
|
19
|
+
= committee_bio.content(:name)
|
19
20
|
- if committee_bio.has_content?(:institution)
|
20
|
-
|
21
|
-
.
|
21
|
+
= render(Primer::HeadingComponent.new(tag: :h4)) { committee_bio.content(:institution) }
|
22
|
+
= render Primer::ButtonGroupComponent.new(mt: [1, nil, 0, nil], ml: [nil, nil, 1, nil],
|
23
|
+
aria: { label: t(:'.contact_buttons') }) do |component|
|
22
24
|
- cache partable_for(:twitter_profile, parent: committee_bio) do
|
23
25
|
- if committee_bio.has_content?(:twitter_profile)
|
24
|
-
=
|
26
|
+
= component.button(tag: :a, href: committee_bio.content(:twitter_profile)) do
|
25
27
|
= render Primer::OcticonComponent.new(icon: 'link-external')
|
26
28
|
= t(:'.twitter')
|
27
29
|
- cache partable_for(:facebook_profile, parent: committee_bio) do
|
28
30
|
- if committee_bio.has_content?(:facebook_profile)
|
29
|
-
=
|
31
|
+
= component.button(tag: :a, href: committee_bio.content(:facebook_profile)) do
|
30
32
|
= render Primer::OcticonComponent.new(icon: 'link-external')
|
31
33
|
= t(:'.facebook')
|
32
34
|
- cache partable_for(:bio, parent: committee_bio) do
|
33
35
|
- if committee_bio.has_content?(:bio)
|
34
|
-
|
36
|
+
= render(Primer::TextComponent.new(tag: :div, color: :gray_light)) { committee_bio.content(:bio).try(:html_safe) }
|
@@ -1,6 +1,7 @@
|
|
1
1
|
- if committee_bios.structure_items.any?
|
2
2
|
%ul{ class: dom_class(committee_bios), id: dom_id(committee_bios) }
|
3
3
|
= render partial: 'committee_bio', collection: committee_bios.structure_items.sorted_by_structure, layout: 'list_item',
|
4
|
+
locals: { list_item_id: ->(local_assigns) { dom_id(local_assigns[:committee_bio]) } },
|
4
5
|
cached: ->(committee_bio) { [committee_bio, committee_bio.structure_parts.collect(&:structure_partable)] }
|
5
6
|
- else
|
6
7
|
= render Primer::BlankslateComponent.new(title: t(:'.no_bios'), icon: 'file')
|
@@ -1,11 +1,12 @@
|
|
1
1
|
= render Primer::SubheadComponent.new do |component|
|
2
|
-
= component.
|
2
|
+
= component.heading { t :'.title' }
|
3
3
|
|
4
4
|
- if constitution.present?
|
5
|
-
.py
|
6
|
-
|
5
|
+
= render Primer::FlexComponent.new(align_items: :center, py: 1) do
|
6
|
+
= render Primer::FlexItemComponent.new(flex_auto: true, pr: 1) do
|
7
|
+
= t :'.uploaded', date: l(constitution.created_at.to_date, format: :long)
|
7
8
|
= render Primer::ButtonComponent.new(tag: :a, href: main_app.rails_blob_path(constitution, disposition: :attachment), ml: 2) do
|
8
9
|
= render Primer::OcticonComponent.new(icon: 'desktop-download')
|
9
|
-
= t
|
10
|
+
= t :'.download'
|
10
11
|
- else
|
11
12
|
= render Primer::BlankslateComponent.new(title: t(:'.no_constitution'), icon: 'law')
|
@@ -1,10 +1,8 @@
|
|
1
1
|
- cache [document, document.structure_parts.collect(&:structure_partable)] do
|
2
2
|
%li.list-style-none.py-1.d-flex.flex-items-center
|
3
3
|
- cache partable_for(:name, parent: document) do
|
4
|
-
|
5
|
-
|
6
|
-
- else
|
7
|
-
%h3.flex-auto= t :'.no_name'
|
4
|
+
= render Primer::TextComponent.new(tag: :div, flex: :auto) do
|
5
|
+
= document.has_content?(:name) ? document.content(:name) : :'.no_name'
|
8
6
|
- cache partable_for(:attachment, parent: document) do
|
9
7
|
- if document.has_content?(:attachment) && document.content(:attachment).persisted?
|
10
8
|
= render Primer::ButtonComponent.new(tag: :a, ml: 2,
|
@@ -12,4 +10,4 @@
|
|
12
10
|
= render Primer::OcticonComponent.new(icon: 'desktop-download')
|
13
11
|
= t(:'.download')
|
14
12
|
- else
|
15
|
-
.
|
13
|
+
= render(Primer::TextComponent.new(tag: :div, font_size: 6, color: :gray)) { t :'.no_file' }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- if documents.present? && documents.structure_items.any?
|
2
2
|
= render Primer::SubheadComponent.new do |component|
|
3
|
-
= component.
|
3
|
+
= component.heading { t :'.title' }
|
4
4
|
|
5
5
|
%ul{ class: dom_class(documents), id: dom_id(documents) }
|
6
6
|
= render partial: 'document', collection: documents.structure_items.sorted_by_structure,
|