Skip to content
Snippets Groups Projects
Commit 0f79f4d6 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

front

parent 81265309
No related branches found
No related tags found
No related merge requests found
json.extract! research_journal_volume, :id, :title, :number, :published_at, :created_at, :updated_at
json.url research_journal_volume_url(research_journal_volume, format: :json)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="card-body"> <div class="card-body">
<h1 class="h4"> <h1 class="h4">
<%= link_to volume, <%= link_to volume,
research_journal_volume_path(journal_id: journal, id: volume), research_journal_volume_path(journal_id: volume.journal, id: volume),
class: 'stretched-link' %> class: 'stretched-link' %>
</h1> </h1>
</div> </div>
......
json.extract! volume, :id, :title, :number, :published_at, :created_at, :updated_at
json.url research_journal_volume_url(journal: volume.journal, id: volume, format: :json)
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="row"> <div class="row">
<% @journal.volumes.each do |volume| %> <% @journal.volumes.each do |volume| %>
<div class="col-md-3"> <div class="col-md-3">
<%= render volume, journal: @journal %> <%= render volume %>
</div> </div>
<% end %> <% end %>
</div> </div>
json.partial! "research_journal_volumes/research_journal_volume", research_journal_volume: @research_journal_volume json.partial! "research/journal/volumes/volume", volume: @volume
json.extract! journal, :id, :title, :description
json.url research_journal_url(journal, format: :json)
json.volumes journal.volumes do |volume|
json.extract! volume, :id, :title, :published_at
json.url research_journal_volume_url(journal_id: journal, id: volume, format: :json)
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<%= link_to 'Lire', journal, class: 'btn btn-primary stretched-link' %> <%= link_to 'Lire', journal, class: 'btn btn-primary stretched-link' %>
</div> </div>
<div class="offset-md-1 col-md-3"> <div class="offset-md-1 col-md-3">
<%= render journal.volumes.first, journal: journal if journal.volumes.any? %> <%= render journal.volumes.first if journal.volumes.any? %>
</div> </div>
</div> </div>
<% end %> <% end %>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="row"> <div class="row">
<% @journal.volumes.each do |volume| %> <% @journal.volumes.each do |volume| %>
<div class="col-md-3"> <div class="col-md-3">
<%= render volume, journal: @journal %> <%= render volume %>
</div> </div>
<% end %> <% end %>
</div> </div>
...@@ -2,5 +2,5 @@ json.extract! @journal, :id, :title, :description ...@@ -2,5 +2,5 @@ json.extract! @journal, :id, :title, :description
json.url research_journal_url(@journal, format: :json) json.url research_journal_url(@journal, format: :json)
json.volumes @journal.volumes do |volume| json.volumes @journal.volumes do |volume|
json.extract! volume, :id, :title, :published_at json.extract! volume, :id, :title, :published_at
json.url research_journal_volume_url(journal_id: @journal, id: volume, format: :json) json.url research_journal_volume_url(journal_id: volume.journal, id: volume, format: :json)
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment