diff --git a/app/models/concerns/with_citations.rb b/app/models/concerns/with_citations.rb index ace51af138c42ee1949e120bb0c6c196ad68ce46..f235a72b2f597b71d7635821ab9dd5f9b15a0d2a 100644 --- a/app/models/concerns/with_citations.rb +++ b/app/models/concerns/with_citations.rb @@ -17,7 +17,7 @@ module WithCitations def citation_for(style, website: nil, locale: nil) citeproc = to_citeproc(website: website) - processor = CiteProc::Processor.new style: style, format: 'text', locale: locale + processor = CiteProc::Processor.new style: style, format: 'html', locale: locale processor.import([citeproc]) processor.render(:bibliography, id: citeproc["id"]).first end diff --git a/app/views/admin/research/hal/publications/static.html.erb b/app/views/admin/research/hal/publications/static.html.erb index e40b213db1300e571ba574da9cb9c2aec9934076..2cbb04c705c35efa7d04fb11bb7eee2f2f22b798 100644 --- a/app/views/admin/research/hal/publications/static.html.erb +++ b/app/views/admin/research/hal/publications/static.html.erb @@ -25,4 +25,14 @@ researchers: <% @about.researchers.in_university(@website.university).each do |researcher| %> - <%= researcher.slug %> <% end %> +citations: + - label: "APA" + content: >- + <%= prepare_html_for_static @about.citation_apa, @website.university %> + - label: "MLA" + content: >- + <%= prepare_html_for_static @about.citation_mla, @website.university %> + - label: "ISO 690" + content: >- + <%= prepare_html_for_static @about.citation_iso690, @website.university %> --- diff --git a/app/views/admin/research/journals/papers/static.html.erb b/app/views/admin/research/journals/papers/static.html.erb index f9ec19ac945cbd47f430473433de2a1898645de1..b959ac7dff45b95a0492ae83a61878fdcc2a28e1 100644 --- a/app/views/admin/research/journals/papers/static.html.erb +++ b/app/views/admin/research/journals/papers/static.html.erb @@ -6,7 +6,7 @@ title: >- <% if @about.kind %> paper_kind: >- <%= prepare_text_for_static @about.kind %> -paper_kinds: +paper_kinds: - "<%= @about.kind.slug %>" <% end %> <% if @about.volume && @about.volume.path %> @@ -15,7 +15,7 @@ volumes: <% end %> weight: <%= @about.position %> date: "<%= @about.published_at&.to_date&.iso8601 %>" -dates: +dates: published: "<%= @about.published_at&.to_date&.iso8601 %>" accepted: "<%= @about.accepted_at&.to_date&.iso8601 %>" received: "<%= @about.received_at&.to_date&.iso8601 %>" @@ -38,5 +38,15 @@ authors_list: > <%= render 'admin/application/summary/static' %> abstract: > <%= prepare_text_for_static @about.abstract %> +citations: + - label: "APA" + content: >- + <%= prepare_html_for_static @about.citation_apa(website: @website), @website.university %> + - label: "MLA" + content: >- + <%= prepare_html_for_static @about.citation_mla(website: @website), @website.university %> + - label: "ISO 690" + content: >- + <%= prepare_html_for_static @about.citation_iso690(website: @website), @website.university %> <%= render 'admin/communication/blocks/content/static', about: @about %> ---