spina-conferences-primer_theme 0.3.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/spina_conferences_primer_theme_manifest.js +1 -2
  3. data/app/assets/stylesheets/spina/conferences/primer_theme/application.sass +27 -0
  4. data/app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb +16 -0
  5. data/app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb +72 -0
  6. data/app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb +42 -0
  7. data/app/controllers/spina/conferences/primer_theme/journal/application_controller.rb +13 -0
  8. data/app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb +56 -0
  9. data/app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb +48 -0
  10. data/app/helpers/spina/conferences/primer_theme/application_helper.rb +4 -4
  11. data/app/views/conferences_primer_theme/pages/embedded_form.html.haml +9 -0
  12. data/app/views/conferences_primer_theme/pages/homepage.html.haml +3 -0
  13. data/app/views/layouts/spina/conferences/primer_theme/application.html.haml +2 -1
  14. data/app/views/layouts/spina/conferences/primer_theme/{conferences.html.haml → conferences/conferences.html.haml} +0 -0
  15. data/app/views/layouts/spina/conferences/primer_theme/{presentations.html.haml → conferences/presentations.html.haml} +0 -0
  16. data/app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml +2 -0
  17. data/app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml +2 -0
  18. data/app/views/spina/application/_footer.html.haml +17 -15
  19. data/app/views/spina/application/_mobile_navigation_item.html.haml +13 -12
  20. data/app/views/spina/application/_mobile_navigation_items.html.haml +1 -1
  21. data/app/views/spina/application/_navigation.html.haml +11 -9
  22. data/app/views/spina/application/_navigation_item.html.haml +12 -11
  23. data/app/views/spina/conferences/primer_theme/conferences/{_conference.html.haml → conferences/_conference.html.haml} +0 -0
  24. data/app/views/spina/conferences/primer_theme/conferences/{_event.html.haml → conferences/_event.html.haml} +0 -0
  25. data/app/views/spina/conferences/primer_theme/conferences/{_events.html.haml → conferences/_events.html.haml} +0 -0
  26. data/app/views/spina/conferences/primer_theme/conferences/{_header.html.haml → conferences/_header.html.haml} +0 -0
  27. data/app/views/spina/conferences/primer_theme/conferences/{_institution.html.haml → conferences/_institution.html.haml} +0 -0
  28. data/app/views/spina/conferences/primer_theme/conferences/{_institution_logo.html.haml → conferences/_institution_logo.html.haml} +0 -0
  29. data/app/views/spina/conferences/primer_theme/conferences/{_presentation.html.haml → conferences/_presentation.html.haml} +0 -0
  30. data/app/views/spina/conferences/primer_theme/conferences/{_presentation_type.html.haml → conferences/_presentation_type.html.haml} +1 -1
  31. data/app/views/spina/conferences/primer_theme/conferences/{_presentations.html.haml → conferences/_presentations.html.haml} +2 -2
  32. data/app/views/spina/conferences/primer_theme/conferences/{_submission_flash.html.haml → conferences/_submission_flash.html.haml} +0 -0
  33. data/app/views/spina/conferences/primer_theme/conferences/{index.html.haml → conferences/index.html.haml} +0 -0
  34. data/app/views/spina/conferences/primer_theme/conferences/{show.html.haml → conferences/show.html.haml} +3 -3
  35. data/app/views/spina/conferences/primer_theme/{kaminari → conferences/kaminari}/_gap.html.haml +0 -0
  36. data/app/views/spina/conferences/primer_theme/{kaminari → conferences/kaminari}/_next_page.html.haml +0 -0
  37. data/app/views/spina/conferences/primer_theme/{kaminari → conferences/kaminari}/_page.html.haml +0 -0
  38. data/app/views/spina/conferences/primer_theme/{kaminari → conferences/kaminari}/_paginator.html.haml +0 -0
  39. data/app/views/spina/conferences/primer_theme/{kaminari → conferences/kaminari}/_prev_page.html.haml +0 -0
  40. data/app/views/spina/conferences/primer_theme/{presentations → conferences/presentations}/_abstract.html.haml +0 -0
  41. data/app/views/spina/conferences/primer_theme/{presentations → conferences/presentations}/_attachment.html.haml +0 -0
  42. data/app/views/spina/conferences/primer_theme/{presentations → conferences/presentations}/_attachments.html.haml +0 -0
  43. data/app/views/spina/conferences/primer_theme/{presentations → conferences/presentations}/show.html.haml +0 -0
  44. data/app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml +6 -0
  45. data/app/views/spina/conferences/primer_theme/journal/articles/show.html.haml +50 -0
  46. data/app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml +15 -0
  47. data/app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml +17 -0
  48. data/app/views/spina/conferences/primer_theme/journal/issues/_issue_cover.html.haml +6 -0
  49. data/app/views/spina/conferences/primer_theme/journal/issues/index.html.haml +10 -0
  50. data/app/views/spina/conferences/primer_theme/journal/issues/show.html.haml +18 -0
  51. data/config/initializers/themes/conferences_primer_theme.rb +19 -2
  52. data/config/locales/en.yml +75 -54
  53. data/config/routes.rb +7 -1
  54. data/lib/spina/conferences/primer_theme.rb +3 -4
  55. data/lib/spina/conferences/primer_theme/version.rb +1 -1
  56. metadata +53 -40
  57. data/app/controllers/spina/conferences/primer_theme/application_controller.rb +0 -14
  58. data/app/controllers/spina/conferences/primer_theme/conferences_controller.rb +0 -70
  59. data/app/controllers/spina/conferences/primer_theme/presentations_controller.rb +0 -40
data/config/routes.rb CHANGED
@@ -1,11 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Spina::Engine.routes.draw do
4
- namespace :frontend, path: 'conferences', module: 'conferences/primer_theme' do
4
+ namespace :frontend, path: 'conferences', module: 'conferences/primer_theme/conferences' do
5
5
  resources :conferences, only: %i[index show] do
6
6
  resources :presentations, only: [:show]
7
7
  end
8
8
  resources :presentations, only: [:show]
9
9
  get 'cookies-info', controller: 'application'
10
10
  end
11
+
12
+ namespace :frontend, path: 'journal', module: 'conferences/primer_theme/journal' do
13
+ resources :issues, only: %i[index show] do
14
+ resources :articles, only: %i[show]
15
+ end
16
+ end
11
17
  end
@@ -4,15 +4,14 @@ require 'spina'
4
4
  require 'spina/conferences/primer_theme/engine'
5
5
  require 'spina/conferences/primer_theme/breadcrumbs/builder'
6
6
  require 'spina/admin/conferences'
7
+ require 'spina/admin/journal'
7
8
  require 'octicons_helper'
8
9
  require 'view_component'
9
10
  require 'primer/view_components'
10
11
  require 'icalendar'
11
12
 
12
13
  module Spina
13
- module Conferences
14
- module PrimerTheme
15
- # Your code goes here...
16
- end
14
+ module PrimerTheme
15
+ # Your code goes here...
17
16
  end
18
17
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.3.3'
6
+ VERSION = '0.5.0'
7
7
  end
8
8
  end
9
9
  end
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.3.3
4
+ version: 0.5.0
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: 2021-04-20 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.35
61
+ version: 0.0.37
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.0.35
68
+ version: 0.0.37
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -109,47 +109,47 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: capybara
112
+ name: spina-admin-journal
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.33'
118
- type: :development
117
+ version: 0.4.0
118
+ type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.33'
124
+ version: 0.4.0
125
125
  - !ruby/object:Gem::Dependency
126
- name: dotenv-rails
126
+ name: capybara
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '2.7'
131
+ version: '3.33'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '2.7'
138
+ version: '3.33'
139
139
  - !ruby/object:Gem::Dependency
140
- name: minitest-reporters
140
+ name: dotenv-rails
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.4'
145
+ version: '2.7'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.4'
152
+ version: '2.7'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: puma
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -292,22 +292,28 @@ files:
292
292
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom.sass
293
293
  - app/assets/stylesheets/spina/conferences/primer_theme/_custom_variables.sass
294
294
  - app/assets/stylesheets/spina/conferences/primer_theme/application.sass
295
- - app/controllers/spina/conferences/primer_theme/application_controller.rb
296
- - app/controllers/spina/conferences/primer_theme/conferences_controller.rb
297
- - app/controllers/spina/conferences/primer_theme/presentations_controller.rb
295
+ - app/controllers/spina/conferences/primer_theme/conferences/application_controller.rb
296
+ - app/controllers/spina/conferences/primer_theme/conferences/conferences_controller.rb
297
+ - app/controllers/spina/conferences/primer_theme/conferences/presentations_controller.rb
298
+ - app/controllers/spina/conferences/primer_theme/journal/application_controller.rb
299
+ - app/controllers/spina/conferences/primer_theme/journal/articles_controller.rb
300
+ - app/controllers/spina/conferences/primer_theme/journal/issues_controller.rb
298
301
  - app/helpers/spina/conferences/primer_theme/application_helper.rb
299
302
  - app/helpers/spina/conferences/primer_theme/asset_helper.rb
300
303
  - app/helpers/spina/conferences/primer_theme/navigations_helper.rb
301
304
  - app/views/conferences_primer_theme/pages/about.html.haml
302
305
  - app/views/conferences_primer_theme/pages/committee.html.haml
306
+ - app/views/conferences_primer_theme/pages/embedded_form.html.haml
303
307
  - app/views/conferences_primer_theme/pages/events.html.haml
304
308
  - app/views/conferences_primer_theme/pages/homepage.html.haml
305
309
  - app/views/conferences_primer_theme/pages/information.html.haml
306
310
  - app/views/conferences_primer_theme/pages/show.html.haml
307
311
  - app/views/layouts/conferences_primer_theme/application.html.haml
308
312
  - app/views/layouts/spina/conferences/primer_theme/application.html.haml
309
- - app/views/layouts/spina/conferences/primer_theme/conferences.html.haml
310
- - app/views/layouts/spina/conferences/primer_theme/presentations.html.haml
313
+ - app/views/layouts/spina/conferences/primer_theme/conferences/conferences.html.haml
314
+ - app/views/layouts/spina/conferences/primer_theme/conferences/presentations.html.haml
315
+ - app/views/layouts/spina/conferences/primer_theme/journal/articles.html.haml
316
+ - app/views/layouts/spina/conferences/primer_theme/journal/issues.html.haml
311
317
  - app/views/spina/admin/layout_partables/texts/_form.html.haml
312
318
  - app/views/spina/application/_cookies.html.haml
313
319
  - app/views/spina/application/_current_conference_alert.html.haml
@@ -320,27 +326,34 @@ files:
320
326
  - app/views/spina/application/_navigation.html.haml
321
327
  - app/views/spina/application/_navigation_item.html.haml
322
328
  - app/views/spina/application/_text.html.haml
323
- - app/views/spina/conferences/primer_theme/conferences/_conference.html.haml
324
- - app/views/spina/conferences/primer_theme/conferences/_event.html.haml
325
- - app/views/spina/conferences/primer_theme/conferences/_events.html.haml
326
- - app/views/spina/conferences/primer_theme/conferences/_header.html.haml
327
- - app/views/spina/conferences/primer_theme/conferences/_institution.html.haml
328
- - app/views/spina/conferences/primer_theme/conferences/_institution_logo.html.haml
329
- - app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml
330
- - app/views/spina/conferences/primer_theme/conferences/_presentation_type.html.haml
331
- - app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml
332
- - app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml
333
- - app/views/spina/conferences/primer_theme/conferences/index.html.haml
334
- - app/views/spina/conferences/primer_theme/conferences/show.html.haml
335
- - app/views/spina/conferences/primer_theme/kaminari/_gap.html.haml
336
- - app/views/spina/conferences/primer_theme/kaminari/_next_page.html.haml
337
- - app/views/spina/conferences/primer_theme/kaminari/_page.html.haml
338
- - app/views/spina/conferences/primer_theme/kaminari/_paginator.html.haml
339
- - app/views/spina/conferences/primer_theme/kaminari/_prev_page.html.haml
340
- - app/views/spina/conferences/primer_theme/presentations/_abstract.html.haml
341
- - app/views/spina/conferences/primer_theme/presentations/_attachment.html.haml
342
- - app/views/spina/conferences/primer_theme/presentations/_attachments.html.haml
343
- - app/views/spina/conferences/primer_theme/presentations/show.html.haml
329
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_conference.html.haml
330
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_event.html.haml
331
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_events.html.haml
332
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_header.html.haml
333
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_institution.html.haml
334
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_institution_logo.html.haml
335
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_presentation.html.haml
336
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_presentation_type.html.haml
337
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_presentations.html.haml
338
+ - app/views/spina/conferences/primer_theme/conferences/conferences/_submission_flash.html.haml
339
+ - app/views/spina/conferences/primer_theme/conferences/conferences/index.html.haml
340
+ - app/views/spina/conferences/primer_theme/conferences/conferences/show.html.haml
341
+ - app/views/spina/conferences/primer_theme/conferences/kaminari/_gap.html.haml
342
+ - app/views/spina/conferences/primer_theme/conferences/kaminari/_next_page.html.haml
343
+ - app/views/spina/conferences/primer_theme/conferences/kaminari/_page.html.haml
344
+ - app/views/spina/conferences/primer_theme/conferences/kaminari/_paginator.html.haml
345
+ - app/views/spina/conferences/primer_theme/conferences/kaminari/_prev_page.html.haml
346
+ - app/views/spina/conferences/primer_theme/conferences/presentations/_abstract.html.haml
347
+ - app/views/spina/conferences/primer_theme/conferences/presentations/_attachment.html.haml
348
+ - app/views/spina/conferences/primer_theme/conferences/presentations/_attachments.html.haml
349
+ - app/views/spina/conferences/primer_theme/conferences/presentations/show.html.haml
350
+ - app/views/spina/conferences/primer_theme/journal/articles/_authorship.html.haml
351
+ - app/views/spina/conferences/primer_theme/journal/articles/show.html.haml
352
+ - app/views/spina/conferences/primer_theme/journal/issues/_article.html.haml
353
+ - app/views/spina/conferences/primer_theme/journal/issues/_issue.html.haml
354
+ - app/views/spina/conferences/primer_theme/journal/issues/_issue_cover.html.haml
355
+ - app/views/spina/conferences/primer_theme/journal/issues/index.html.haml
356
+ - app/views/spina/conferences/primer_theme/journal/issues/show.html.haml
344
357
  - config/initializers/assets.rb
345
358
  - config/initializers/primer.rb
346
359
  - config/initializers/themes/conferences_primer_theme.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Conferences
5
- module PrimerTheme
6
- # Base class from which controllers inherit
7
- class ApplicationController < Spina::ApplicationController
8
- def cookies_info
9
- render partial: 'cookies'
10
- end
11
- end
12
- end
13
- end
14
- end
@@ -1,70 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Conferences
5
- module PrimerTheme
6
- # User-facing controller for conferences, serving both html and ics
7
- class ConferencesController < ApplicationController
8
- before_action :set_conference, :set_tab, :set_presentation_type, :set_presentations, :set_breadcrumb, only: :show
9
- before_action :set_metadata
10
-
11
- def index
12
- @conferences = Admin::Conferences::Conference.sorted.includes(institutions: [:logo])
13
- respond_to do |format|
14
- format.html
15
- format.ics { render body: @conferences.to_ics }
16
- end
17
- end
18
-
19
- def show
20
- add_breadcrumb @conference.name
21
- respond_to do |format|
22
- format.html
23
- format.ics { render body: @conference.to_ics }
24
- end
25
- end
26
-
27
- private
28
-
29
- def set_conference
30
- @conference = Admin::Conferences::Conference.includes(:events, :institutions,
31
- presentation_types: [:translations],
32
- presentations: [session: [:room], presenters: [:institution]])
33
- .find(params[:id])
34
- @conference.view_context = view_context
35
- rescue ActiveRecord::RecordNotFound
36
- send_file Rails.root.join('public/404.html'), type: 'text/html; charset=utf-8', status: 404
37
- end
38
-
39
- def set_tab
40
- @tab = params[:tab] || 'information'
41
- end
42
-
43
- def set_presentation_type
44
- if params[:presentation_type].present?
45
- @presentation_type = @conference.presentation_types
46
- .includes(presentations: [session: [:room], presenters: [:institution]])
47
- .find(params[:presentation_type])
48
- end
49
- end
50
-
51
- def set_presentations
52
- @presentations = if @presentation_type.present?
53
- @presentation_type.presentations.page(params[:page]).per(15)
54
- else
55
- @conference.presentations.page(params[:page]).per(15)
56
- end
57
- end
58
-
59
- def set_breadcrumb
60
- add_breadcrumb Admin::Conferences::Conference.model_name.human.pluralize, frontend_conferences_path
61
- end
62
-
63
- def set_metadata
64
- @title = @conference.present? ? @conference.name : Admin::Conferences::Conference.model_name.human(count: 0)
65
- @description = @conference.present? && @conference.has_content?(:text) ? helpers.strip_tags(@conference.content(:text)) : ''
66
- end
67
- end
68
- end
69
- end
70
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Conferences
5
- module PrimerTheme
6
- # User-facing controller for presentations, serving both html and ics
7
- class PresentationsController < ApplicationController
8
- before_action :set_presentation, :set_conference, :set_breadcrumb
9
-
10
- def show
11
- add_breadcrumb @presentation.name
12
- respond_to do |format|
13
- format.html
14
- format.ics { head :not_found }
15
- end
16
- end
17
-
18
- private
19
-
20
- def set_presentation
21
- @presentation = Admin::Conferences::Presentation.includes(:presenters, attachments: [attachment_type: [:translations]])
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
25
- end
26
-
27
- def set_conference
28
- @conference = Admin::Conferences::Conference.find(params[:conference_id]) if params[:conference_id].present?
29
- end
30
-
31
- def set_breadcrumb
32
- return if @conference.blank?
33
-
34
- add_breadcrumb Admin::Conferences::Conference.model_name.human.pluralize, frontend_conferences_path
35
- add_breadcrumb @conference.name, frontend_conference_path(@conference)
36
- end
37
- end
38
- end
39
- end
40
- end