spina-conferences-primer_theme 0.5.1 → 0.5.2

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: a8a85cdf19e437cc1bcfbbac3a0410c9936c7937e0fad5cfd43b69d50e220142
4
- data.tar.gz: e61eb65c953c3c0f960594b433bbc053a0d6e3c4f78968bd61cfb60f01e11d14
3
+ metadata.gz: dca91a3b99e2df7576d15edd181e5552c609eaa6bbe040dfc0a5275a953b66f5
4
+ data.tar.gz: a11a20793a237edbae2ae71ad9db899cf56e82fd80c554331a73d7185d5bc903
5
5
  SHA512:
6
- metadata.gz: e79f15190f9f206e35e50d073d88e1db00ee4b7b7fe68b890df6f0912e439a449a2ab74d14b1847b9d16348e4704778102b9391aa143d67366310ca7bae0598e
7
- data.tar.gz: b7d8086273db0c61bf6734c3ef2bb299b46539f634e2b1dafcf2dd730c7e343baee10b1199bb3c7efdc766ef268b3451465b5c1b1c72c9aeb27259fcb0f75b4a
6
+ metadata.gz: bc7143557431835513e687822ec28d10f2d7693f8a893ffb64ed76eb07460ffde9a3e495faa27b59bf37b23de11a4d21346e56682129d8e08b283e911f7833d9
7
+ data.tar.gz: ad1f2a5a4dd2bb81b831997a2de05a9382ca7205093ebf4de318102f5a68eb00a4bf319db136e4de84cbf5d25ac57e7fc20405226ca18045819cb772b337524c
@@ -12,8 +12,12 @@ module Spina
12
12
 
13
13
  def index
14
14
  # having multiple journals is not currently allowed anyway
15
- @issues = Admin::Journal::Issue.sorted_desc
16
- @latest_issue = @issues.find_by 'date <= ?', Time.zone.today
15
+ @issues = if current_spina_user.present?
16
+ Admin::Journal::Issue.sorted_desc
17
+ else
18
+ Admin::Journal::Issue.sorted_desc.where('date <= ?', Time.zone.today)
19
+ end
20
+ @latest_issue = @issues.first
17
21
  end
18
22
 
19
23
  def show
@@ -17,10 +17,10 @@
17
17
  - sidebar.row do
18
18
  = render(Primer::HeadingComponent.new(tag: :h2, font_size: 3)) do
19
19
  = link_to t('.latest_issue', volume_number: @latest_issue.volume.number, issue_number: @latest_issue.number), frontend_issue_path(@latest_issue)
20
- - if @latest_issue.has_content?(:cover_img)
21
- - sidebar.row do
22
- = link_to(frontend_issue_path(@latest_issue)) do
23
- = render partial: 'issue_cover', locals: { issue: @latest_issue, cover_img: @latest_issue.content(:cover_img), size: [150, 300] }
20
+ - if @latest_issue.has_content?(:cover_img)
21
+ - sidebar.row do
22
+ = link_to(frontend_issue_path(@latest_issue)) do
23
+ = render partial: 'issue_cover', locals: { issue: @latest_issue, cover_img: @latest_issue.content(:cover_img), size: [150, 300] }
24
24
 
25
25
  #journal-issues-list
26
26
  = render(Primer::HeadingComponent.new(tag: :h2, mt: 3)) { t '.all_issues' }
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.5.1'
6
+ VERSION = '0.5.2'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-conferences-primer_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Malčić