spina-admin-journal 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spina/admin/journal/article.rb +4 -4
- data/lib/spina/admin/journal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f92e9ff8032770be4faf4bd6c32eaffde2c9bbaca6189f361c876e50ae9975
|
4
|
+
data.tar.gz: ce515e0d66666f5568664285290ec48d5595334603355bdf6d44161c4ab1024f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fb91af1b4b6bf4755a469b4a968ae00a5a180563b35b35ee7129119fb735f592803de12bf75583d0f2c9a3afa914c3c2131f8a43299fc98bff22d19eed839b8
|
7
|
+
data.tar.gz: 474f142ef4e0948f22643959c93420d947821030bf16acd05017ee2bbc1bdf14d5fe740cc9ec9326ef52d69c99f9332e9032e65cb7b14b0074c14a46672d0a1a
|
@@ -42,21 +42,21 @@ module Spina
|
|
42
42
|
has_many :affiliations, through: :authorships
|
43
43
|
|
44
44
|
# @!attribute [rw] status
|
45
|
-
# @return [Integer]
|
46
|
-
enum status: { published: 0, draft: 1 }
|
45
|
+
# @return [Integer] the current status of the article
|
46
|
+
enum status: { published: 0, draft: 1, meta: 2 }
|
47
47
|
|
48
48
|
validates :number, presence: true, uniqueness: { scope: :issue_id }
|
49
49
|
validates :title, presence: true
|
50
50
|
validates :url, 'spina/admin/journal/uri': true
|
51
51
|
validates :status, presence: true
|
52
52
|
|
53
|
-
scope :visible, -> { where(status:
|
53
|
+
scope :visible, -> { where(status: %i[published meta]) }
|
54
54
|
scope :sorted_asc, -> { includes(:issue).order('spina_admin_journal_issues.number ASC', number: :asc) }
|
55
55
|
scope :sorted_desc, -> { includes(:issue).order('spina_admin_journal_issues.number DESC', number: :desc) }
|
56
56
|
|
57
57
|
# Returns true if the article should be visible to end users (i.e. is not a draft).
|
58
58
|
def visible?
|
59
|
-
published?
|
59
|
+
published? || meta?
|
60
60
|
end
|
61
61
|
end
|
62
62
|
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.4.
|
4
|
+
version: 0.4.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-05-
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babel-transpiler
|