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

wip

parent 85ca726b
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,6 @@ class Admin::Research::Journal::ArticlesController < Admin::Research::Journal::A
end
def article_params
params.require(:research_journal_article).permit(:title, :text, :published_at, :research_journal_volume_id, researcher_ids: [])
params.require(:research_journal_article).permit(:title, :text, :published_at, :abstract, :references, :research_journal_volume_id, researcher_ids: [])
end
end
......@@ -3,7 +3,9 @@
# Table name: research_journal_articles
#
# id :uuid not null, primary key
# abstract :text
# published_at :date
# references :text
# text :text
# title :string
# created_at :datetime not null
......
<%= simple_form_for [:admin, article] do |f| %>
<div class="row">
<div class="col-md-4">
<%= f.input :title %>
<%= f.input :title, as: :text, input_html: { rows: 3 } %>
<%= f.association :volume, collection: @journal.volumes %>
<%= f.input :published_at, html5: true %>
<%= f.association :researchers %>
</div>
<div class="col-md-8">
<%= f.input :text, input_html: { rows: 30 } %>
<%= f.input :abstract, as: :text, input_html: { rows: 6 } %>
<%= f.input :text, input_html: { rows: 20 } %>
<%= f.input :references, as: :text, input_html: { rows: 10 } %>
</div>
</div>
<% content_for :buttons do %>
......
......@@ -2,7 +2,9 @@
title: "<%= @article.title %>"
volume: "<%= @article.volume.id %>"
publication: "<%= @article.published_at %>"
description: ""
abstract: "<%= @article.abstract %>"
description: "<%= @article.abstract %>"
references: "<%= @article.references %>"
authors:
<% @article.researchers.each do |researcher| %>
- "<%= researcher.id %>"
......
......@@ -14,7 +14,7 @@
</ul>
</p>
<%= @article.text %>
<%= @article.abstract %>
<% content_for :buttons do %>
<%= edit_link @article %>
......
class AddAbstractAndReferencesToResearchJournalArticles < ActiveRecord::Migration[6.1]
def change
add_column :research_journal_articles, :abstract, :text
add_column :research_journal_articles, :references, :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_07_162252) do
ActiveRecord::Schema.define(version: 2021_09_08_094427) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
......@@ -103,6 +103,8 @@ ActiveRecord::Schema.define(version: 2021_09_07_162252) do
t.datetime "created_at", precision: 6, null: false
t.date "updated_at", null: false
t.uuid "updated_by_id"
t.text "abstract"
t.text "references"
t.index ["research_journal_id"], name: "index_research_journal_articles_on_research_journal_id"
t.index ["research_journal_volume_id"], name: "index_research_journal_articles_on_research_journal_volume_id"
t.index ["university_id"], name: "index_research_journal_articles_on_university_id"
......
......@@ -3,7 +3,9 @@
# Table name: research_journal_articles
#
# id :uuid not null, primary key
# abstract :text
# published_at :date
# references :text
# text :text
# title :string
# created_at :datetime not null
......
......@@ -3,7 +3,9 @@
# Table name: research_journal_articles
#
# id :uuid not null, primary key
# abstract :text
# published_at :date
# references :text
# text :text
# 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