spina-admin-journal 0.5.0 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/spina_admin_journal_manifest.js +5 -2
  3. data/app/assets/javascripts/spina/admin/journal/application.js +0 -0
  4. data/app/components/spina/admin/journal/affiliations_list_component.rb +32 -0
  5. data/app/components/spina/admin/journal/application_component.rb +11 -0
  6. data/app/components/spina/admin/journal/articles_list_component.rb +54 -0
  7. data/app/components/spina/admin/journal/authors_list_component.rb +37 -0
  8. data/app/components/spina/admin/journal/authorships_list_component.rb +45 -0
  9. data/app/components/spina/admin/journal/empty_list_component.html.haml +1 -0
  10. data/app/components/spina/admin/journal/empty_list_component.rb +14 -0
  11. data/app/components/spina/admin/journal/institutions_list_component.rb +32 -0
  12. data/app/components/spina/admin/journal/issues_list_component.rb +47 -0
  13. data/app/components/spina/admin/journal/licences_list_component.rb +32 -0
  14. data/app/components/spina/admin/journal/list_component.html.haml +10 -0
  15. data/app/components/spina/admin/journal/list_component.rb +22 -0
  16. data/app/components/spina/admin/journal/list_item_component.html.haml +17 -0
  17. data/app/components/spina/admin/journal/list_item_component.rb +23 -0
  18. data/app/components/spina/admin/journal/volumes_list_component.rb +34 -0
  19. data/app/controllers/spina/admin/journal/application_controller.rb +3 -1
  20. data/app/controllers/spina/admin/journal/articles_controller.rb +14 -25
  21. data/app/controllers/spina/admin/journal/authors_controller.rb +15 -28
  22. data/app/controllers/spina/admin/journal/institutions_controller.rb +7 -5
  23. data/app/controllers/spina/admin/journal/issues_controller.rb +17 -24
  24. data/app/controllers/spina/admin/journal/journals_controller.rb +4 -3
  25. data/app/controllers/spina/admin/journal/licences_controller.rb +7 -5
  26. data/app/controllers/spina/admin/journal/volumes_controller.rb +9 -20
  27. data/app/models/spina/parts/admin/journal/page_range.rb +31 -0
  28. data/app/views/spina/admin/hooks/journal/_primary_navigation.html.haml +35 -26
  29. data/app/views/spina/admin/journal/articles/_form.html.haml +23 -24
  30. data/app/views/spina/admin/journal/articles/_form_authors.html.haml +1 -15
  31. data/app/views/spina/admin/journal/articles/_form_details.html.haml +27 -56
  32. data/app/views/spina/admin/journal/articles/index.html.haml +7 -17
  33. data/app/views/spina/admin/journal/authors/_form.html.haml +24 -24
  34. data/app/views/spina/admin/journal/authors/_form_affiliation.html.haml +8 -20
  35. data/app/views/spina/admin/journal/authors/_form_articles.html.haml +1 -18
  36. data/app/views/spina/admin/journal/authors/_form_details.html.haml +2 -6
  37. data/app/views/spina/admin/journal/authors/index.html.haml +7 -15
  38. data/app/views/spina/admin/journal/institutions/_form.html.haml +24 -24
  39. data/app/views/spina/admin/journal/institutions/_form_details.html.haml +2 -8
  40. data/app/views/spina/admin/journal/institutions/_form_view_affiliations.html.haml +1 -10
  41. data/app/views/spina/admin/journal/institutions/index.html.haml +7 -15
  42. data/app/views/spina/admin/journal/issues/_form.html.haml +23 -23
  43. data/app/views/spina/admin/journal/issues/_form_articles.html.haml +1 -14
  44. data/app/views/spina/admin/journal/issues/_form_details.html.haml +13 -28
  45. data/app/views/spina/admin/journal/issues/index.html.haml +7 -16
  46. data/app/views/spina/admin/journal/journals/_form.html.haml +22 -32
  47. data/app/views/spina/admin/journal/licences/_form.html.haml +19 -34
  48. data/app/views/spina/admin/journal/licences/index.html.haml +7 -16
  49. data/app/views/spina/admin/journal/volumes/_form.html.haml +25 -12
  50. data/app/views/spina/admin/journal/volumes/_form_details.html.haml +4 -10
  51. data/app/views/spina/admin/journal/volumes/_form_issues.html.haml +1 -13
  52. data/app/views/spina/admin/journal/volumes/index.html.haml +7 -16
  53. data/app/views/spina/admin/parts/admin/journal/page_ranges/_form.html.haml +6 -0
  54. data/config/locales/en.yml +25 -3
  55. data/config/routes.rb +5 -5
  56. data/db/migrate/20210626153728_create_spina_parts_admin_journal_page_ranges.rb +7 -0
  57. data/lib/spina/admin/journal/engine.rb +18 -0
  58. data/lib/spina/admin/journal/version.rb +1 -1
  59. data/lib/spina/admin/journal.rb +1 -0
  60. metadata +50 -65
  61. data/app/assets/javascripts/spina/admin/journal/application.es6 +0 -72
  62. data/app/views/layouts/spina/admin/journal/articles.html.haml +0 -10
  63. data/app/views/layouts/spina/admin/journal/authors.html.haml +0 -10
  64. data/app/views/layouts/spina/admin/journal/institutions.html.haml +0 -10
  65. data/app/views/layouts/spina/admin/journal/issues.html.haml +0 -10
  66. data/app/views/layouts/spina/admin/journal/journals.html.haml +0 -10
  67. data/app/views/layouts/spina/admin/journal/licences.html.haml +0 -10
  68. data/app/views/layouts/spina/admin/journal/volumes.html.haml +0 -10
  69. data/app/views/spina/admin/journal/affiliations/_affiliation.html.haml +0 -8
  70. data/app/views/spina/admin/journal/application/_empty_list.html.haml +0 -3
  71. data/app/views/spina/admin/journal/articles/_article.html.haml +0 -10
  72. data/app/views/spina/admin/journal/authors/_author.html.haml +0 -8
  73. data/app/views/spina/admin/journal/authorships/_authorship.html.haml +0 -9
  74. data/app/views/spina/admin/journal/institutions/_institution.html.haml +0 -9
  75. data/app/views/spina/admin/journal/issues/_issue.html.haml +0 -9
  76. data/app/views/spina/admin/journal/journals/index.html.haml +0 -27
  77. data/app/views/spina/admin/journal/licences/_licence.html.haml +0 -11
  78. data/app/views/spina/admin/journal/volumes/_volume.html.haml +0 -7
  79. data/vendor/assets/javascripts/spina/admin/journal/html5sortable.js +0 -1295
@@ -1,8 +0,0 @@
1
- %tr{ data: { id: author.id } }
2
- %td= author.primary_affiliation.name
3
- %td= author.primary_affiliation.institution.nil? ? '' : author.primary_affiliation.institution.name
4
- %td= author.articles.count
5
- %td.nowrap.align-right
6
- = link_to edit_admin_journal_author_path(author.id), class: 'button button-link' do
7
- = icon 'pencil-outline'
8
- = t '.view'
@@ -1,9 +0,0 @@
1
- %tr{ data: { id: authorship.id } }
2
- %td.position-display= authorship.position
3
- %td= authorship.affiliation.name
4
- %td= authorship.affiliation.institution.name
5
- %td= authorship.affiliation.articles.count
6
- %td.nowrap.align-right
7
- = link_to edit_admin_journal_author_path(authorship.affiliation.author.id), class: 'button button-link' do
8
- = icon 'pencil-outline'
9
- = t '.view'
@@ -1,9 +0,0 @@
1
- %tr{ data: { id: institution.id } }
2
- %td
3
- = link_to institution.name, edit_admin_journal_institution_path(institution)
4
- %td
5
- = institution.affiliations.count
6
- %td.nowrap.align-right
7
- = link_to edit_admin_journal_institution_path(institution), class: 'button button-link' do
8
- = icon 'pencil-outline'
9
- = t '.edit'
@@ -1,9 +0,0 @@
1
- %tr{ data: { id: issue.id } }
2
- %td= issue.volume.number
3
- %td.position-display= issue.number
4
- %td= issue.title
5
- %td= time_tag issue.date, format: :iso8601
6
- %td.nowrap.align-right
7
- = link_to edit_admin_journal_issue_path(issue.id), class: 'button button-link' do
8
- = icon 'pencil-outline'
9
- = t '.view'
@@ -1,27 +0,0 @@
1
- - content_for :header_actions do
2
- = link_to new_admin_journal_journal_path, class: %w[button button-primary], style: 'margin-right: 0' do
3
- = icon 'plus'
4
- = t '.new'
5
-
6
- .well
7
- .table-container
8
- %table.table
9
- %thead
10
- %tr
11
- %th= ::Spina::Admin::Journal::Journal.human_attribute_name :name
12
- %th
13
-
14
- %tbody
15
- - if @journals.any?
16
- - @journals.each do |journal|
17
- %tr
18
- %td
19
- = journal.name
20
- %td.nowrap.align-right
21
- = link_to spina.edit_admin_journal_journal_path(journal), class: %w[button button-link] do
22
- = icon 'pencil-outline'
23
-
24
- - else
25
- %tr
26
- %td.align-center{colspan: 2}
27
- %em= t '.no_journals'
@@ -1,11 +0,0 @@
1
- %tr{ data: { id: licence.id } }
2
- %td
3
- = link_to licence.name, edit_admin_journal_licence_path(licence)
4
- %td
5
- = licence.abbreviated_name
6
- %td
7
- = licence.articles.count
8
- %td.nowrap.align-right
9
- = link_to edit_admin_journal_licence_path(licence), class: 'button button-link' do
10
- = icon 'pencil-outline'
11
- = t '.edit'
@@ -1,7 +0,0 @@
1
- %tr{ data: { id: volume.id } }
2
- %td.position-display= volume.number
3
- %td= volume.issues.any? ? time_tag(volume.issues.first.date, format: :year) : t('.no_date')
4
- %td.nowrap.align-right
5
- = link_to edit_admin_journal_volume_path(volume.id), class: 'button button-link' do
6
- = icon 'pencil-outline'
7
- = t '.view'