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

volumes

parent 3db0083f
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 26 deletions
......@@ -16,7 +16,7 @@ class Admin::Features::Education::ProgramsController < Admin::Features::Educatio
def edit
breadcrumb
add_breadcrumb 'Modifier'
add_breadcrumb t('edit')
end
def create
......
......@@ -10,6 +10,7 @@ class Admin::Research::Journal::ApplicationController < Admin::Research::Applica
end
def default_url_options
return unless params.has_key? :journal_id
{
journal_id: params[:journal_id]
}
......
......@@ -15,6 +15,7 @@ class Admin::Research::Journal::VolumesController < Admin::Research::Journal::Ap
def edit
breadcrumb
add_breadcrumb t('edit')
end
def create
......
......@@ -15,6 +15,7 @@ class Admin::Research::JournalsController < Admin::Research::Journal::Applicatio
def edit
breadcrumb
add_breadcrumb t('edit')
end
def create
......
<h1>Editing Research Journal Volume</h1>
<% content_for :title, @volume %>
<%= render 'form', research_journal_volume: @research_journal_volume %>
<%= link_to 'Show', @research_journal_volume %> |
<%= link_to 'Back', research_journal_volumes_path %>
<%= render 'form', volume: @volume %>
......@@ -3,23 +3,25 @@
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Number</th>
<th><%= Research::Journal::Volume.model_name.human %></th>
<th>Published at</th>
<th colspan="3"></th>
<th></th>
</tr>
</thead>
<tbody>
<% @volumes.each do |research_journal_volume| %>
<% @volumes.each do |volume| %>
<tr>
<td><%= research_journal_volume.title %></td>
<td><%= research_journal_volume.number %></td>
<td><%= research_journal_volume.published_at %></td>
<td><%= link_to volume, [:admin, volume] %></td>
<td><%= volume.published_at %></td>
<td class="text-end">
<%= edit_link volume %>
<%= destroy_link volume %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Research Journal Volume', new_research_journal_volume_path %>
<% content_for :buttons do %>
<%= create_link Research::Journal::Volume %>
<% end %>
......@@ -7,5 +7,9 @@
<p>
<strong>Published at:</strong>
<%= @volume.published_at %>
<%= @volume.published_at&.to_date %>
</p>
<% content_for :buttons do %>
<%= edit_link @volume %>
<% end %>
......@@ -3,7 +3,9 @@
<table class="table">
<thead>
<tr>
<th>Title</th>
<th><%= Research::Journal.human_attribute_name('title') %></th>
<th><%= Research::Journal::Volume.model_name.human(count: 2) %></th>
<th>Articles</th>
<th></th>
</tr>
</thead>
......@@ -12,6 +14,8 @@
<% @journals.each do |journal| %>
<tr>
<td><%= link_to journal, [:admin, journal] %></td>
<td><%= link_to "#{journal.volumes.count}", admin_research_journal_volumes_path(journal_id: journal) %></td>
<td></td>
<td class="text-end">
<%= edit_link journal %>
<%= destroy_link journal %>
......
<% content_for :title, @journal %>
<p>
<%= @journal.description %>
</p>
<p><%= @journal.description %></p>
<h2 class="mt-5"><%= Research::Journal::Volume.model_name.human(count: 2) %></h2>
......@@ -22,7 +19,6 @@
<% end %>
</div>
<% content_for :buttons do %>
<%= edit_link @journal %>
<% end %>
<% content_for :title, Research::Journal::Volume.model_name.human %>
<%= render 'form', volume: @volume %>
......@@ -7,3 +7,6 @@ fr:
research/journal/volume:
one: Volume
other: Volumes
attributes:
research/journal:
title: Titre
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