spina-admin-journal 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c0a0d703a86719e315f9ea84b71b62a8ca32dff43d33ba9b012dc924f550b4e
4
- data.tar.gz: c3c548eb605e39ecd8b2bfe56c6343e9187c8bb7c8747fc8c7169240d2e160ed
3
+ metadata.gz: d17b7c3f700ab8ee1935120ec11f228117c6db7085a7960c8382f0d54d81e508
4
+ data.tar.gz: f711f066d315fe44115e50420eeade827aaf83a2451cc0c6dd29cc4aec290b89
5
5
  SHA512:
6
- metadata.gz: ff8186db67c005d436664f43492133268aa44b7af675076b2e16a40764920f5c9403f236964d57040aa9388b4b1540bca5e448fb63874c06cab8f644af687db4
7
- data.tar.gz: f66bce803e4e7269991dc0199b32eb05e33b7c11ae555a7971105dfc1f1bcb24fdec3c6eb7b1571abb27d95317d5f3165656fedf4ae7e17a00b33786de472e2c
6
+ metadata.gz: d8964198f6c9c720f9678acb9fb227a32812c2bc4d3de17f3761b77ae59789d386711b9285a658a5a2cc15237b922e75a28eac9b344835e6c3772021b64c4bc8
7
+ data.tar.gz: aea65ca8967a73a0b9a0c83964bc19445ea668eed7964681e19625d242a3ff11c8e290d7ef2564130d6caae4a2dbb16c9054c25867c3be1f8bd413c7c4f40118
@@ -5,6 +5,8 @@ module Spina
5
5
  module Journal
6
6
  # Custom controller for journal plugin. Sets the layout and adds a flash type.
7
7
  class ApplicationController < AdminController
8
+ helper ::Spina::Engine.routes.url_helpers
9
+
8
10
  add_flash_types :success
9
11
 
10
12
  layout :admin_layout, only: %i[new edit]
@@ -85,7 +85,7 @@ module Spina
85
85
  private
86
86
 
87
87
  def article_params
88
- params.require(:admin_journal_article).permit(PARAMS)
88
+ params.require(:article).permit(PARAMS)
89
89
  end
90
90
 
91
91
  def sort_params
@@ -64,13 +64,13 @@ module Spina
64
64
  private
65
65
 
66
66
  def author_params
67
- params.require(:admin_journal_author).permit(:primary_affiliation_index,
68
- affiliations_attributes: %i[id institution_id first_name
69
- surname])
67
+ params.require(:author).permit(:primary_affiliation_index,
68
+ affiliations_attributes: %i[id institution_id first_name
69
+ surname])
70
70
  end
71
71
 
72
72
  def modified_params
73
- primary_affiliation_index = params[:admin_journal_author][:primary_affiliation_index]
73
+ primary_affiliation_index = params[:author][:primary_affiliation_index]
74
74
  new_params = author_params.except :primary_affiliation_index
75
75
  unless new_params[:affiliations_attributes].nil? || primary_affiliation_index.nil?
76
76
  new_params[:affiliations_attributes].each_key do |index|
@@ -50,7 +50,7 @@ module Spina
50
50
  private
51
51
 
52
52
  def institution_params
53
- params.require(:admin_journal_institution).permit(:name)
53
+ params.require(:institution).permit(:name)
54
54
  end
55
55
 
56
56
  def set_breadcrumb
@@ -99,7 +99,7 @@ module Spina
99
99
  end
100
100
 
101
101
  def issue_params
102
- params.require(:admin_journal_issue).permit(PARAMS)
102
+ params.require(:issue).permit(PARAMS)
103
103
  end
104
104
 
105
105
  def sort_params
@@ -65,7 +65,7 @@ module Spina
65
65
  end
66
66
 
67
67
  def journal_params
68
- params.require(:admin_journal_journal).permit(PARAMS)
68
+ params.require(:journal).permit(PARAMS)
69
69
  end
70
70
  end
71
71
  end
@@ -68,7 +68,7 @@ module Spina
68
68
  private
69
69
 
70
70
  def licence_params
71
- params.require(:admin_journal_licence).permit(PARAMS)
71
+ params.require(:licence).permit(PARAMS)
72
72
  end
73
73
 
74
74
  def set_breadcrumb
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: { close_notification: true } do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @article, html: { autocomplete: "off" } do |f|
11
+ = form_for [:admin_journal, @article], html: { autocomplete: "off" } do |f|
12
12
  %header#header
13
13
  = render partial: 'spina/admin/shared/breadcrumbs'
14
14
 
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: {close_notification: true} do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @author, html: {autocomplete: "off"} do |f|
11
+ = form_for [:admin_journal, @author], html: {autocomplete: "off"} do |f|
12
12
  %header#header
13
13
  = render partial: 'spina/admin/shared/breadcrumbs'
14
14
 
@@ -17,4 +17,4 @@
17
17
  .page-form-label
18
18
  = t '.primary'
19
19
  .page-form-content
20
- = radio_button_tag 'admin_journal_author[primary_affiliation_index]', ff.index, ff.object.status == 'primary'
20
+ = radio_button_tag 'author[primary_affiliation_index]', ff.index, ff.object.status == 'primary'
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: { close_notification: true } do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @institution, html: {autocomplete: "off"} do |f|
11
+ = form_for [:admin_journal, @institution], html: {autocomplete: "off"} do |f|
12
12
  %header#header
13
13
  = render partial: 'spina/admin/shared/breadcrumbs'
14
14
 
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: { close_notification: true } do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @issue, html: { autocomplete: 'off' } do |f|
11
+ = form_for [:admin_journal, @issue], html: { autocomplete: 'off' } do |f|
12
12
  %header#header
13
13
  = render partial: 'spina/admin/shared/breadcrumbs'
14
14
 
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: { close_notification: true } do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @journal, html: { autocomplete: "off" } do |f|
11
+ = form_for [:admin_journal, @journal], html: { autocomplete: "off" } do |f|
12
12
  %header#header
13
13
  .breadcrumbs
14
14
  = render_breadcrumbs
@@ -8,7 +8,7 @@
8
8
  = link_to '#', data: { close_notification: true } do
9
9
  = icon 'cross'
10
10
 
11
- = form_for @licence, html: { autocomplete: 'off' } do |f|
11
+ = form_for [:admin_journal, @licence], html: { autocomplete: 'off' } do |f|
12
12
  %header#header
13
13
  = render partial: 'spina/admin/shared/breadcrumbs'
14
14
 
@@ -1,4 +1,4 @@
1
- = form_for @volume, html: { autocomplete: 'off' } do |f|
1
+ = form_for [:admin_journal, @volume], html: { autocomplete: 'off' } do |f|
2
2
  %header#header
3
3
  = render partial: 'spina/admin/shared/breadcrumbs'
4
4
 
@@ -5,6 +5,8 @@ module Spina
5
5
  module Journal
6
6
  # Registers the plugin with Spina.
7
7
  class Engine < ::Rails::Engine
8
+ isolate_namespace Spina::Admin::Journal
9
+
8
10
  config.before_initialize do
9
11
  ::Spina::Plugin.register do |plugin|
10
12
  plugin.name = 'journal'
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Admin
5
5
  module Journal
6
- VERSION = '0.6.0'
6
+ VERSION = '0.6.1'
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-admin-journal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Van Steene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-07 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler