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

better

parent 4f379c4a
No related branches found
No related tags found
No related merge requests found
Showing
with 29 additions and 12 deletions
......@@ -55,6 +55,6 @@ class Admin::Research::Journal::VolumesController < Admin::Research::Journal::Ap
end
def volume_params
params.require(:research_journal_volume).permit(:title, :number, :cover, :published_at, :description)
params.require(:research_journal_volume).permit(:title, :number, :cover, :keywords, :published_at, :description)
end
end
......@@ -52,6 +52,6 @@ class Admin::Research::JournalsController < Admin::Research::ApplicationControll
end
def journal_params
params.require(:research_journal).permit(:title, :description, :access_token, :repository)
params.require(:research_journal).permit(:title, :description, :issn, :access_token, :repository)
end
end
......@@ -5,6 +5,7 @@
# id :uuid not null, primary key
# access_token :string
# description :text
# issn :string
# repository :string
# title :string
# created_at :datetime not null
......
......@@ -4,6 +4,7 @@
#
# id :uuid not null, primary key
# description :text
# keywords :text
# number :integer
# published_at :date
# title :string
......
......@@ -20,6 +20,7 @@
<div class="card-body">
<%= f.input :number %>
<%= f.input :published_at, html5: true %>
<%= f.input :keywords %>
</div>
</div>
</div>
......
---
title: "<%= @volume.title %>"
number: <%= @volume.number %>
issn: "-"
tags:
- "Andy Stirling"
- "anti-imperialism"
- "de colonial degrowth"
- "degrowth"
- "economic growth"
lang: Français
issn: "<%= @volume.journal.issn %>"
keywords: "<%= @volume.keywords %>"
date: "<%= @volume.published_at %>"
image: "<%= @volume.cover_path %>"
articles:
<% @volume.articles.each do |article| %>
- <%= article.id %>
- <%= article.id %>
<% end %>
---
<%= @volume.description %>
......@@ -2,6 +2,7 @@
<div class="row">
<div class="col-md-6">
<%= f.input :title %>
<%= f.input :issn %>
</div>
</div>
<% content_for :buttons do %>
......
<% content_for :title, @journal %>
<p>ISSN : <%= @journal.issn %></p>
<% if @journal.website %>
<p>
Site :
......
class AddFieldsToJournals < ActiveRecord::Migration[6.1]
def change
add_column :research_journals, :issn, :string
add_column :research_journal_volumes, :keywords, :text
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_09_21_124220) do
ActiveRecord::Schema.define(version: 2021_09_21_170648) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
......@@ -172,6 +172,7 @@ ActiveRecord::Schema.define(version: 2021_09_21_124220) do
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.text "description"
t.text "keywords"
t.index ["research_journal_id"], name: "index_research_journal_volumes_on_research_journal_id"
t.index ["university_id"], name: "index_research_journal_volumes_on_university_id"
end
......@@ -184,6 +185,7 @@ ActiveRecord::Schema.define(version: 2021_09_21_124220) do
t.datetime "updated_at", precision: 6, null: false
t.string "access_token"
t.string "repository"
t.string "issn"
t.index ["university_id"], name: "index_research_journals_on_university_id"
end
......
# Journals
## References
http://infolit.be/CoMLiS/ch02s03.html
......@@ -4,6 +4,7 @@
#
# id :uuid not null, primary key
# description :text
# keywords :text
# number :integer
# published_at :date
# title :string
......
......@@ -5,6 +5,7 @@
# id :uuid not null, primary key
# access_token :string
# description :text
# issn :string
# repository :string
# title :string
# created_at :datetime not null
......
......@@ -4,6 +4,7 @@
#
# id :uuid not null, primary key
# description :text
# keywords :text
# number :integer
# published_at :date
# title :string
......
......@@ -5,6 +5,7 @@
# id :uuid not null, primary key
# access_token :string
# description :text
# issn :string
# repository :string
# title :string
# created_at :datetime not null
......
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