spina-admin-journal 1.0.0.rc2 → 1.0.0.rc3
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/README.md +36 -48
- data/app/controllers/spina/admin/journal/articles_controller.rb +5 -1
- data/app/controllers/spina/admin/journal/authors_controller.rb +5 -1
- data/app/controllers/spina/admin/journal/institutions_controller.rb +5 -1
- data/app/controllers/spina/admin/journal/issues_controller.rb +6 -2
- data/app/controllers/spina/admin/journal/volumes_controller.rb +5 -1
- data/app/views/spina/admin/journal/articles/_form_authors.html.haml +3 -2
- data/app/views/spina/admin/journal/articles/view_authors.html.haml +2 -0
- data/app/views/spina/admin/journal/authors/_form_articles.html.haml +3 -2
- data/app/views/spina/admin/journal/authors/view_articles.html.haml +2 -0
- data/app/views/spina/admin/journal/institutions/_form_view_affiliations.html.haml +3 -2
- data/app/views/spina/admin/journal/institutions/view_affiliations.html.haml +2 -0
- data/app/views/spina/admin/journal/issues/_form_articles.html.haml +3 -2
- data/app/views/spina/admin/journal/issues/view_articles.html.haml +3 -0
- data/app/views/spina/admin/journal/volumes/_form_issues.html.haml +1 -1
- data/app/views/spina/admin/journal/volumes/view_issues.html.haml +2 -0
- data/config/routes.rb +21 -1
- data/lib/spina/admin/journal/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f786acd82a7df514c811bd3fd8fd06220b030d58858b1897bde326f62ee03d3c
|
4
|
+
data.tar.gz: 8b02e8903963f11402ce612ac7a53c77c851dc17ba5425edf333eab8c875ab07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50c4507b1747a4a17db2b16836626f72cc8d149676af9ef9e442daa81e192af21bce6c913168e8f570474d2f0052b5cc5df1fde1c8e4c3d963fc85f07ac66eb0
|
7
|
+
data.tar.gz: 4f8a96788318d91f69911489a979a258c87020690e3a6e6f5ec006911a140388a77056e9e2ff83434eedbfc8944437bbf4c445b9b4c088c1af8acf60c724c877
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Spina::Admin::Journal
|
2
2
|
|
3
|
+
*Journal* is a plugin for [Spina](https://www.spinacms.com/) that provides a fully-fledged journal management package, intended to provide a more streamlined, easy-to-use, modern alternative to [OJS](https://pkp.sfu.ca/ojs/).
|
4
|
+
|
5
|
+
Spina is a content management system built in [Ruby on Rails](http://rubyonrails.org/). *Journal* augments Spina by providing an admin interface for managing an academic journal.
|
6
|
+
|
3
7
|

|
4
8
|
[](https://codecov.io/gh/louis-vs/spina-admin-journal)
|
5
9
|
[](https://www.codefactor.io/repository/github/louis-vs/spina-admin-journal)
|
@@ -7,69 +11,48 @@
|
|
7
11
|
[](https://lgtm.com/projects/g/louis-vs/spina-admin-journal/context:javascript)
|
8
12
|
[](http://inch-ci.org/github/louis-vs/spina-admin-journal)
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
## Usage
|
13
|
-
|
14
|
-
The plugin adds two menus to Spina's primary navigation:
|
15
|
-
|
16
|
-
* **Journal settings** provides access to global properties of the journal. It is divided into 3 submenus:
|
17
|
-
* **Journal** allows you to change the name of the journal.
|
18
|
-
* **Institutions** allows you to add institutions, to which authors can be affiliated.
|
19
|
-
* **Authors** allows you to add authors, who can then be added to articles.
|
20
|
-
* The **journal content** menu will be named after the journal as specified in Journal Settings. It provides a means of editing the content of the journal and is divided into three submenus:
|
21
|
-
* **Volumes** allows you to add and remove volumes of the journal, and edit their respective issues.
|
22
|
-
* **Issues** allows you to add, edit and remove issues of particular volumes of the journal, and edit their respective articles.
|
23
|
-
* **Articles** allows you to add, edit and remove articles belonging to particular issues.
|
14
|
+
## Features
|
24
15
|
|
25
|
-
The plugin
|
16
|
+
The journal plugin covers many of the needs of a professional online journal publication, including:
|
26
17
|
|
27
|
-
|
18
|
+
- Simple, responsive, intuitive interface that builds upon Spina's own.
|
19
|
+
- Seamlessly integrate published content with other information about the journal.
|
20
|
+
- Manage volumes, issues, articles and authors in a highly structured and organised manner.
|
21
|
+
- Keep track of individual authors with multiple affiliations, e.g. if they change name or institution, connecting with [ORCID](https://orcid.org/).
|
28
22
|
|
29
|
-
|
30
|
-
|
31
|
-
### From scratch
|
32
|
-
|
33
|
-
Make sure you have a working installation of Ruby on Rails 6.1. You can find a setup guide [here](https://guides.rubyonrails.org/getting_started.html).
|
34
|
-
|
35
|
-
Then run:
|
36
|
-
|
37
|
-
```bash
|
38
|
-
$ rails new your-app --database=postgresql
|
39
|
-
$ cd your-app
|
40
|
-
$ bin/rails db:create
|
41
|
-
$ bin/rails active_storage:install
|
42
|
-
```
|
23
|
+
Currently, a submissions management system is not included, but this is planned for a future release. This will allow you to manage the submissions process for the journal in a streamlined manner in parallel to publication.
|
43
24
|
|
44
|
-
|
25
|
+
## Usage
|
45
26
|
|
46
|
-
|
47
|
-
gem 'spina', '~> 2.0'
|
48
|
-
```
|
27
|
+
The plugin adds two menus to Spina's primary navigation:
|
49
28
|
|
50
|
-
|
29
|
+
- **Journal settings** provides access to global properties of the journal. It is divided into 3 submenus:
|
30
|
+
- **Journal** allows you to change metadata such as the name of the journal, as well as content that will appear on the journal homepage.
|
31
|
+
- **Institutions** allows you to add institutions, to which authors can be affiliated.
|
32
|
+
- **Authors** allows you to add authors and their affiliations, which can then be added to articles.
|
33
|
+
- **Licences** allows you to add licences and association information, which can be associated with individual articles, representing the licence under which the content is released.
|
34
|
+
- The **journal content** menu will be named after the journal as specified in Journal Settings. It provides a means of editing the content of the journal and is divided into three submenus:
|
35
|
+
- **Volumes** allows you to add and remove volumes of the journal, and edit their respective issues.
|
36
|
+
- **Issues** allows you to add, edit and remove issues of particular volumes of the journal, and edit their respective articles.
|
37
|
+
- **Articles** allows you to add, edit and remove articles belonging to particular issues.
|
51
38
|
|
52
|
-
|
53
|
-
$ bundle install
|
54
|
-
```
|
39
|
+
**NB:** This release of the plugin does not provide any public-facing frontend or Spina theme. An example implementation can be found within the [Conferences Primer Theme](https://github.com/louis-vs/spina-conferences-primer_theme-fork). Note that this theme also contains frontends for two other Spina plugins, [Spina Conferences Blog](https://github.com/louis-vs/spina-admin-conferences-blog) and [Spina Admin Conferences](https://github.com/louis-vs/spina-admin-conferences-fork/). You can use the theme in your project as is, or copy whichever parts of the code you need.
|
55
40
|
|
56
|
-
|
41
|
+
A dedicated journal theme, coupled with an automatic installer, is being planned. A system to manage submissions is also on the roadmap.
|
57
42
|
|
58
|
-
|
59
|
-
$ bin/rails g spina:install
|
60
|
-
```
|
43
|
+
## Installation
|
61
44
|
|
62
|
-
|
45
|
+
Make sure you have a working installation of Ruby on Rails 7. You can find a setup guide [here](https://guides.rubyonrails.org/getting_started.html).
|
63
46
|
|
64
|
-
|
47
|
+
You then need to install Spina, following the guide [on the Spina website](https://spinacms.com/docs).
|
65
48
|
|
66
|
-
|
49
|
+
To install the plugin, add this line to your application's Gemfile:
|
67
50
|
|
68
51
|
```ruby
|
69
|
-
gem 'spina-admin-journal', '~> 0
|
52
|
+
gem 'spina-admin-journal', '~> 1.0'
|
70
53
|
```
|
71
54
|
|
72
|
-
|
55
|
+
Then execute:
|
73
56
|
|
74
57
|
```bash
|
75
58
|
$ bundle install
|
@@ -78,7 +61,7 @@ $ bundle install
|
|
78
61
|
You'll then need to install and run the migrations for the journal:
|
79
62
|
|
80
63
|
```bash
|
81
|
-
$ bin/rails
|
64
|
+
$ bin/rails spina_admin_journal:install:migrations
|
82
65
|
$ bin/rails db:migrate
|
83
66
|
```
|
84
67
|
|
@@ -94,6 +77,11 @@ You can manually populate the database from within the app, or alternatively you
|
|
94
77
|
|
95
78
|
Bug reports and feature requests are welcome in the [Issues](https://github.com/louis-vs/spina-admin-journal/issues) section. Translations are also very welcome!
|
96
79
|
|
80
|
+
### Planned features
|
81
|
+
|
82
|
+
- [ ] Submissions management
|
83
|
+
- [ ] Translations
|
84
|
+
|
97
85
|
## License
|
98
86
|
|
99
87
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -25,7 +25,7 @@ module Spina
|
|
25
25
|
|
26
26
|
before_action :set_breadcrumb
|
27
27
|
before_action :set_tabs, except: %i[index destroy sort]
|
28
|
-
before_action :set_article, only: %i[edit update destroy]
|
28
|
+
before_action :set_article, only: %i[edit view_authors update destroy]
|
29
29
|
before_action :set_parts_attributes, only: %i[new edit]
|
30
30
|
before_action :build_parts, only: %i[edit]
|
31
31
|
|
@@ -43,6 +43,10 @@ module Spina
|
|
43
43
|
|
44
44
|
def edit; end
|
45
45
|
|
46
|
+
def view_authors
|
47
|
+
render layout: false
|
48
|
+
end
|
49
|
+
|
46
50
|
def create # rubocop:disable Metrics/AbcSize
|
47
51
|
@article = Article.new(article_params)
|
48
52
|
sister_articles = Article.where(issue: @article.issue_id)
|
@@ -7,7 +7,7 @@ module Spina
|
|
7
7
|
class AuthorsController < ApplicationController
|
8
8
|
before_action :set_breadcrumb
|
9
9
|
before_action :set_tabs, except: %i[index destroy]
|
10
|
-
before_action :set_author, only: %i[edit update destroy]
|
10
|
+
before_action :set_author, only: %i[edit view_articles update destroy]
|
11
11
|
|
12
12
|
admin_section :journal_settings
|
13
13
|
|
@@ -23,6 +23,10 @@ module Spina
|
|
23
23
|
|
24
24
|
def edit; end
|
25
25
|
|
26
|
+
def view_articles
|
27
|
+
render layout: false
|
28
|
+
end
|
29
|
+
|
26
30
|
def create
|
27
31
|
@author = Author.new(modified_params)
|
28
32
|
if @author.save
|
@@ -7,7 +7,7 @@ module Spina
|
|
7
7
|
class InstitutionsController < ApplicationController
|
8
8
|
before_action :set_breadcrumb
|
9
9
|
before_action :set_tabs, except: %i[index destroy]
|
10
|
-
before_action :set_institution, only: %i[edit update destroy]
|
10
|
+
before_action :set_institution, only: %i[edit view_affiliations update destroy]
|
11
11
|
|
12
12
|
admin_section :journal_settings
|
13
13
|
|
@@ -22,6 +22,10 @@ module Spina
|
|
22
22
|
|
23
23
|
def edit; end
|
24
24
|
|
25
|
+
def view_affiliations
|
26
|
+
render layout: false
|
27
|
+
end
|
28
|
+
|
25
29
|
def create
|
26
30
|
@institution = Institution.new(institution_params)
|
27
31
|
|
@@ -25,8 +25,8 @@ module Spina
|
|
25
25
|
|
26
26
|
before_action :set_breadcrumb
|
27
27
|
before_action :set_tabs, except: %i[index destroy sort]
|
28
|
-
before_action :set_issue, only: %i[edit update destroy]
|
29
|
-
before_action :set_articles, only: %i[edit update]
|
28
|
+
before_action :set_issue, only: %i[edit view_articles update destroy]
|
29
|
+
before_action :set_articles, only: %i[edit view_articles update]
|
30
30
|
before_action :set_parts_attributes, only: %i[new edit]
|
31
31
|
before_action :build_parts, only: %i[edit]
|
32
32
|
|
@@ -48,6 +48,10 @@ module Spina
|
|
48
48
|
add_breadcrumb t('spina.admin.journal.issues.issue_number', number: @issue.number)
|
49
49
|
end
|
50
50
|
|
51
|
+
def view_articles
|
52
|
+
render layout: false
|
53
|
+
end
|
54
|
+
|
51
55
|
def create # rubocop:disable Metrics/AbcSize
|
52
56
|
@issue = Issue.new(issue_params)
|
53
57
|
sister_issues = Issue.where(volume: @issue.volume_id)
|
@@ -7,7 +7,7 @@ module Spina
|
|
7
7
|
class VolumesController < ApplicationController
|
8
8
|
before_action :set_breadcrumb
|
9
9
|
before_action :set_tabs, except: %i[index destroy]
|
10
|
-
before_action :set_volume, only: %i[edit destroy]
|
10
|
+
before_action :set_volume, only: %i[edit view_issues destroy]
|
11
11
|
|
12
12
|
admin_section :journal
|
13
13
|
|
@@ -17,6 +17,10 @@ module Spina
|
|
17
17
|
|
18
18
|
def edit; end
|
19
19
|
|
20
|
+
def view_issues
|
21
|
+
render layout: false
|
22
|
+
end
|
23
|
+
|
20
24
|
def new
|
21
25
|
create
|
22
26
|
end
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if @article.persisted?
|
2
|
+
.-mt-4.md:-mt-8
|
3
|
+
%turbo-frame#article_authors{ src: spina.view_authors_admin_journal_article_path(@article), loading: 'lazy' }
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if @author.persisted?
|
2
|
+
.-mt-4.md:-mt-8
|
3
|
+
%turbo-frame#author_articles{ src: spina.view_articles_admin_journal_author_path(@author), loading: 'lazy' }
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if @institution.persisted?
|
2
|
+
.-mt-4.md:-mt-8
|
3
|
+
%turbo-frame#institution_affiliations{ src: spina.view_affiliations_admin_journal_institution_path(@institution), loading: 'lazy' }
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if @issue.persisted?
|
2
|
+
.-mt-4.md:-mt-8
|
3
|
+
%turbo-frame#issue_articles{ src: spina.view_articles_admin_journal_issue_path(@issue), loading: 'lazy' }
|
@@ -1,2 +1,2 @@
|
|
1
1
|
.-mt-4.md:-mt-8
|
2
|
-
|
2
|
+
%turbo-frame#volume_issues{ src: spina.view_issues_admin_journal_volume_path(@volume), loading: 'lazy' }
|
data/config/routes.rb
CHANGED
@@ -6,18 +6,38 @@ Spina::Engine.routes.draw do
|
|
6
6
|
resources :journals, only: %i[edit update destroy]
|
7
7
|
resources :volumes, except: %i[show update] do
|
8
8
|
post 'sort/:journal_id' => 'volumes#sort', as: :sort, on: :collection
|
9
|
+
|
10
|
+
member do
|
11
|
+
get :view_issues
|
12
|
+
end
|
9
13
|
end
|
10
14
|
resources :issues, except: %i[show] do
|
11
15
|
post 'sort/:volume_id' => 'issues#sort', as: :sort, on: :collection
|
16
|
+
|
17
|
+
member do
|
18
|
+
get :view_articles
|
19
|
+
end
|
12
20
|
end
|
13
21
|
resources :articles, except: %i[show] do
|
14
22
|
post 'sort/:issue_id' => 'articles#sort', as: :sort, on: :collection
|
23
|
+
|
24
|
+
member do
|
25
|
+
get :view_authors
|
26
|
+
end
|
15
27
|
end
|
16
28
|
resources :authors, except: %i[show] do
|
17
29
|
post 'sort/:article_id' => 'authors#sort', as: :sort, on: :collection
|
30
|
+
|
31
|
+
member do
|
32
|
+
get :view_articles
|
33
|
+
end
|
18
34
|
end
|
19
35
|
|
20
|
-
resources :institutions, except: %i[show]
|
36
|
+
resources :institutions, except: %i[show] do
|
37
|
+
member do
|
38
|
+
get :view_affiliations
|
39
|
+
end
|
40
|
+
end
|
21
41
|
resources :licences, except: %i[show]
|
22
42
|
end
|
23
43
|
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: 1.0.0.
|
4
|
+
version: 1.0.0.rc3
|
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: 2022-
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml-rails
|
@@ -305,6 +305,7 @@ files:
|
|
305
305
|
- app/views/spina/admin/journal/articles/edit.html.haml
|
306
306
|
- app/views/spina/admin/journal/articles/index.html.haml
|
307
307
|
- app/views/spina/admin/journal/articles/new.html.haml
|
308
|
+
- app/views/spina/admin/journal/articles/view_authors.html.haml
|
308
309
|
- app/views/spina/admin/journal/authors/_form.html.haml
|
309
310
|
- app/views/spina/admin/journal/authors/_form_affiliation.html.haml
|
310
311
|
- app/views/spina/admin/journal/authors/_form_articles.html.haml
|
@@ -312,18 +313,21 @@ files:
|
|
312
313
|
- app/views/spina/admin/journal/authors/edit.html.haml
|
313
314
|
- app/views/spina/admin/journal/authors/index.html.haml
|
314
315
|
- app/views/spina/admin/journal/authors/new.html.haml
|
316
|
+
- app/views/spina/admin/journal/authors/view_articles.html.haml
|
315
317
|
- app/views/spina/admin/journal/institutions/_form.html.haml
|
316
318
|
- app/views/spina/admin/journal/institutions/_form_details.html.haml
|
317
319
|
- app/views/spina/admin/journal/institutions/_form_view_affiliations.html.haml
|
318
320
|
- app/views/spina/admin/journal/institutions/edit.html.haml
|
319
321
|
- app/views/spina/admin/journal/institutions/index.html.haml
|
320
322
|
- app/views/spina/admin/journal/institutions/new.html.haml
|
323
|
+
- app/views/spina/admin/journal/institutions/view_affiliations.html.haml
|
321
324
|
- app/views/spina/admin/journal/issues/_form.html.haml
|
322
325
|
- app/views/spina/admin/journal/issues/_form_articles.html.haml
|
323
326
|
- app/views/spina/admin/journal/issues/_form_details.html.haml
|
324
327
|
- app/views/spina/admin/journal/issues/edit.html.haml
|
325
328
|
- app/views/spina/admin/journal/issues/index.html.haml
|
326
329
|
- app/views/spina/admin/journal/issues/new.html.haml
|
330
|
+
- app/views/spina/admin/journal/issues/view_articles.html.haml
|
327
331
|
- app/views/spina/admin/journal/journals/_form.html.haml
|
328
332
|
- app/views/spina/admin/journal/journals/edit.html.haml
|
329
333
|
- app/views/spina/admin/journal/journals/new.html.haml
|
@@ -337,6 +341,7 @@ files:
|
|
337
341
|
- app/views/spina/admin/journal/volumes/edit.html.haml
|
338
342
|
- app/views/spina/admin/journal/volumes/index.html.haml
|
339
343
|
- app/views/spina/admin/journal/volumes/new.html.haml
|
344
|
+
- app/views/spina/admin/journal/volumes/view_issues.html.haml
|
340
345
|
- app/views/spina/admin/parts/admin/journal/page_ranges/_form.html.haml
|
341
346
|
- config/locales/en.yml
|
342
347
|
- config/routes.rb
|