spina-admin-journal 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +99 -0
- data/Rakefile +36 -0
- data/app/assets/config/spina_admin_journal_manifest.js +3 -0
- data/app/assets/javascripts/spina/admin/journal/application.es6 +72 -0
- data/app/assets/stylesheets/spina/admin/journal/application.css +27 -0
- data/app/controllers/spina/admin/journal/application_controller.rb +26 -0
- data/app/controllers/spina/admin/journal/articles_controller.rb +125 -0
- data/app/controllers/spina/admin/journal/authors_controller.rb +83 -0
- data/app/controllers/spina/admin/journal/institutions_controller.rb +71 -0
- data/app/controllers/spina/admin/journal/issues_controller.rb +129 -0
- data/app/controllers/spina/admin/journal/journals_controller.rb +73 -0
- data/app/controllers/spina/admin/journal/volumes_controller.rb +79 -0
- data/app/models/spina/admin/journal.rb +11 -0
- data/app/models/spina/admin/journal/affiliation.rb +62 -0
- data/app/models/spina/admin/journal/article.rb +55 -0
- data/app/models/spina/admin/journal/author.rb +47 -0
- data/app/models/spina/admin/journal/authorship.rb +19 -0
- data/app/models/spina/admin/journal/institution.rb +32 -0
- data/app/models/spina/admin/journal/issue.rb +49 -0
- data/app/models/spina/admin/journal/journal.rb +50 -0
- data/app/models/spina/admin/journal/volume.rb +37 -0
- data/app/validators/spina/admin/journal/uri_validator.rb +24 -0
- data/app/views/layouts/spina/admin/journal/articles.html.haml +10 -0
- data/app/views/layouts/spina/admin/journal/authors.html.haml +10 -0
- data/app/views/layouts/spina/admin/journal/institutions.html.haml +10 -0
- data/app/views/layouts/spina/admin/journal/issues.html.haml +10 -0
- data/app/views/layouts/spina/admin/journal/journals.html.haml +10 -0
- data/app/views/layouts/spina/admin/journal/volumes.html.haml +10 -0
- data/app/views/spina/admin/hooks/journal/_head.html.haml +2 -0
- data/app/views/spina/admin/hooks/journal/_primary_navigation.html.haml +27 -0
- data/app/views/spina/admin/hooks/journal/_website_secondary_navigation.html.haml +0 -0
- data/app/views/spina/admin/journal/affiliations/_affiliation.html.haml +8 -0
- data/app/views/spina/admin/journal/application/_empty_list.html.haml +3 -0
- data/app/views/spina/admin/journal/articles/_article.html.haml +10 -0
- data/app/views/spina/admin/journal/articles/_form.html.haml +29 -0
- data/app/views/spina/admin/journal/articles/_form_authors.html.haml +10 -0
- data/app/views/spina/admin/journal/articles/_form_details.html.haml +52 -0
- data/app/views/spina/admin/journal/articles/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/articles/index.html.haml +19 -0
- data/app/views/spina/admin/journal/articles/new.html.haml +1 -0
- data/app/views/spina/admin/journal/authors/_author.html.haml +8 -0
- data/app/views/spina/admin/journal/authors/_form.html.haml +29 -0
- data/app/views/spina/admin/journal/authors/_form_affiliation.html.haml +20 -0
- data/app/views/spina/admin/journal/authors/_form_articles.html.haml +18 -0
- data/app/views/spina/admin/journal/authors/_form_details.html.haml +6 -0
- data/app/views/spina/admin/journal/authors/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/authors/index.html.haml +17 -0
- data/app/views/spina/admin/journal/authors/new.html.haml +1 -0
- data/app/views/spina/admin/journal/institutions/_form.html.haml +29 -0
- data/app/views/spina/admin/journal/institutions/_form_details.html.haml +9 -0
- data/app/views/spina/admin/journal/institutions/_form_view_affiliations.html.haml +10 -0
- data/app/views/spina/admin/journal/institutions/_institution.html.haml +9 -0
- data/app/views/spina/admin/journal/institutions/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/institutions/index.html.haml +16 -0
- data/app/views/spina/admin/journal/institutions/new.html.haml +1 -0
- data/app/views/spina/admin/journal/issues/_form.html.haml +29 -0
- data/app/views/spina/admin/journal/issues/_form_articles.html.haml +14 -0
- data/app/views/spina/admin/journal/issues/_form_details.html.haml +32 -0
- data/app/views/spina/admin/journal/issues/_issue.html.haml +9 -0
- data/app/views/spina/admin/journal/issues/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/issues/index.html.haml +18 -0
- data/app/views/spina/admin/journal/issues/new.html.haml +1 -0
- data/app/views/spina/admin/journal/journals/_form.html.haml +35 -0
- data/app/views/spina/admin/journal/journals/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/journals/index.html.haml +27 -0
- data/app/views/spina/admin/journal/journals/new.html.haml +1 -0
- data/app/views/spina/admin/journal/volumes/_form.html.haml +15 -0
- data/app/views/spina/admin/journal/volumes/_form_details.html.haml +10 -0
- data/app/views/spina/admin/journal/volumes/_form_issues.html.haml +13 -0
- data/app/views/spina/admin/journal/volumes/_volume.html.haml +7 -0
- data/app/views/spina/admin/journal/volumes/edit.html.haml +1 -0
- data/app/views/spina/admin/journal/volumes/index.html.haml +17 -0
- data/app/views/spina/admin/journal/volumes/new.html.haml +1 -0
- data/config/locales/en.yml +184 -0
- data/config/routes.rb +21 -0
- data/db/migrate/20201216152147_create_spina_admin_journal_journals.rb +13 -0
- data/db/migrate/20201216153822_create_spina_admin_journal_volumes.rb +13 -0
- data/db/migrate/20201216155113_create_spina_admin_journal_issues.rb +15 -0
- data/db/migrate/20201216161122_create_spina_admin_journal_articles.rb +16 -0
- data/db/migrate/20201216205633_create_spina_admin_journal_institutions.rb +11 -0
- data/db/migrate/20201216211224_create_spina_admin_journal_authors.rb +7 -0
- data/db/migrate/20201216221146_create_spina_admin_journal_affiliations.rb +15 -0
- data/db/migrate/20201216230816_create_spina_admin_journal_authorships.rb +14 -0
- data/db/migrate/20201231165231_create_spina_admin_journal_parts.rb +12 -0
- data/db/migrate/20210424123450_add_json_attributes_to_spina_admin_journal_journals.rb +7 -0
- data/db/migrate/20210424123521_add_json_attributes_to_spina_admin_journal_issues.rb +7 -0
- data/db/migrate/20210424123555_add_json_attributes_to_spina_admin_journal_articles.rb +7 -0
- data/lib/spina/admin/journal.rb +18 -0
- data/lib/spina/admin/journal/engine.rb +17 -0
- data/lib/spina/admin/journal/version.rb +9 -0
- data/lib/tasks/spina/admin/journal_tasks.rake +5 -0
- data/vendor/assets/javascripts/spina/admin/journal/html5sortable.js +1295 -0
- metadata +388 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
.page-form
|
2
|
+
.page-form-group
|
3
|
+
.page-form-label
|
4
|
+
= ::Spina::Admin::Journal::Issue.model_name.human count: :one
|
5
|
+
.page-form-content
|
6
|
+
= f.collection_select :issue_id, ::Spina::Admin::Journal::Issue.sorted_desc, :id, ->(issue) { t '.volume_issue', volume_number: issue.volume.number, issue_number: issue.number }
|
7
|
+
.page-form-group
|
8
|
+
.page-form-label
|
9
|
+
= ::Spina::Admin::Journal::Article.human_attribute_name :number
|
10
|
+
%small= t '.unchangeable'
|
11
|
+
.page-form-content
|
12
|
+
= f.number_field :number, disabled: true
|
13
|
+
.page-form-group
|
14
|
+
.page-form-label
|
15
|
+
= ::Spina::Admin::Journal::Article.human_attribute_name :title
|
16
|
+
.page-form-content
|
17
|
+
= f.text_field :title
|
18
|
+
.page-form-group
|
19
|
+
.page-form-label
|
20
|
+
= ::Spina::Admin::Journal::Author.model_name.human count: :many
|
21
|
+
.page-form-content
|
22
|
+
.well{ style: 'margin: 0' }
|
23
|
+
.table-container
|
24
|
+
%table.table{ style: 'margin: 0' }
|
25
|
+
%tbody.collection-check-boxes
|
26
|
+
= f.collection_check_boxes :affiliation_ids, Spina::Admin::Journal::Affiliation.sorted, :id, :name do |builder|
|
27
|
+
%tr
|
28
|
+
%td{ style: "padding-left: 16px" }
|
29
|
+
.form-checkbox
|
30
|
+
= builder.check_box
|
31
|
+
= builder.label
|
32
|
+
.page-form-group
|
33
|
+
.page-form-label
|
34
|
+
= ::Spina::Admin::Journal::Article.human_attribute_name :url
|
35
|
+
.page-form-content
|
36
|
+
= f.text_field :url
|
37
|
+
.page-form-group
|
38
|
+
.page-form-label
|
39
|
+
= ::Spina::Admin::Journal::Article.human_attribute_name :doi
|
40
|
+
.page-form-content
|
41
|
+
= f.text_field :doi
|
42
|
+
|
43
|
+
= f.fields_for :"#{@locale}_content", @parts do |ff|
|
44
|
+
= ff.hidden_field :type, value: ff.object.class.name
|
45
|
+
= ff.hidden_field :title
|
46
|
+
= ff.hidden_field :name
|
47
|
+
|
48
|
+
.page-form-group.page-part{ data: { name: ff.object.name } }
|
49
|
+
= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.name)}/form", f: ff
|
50
|
+
|
51
|
+
- unless @article.new_record?
|
52
|
+
.pull-right= link_to t('spina.permanently_delete'), admin_journal_article_path(@article), method: :delete, data: { confirm: t('.delete_confirmation', title: @article.title) }, class: 'button button-link button-danger'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- content_for(:header_actions) do
|
2
|
+
= link_to new_admin_journal_article_path, class: 'button button-primary' do
|
3
|
+
= icon 'plus'
|
4
|
+
= t '.new'
|
5
|
+
|
6
|
+
.well
|
7
|
+
.table-container
|
8
|
+
%table.table
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= ::Spina::Admin::Journal::Volume.human_attribute_name :number
|
12
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :number
|
13
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :number
|
14
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :date
|
15
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :title
|
16
|
+
%th
|
17
|
+
|
18
|
+
%tbody
|
19
|
+
= render @articles.any? ? @articles : 'empty_list', message: t('.empty')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
%tr{ data: { id: author.id } }
|
2
|
+
%td= author.primary_affiliation.name
|
3
|
+
%td= author.primary_affiliation.institution.nil? ? '' : author.primary_affiliation.institution.name
|
4
|
+
%td= author.articles.count
|
5
|
+
%td.nowrap.align-right
|
6
|
+
= link_to edit_admin_journal_author_path(author.id), class: 'button button-link' do
|
7
|
+
= icon 'pencil-outline'
|
8
|
+
= t '.view'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- if @author.errors.any?
|
2
|
+
- content_for :notifications do
|
3
|
+
.notification.notification-danger.animated.fadeInRight
|
4
|
+
= icon 'exclamation'
|
5
|
+
.notification-message
|
6
|
+
= t 'spina.notifications.alert'
|
7
|
+
%small= @author.errors.full_messages.join('<br />').html_safe
|
8
|
+
= link_to '#', data: {close_notification: true} do
|
9
|
+
= icon 'cross'
|
10
|
+
|
11
|
+
= form_for @author, html: {autocomplete: "off"} do |f|
|
12
|
+
%header#header
|
13
|
+
= render partial: 'spina/admin/shared/breadcrumbs'
|
14
|
+
|
15
|
+
#header_actions
|
16
|
+
%button.button.button-primary{type: 'submit', style: 'margin-right: 0', data: {disable_with: t('spina.pages.saving')}}
|
17
|
+
= icon 'check'
|
18
|
+
= t '.save'
|
19
|
+
|
20
|
+
.button{style: 'margin-right: 0'}= link_to t('spina.cancel'), admin_journal_authors_path
|
21
|
+
|
22
|
+
%nav#secondary.tabs
|
23
|
+
%ul
|
24
|
+
- @tabs.each_with_index do |tab, i|
|
25
|
+
%li{ class: ('active' if i == 0) }
|
26
|
+
= link_to t(".#{tab}"), "##{tab}"
|
27
|
+
|
28
|
+
#details.tab-content.active= render 'form_details', f: f
|
29
|
+
#articles.tab-content= render 'form_articles', f: f
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.page-form-group
|
2
|
+
.page-form-label
|
3
|
+
= ::Spina::Admin::Journal::Affiliation.human_attribute_name :first_name
|
4
|
+
.page-form-content
|
5
|
+
= ff.text_field :first_name
|
6
|
+
.page-form-group
|
7
|
+
.page-form-label
|
8
|
+
= ::Spina::Admin::Journal::Affiliation.human_attribute_name :surname
|
9
|
+
.page-form-content
|
10
|
+
= ff.text_field :surname
|
11
|
+
.page-form-group
|
12
|
+
.page-form-label
|
13
|
+
= ::Spina::Admin::Journal::Affiliation.human_attribute_name :institution
|
14
|
+
.page-form-content
|
15
|
+
= ff.collection_select :institution_id, ::Spina::Admin::Journal::Institution.sorted, :id, :name
|
16
|
+
.page-form-group
|
17
|
+
.page-form-label
|
18
|
+
= t '.primary'
|
19
|
+
.page-form-content
|
20
|
+
= radio_button_tag 'admin_journal_author[primary_affiliation_index]', ff.index, ff.object.status == 'primary'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.table-container
|
2
|
+
%table.table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th= ::Spina::Admin::Journal::Volume.human_attribute_name :number
|
6
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :number
|
7
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :number
|
8
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :date
|
9
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :title
|
10
|
+
%th
|
11
|
+
%tbody
|
12
|
+
- if @author.affiliations.any?
|
13
|
+
-# render empty list if no affiliation has any articles
|
14
|
+
= render 'empty_list', message: t('.no_articles') if @author.affiliations.reduce(true) do |memo, affiliation|
|
15
|
+
= render affiliation.articles
|
16
|
+
- memo && !affiliation.articles.any?
|
17
|
+
- else
|
18
|
+
= render 'empty_list', message: t('.no_articles')
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.page-form
|
2
|
+
= f.fields_for :affiliations, @author.affiliations do |ff|
|
3
|
+
.well= render 'form_affiliation', ff: ff
|
4
|
+
|
5
|
+
- unless @author.new_record?
|
6
|
+
.pull-right= link_to t('spina.permanently_delete'), admin_journal_author_path(@author), method: :delete, data: { confirm: t('.delete_confirmation', name: @author.primary_affiliation.name) }, class: 'button button-link button-danger'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- content_for(:header_actions) do
|
2
|
+
= link_to new_admin_journal_author_path, class: 'button button-primary' do
|
3
|
+
= icon 'plus'
|
4
|
+
= t '.new'
|
5
|
+
|
6
|
+
.well
|
7
|
+
.table-container
|
8
|
+
%table.table
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= ::Spina::Admin::Journal::Affiliation.human_attribute_name :name
|
12
|
+
%th= ::Spina::Admin::Journal::Institution.model_name.human count: :one
|
13
|
+
%th= t '.number_of_articles'
|
14
|
+
%th
|
15
|
+
|
16
|
+
%tbody
|
17
|
+
= render @authors.any? ? @authors : 'empty_list', message: t('.empty')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- if @institution.errors.any?
|
2
|
+
- content_for :notifications do
|
3
|
+
.notification.notification-danger.animated.fadeInRight
|
4
|
+
= icon 'exclamation'
|
5
|
+
.notification-message
|
6
|
+
= t 'spina.notifications.alert'
|
7
|
+
%small= @institution.errors.full_messages.join('<br />').html_safe
|
8
|
+
= link_to '#', data: { close_notification: true } do
|
9
|
+
= icon 'cross'
|
10
|
+
|
11
|
+
= form_for @institution, html: {autocomplete: "off"} do |f|
|
12
|
+
%header#header
|
13
|
+
= render partial: 'spina/admin/shared/breadcrumbs'
|
14
|
+
|
15
|
+
#header_actions
|
16
|
+
%button.button.button-primary{ type: 'submit', style: 'margin-right: 0', data: { disable_with: t('spina.pages.saving') } }
|
17
|
+
= icon 'check'
|
18
|
+
= t '.save'
|
19
|
+
|
20
|
+
.button{ style: 'margin-right: 0' }= link_to t('spina.cancel'), admin_journal_institutions_path
|
21
|
+
|
22
|
+
%nav#secondary.tabs
|
23
|
+
%ul
|
24
|
+
- @tabs.each_with_index do |tab, i|
|
25
|
+
%li{ class: ('active' if i == 0) }
|
26
|
+
= link_to t(".#{tab}"), "##{tab}"
|
27
|
+
|
28
|
+
#details.tab-content.active= render 'form_details', f: f
|
29
|
+
#view_affiliations.tab-content= render 'form_view_affiliations', f: f
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.page-form
|
2
|
+
.page-form-group
|
3
|
+
.page-form-label
|
4
|
+
= ::Spina::Admin::Journal::Institution.human_attribute_name :name
|
5
|
+
.page-form-content
|
6
|
+
= f.text_field :name
|
7
|
+
|
8
|
+
- unless @institution.new_record?
|
9
|
+
.pull-right= link_to t('spina.permanently_delete'), admin_journal_institution_path(@institution), method: :delete, data: { confirm: t('.delete_confirmation', name: @institution.name) }, class: 'button button-link button-danger'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
.table-container
|
2
|
+
%table.table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th= ::Spina::Admin::Journal::Affiliation.human_attribute_name :name
|
6
|
+
%th= ::Spina::Admin::Journal::Affiliation.human_attribute_name :institution
|
7
|
+
%th= t '.number_of_articles'
|
8
|
+
%th
|
9
|
+
%tbody
|
10
|
+
= render @institution.affiliations.any? ? @institution.affiliations : 'empty_list', message: t('.no_affiliations')
|
@@ -0,0 +1,9 @@
|
|
1
|
+
%tr{ data: { id: institution.id } }
|
2
|
+
%td
|
3
|
+
= link_to institution.name, edit_admin_journal_institution_path(institution)
|
4
|
+
%td
|
5
|
+
= institution.affiliations.count
|
6
|
+
%td.nowrap.align-right
|
7
|
+
= link_to edit_admin_journal_institution_path(institution), class: 'button button-link' do
|
8
|
+
= icon 'pencil-outline'
|
9
|
+
= t '.edit'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- content_for(:header_actions) do
|
2
|
+
= link_to new_admin_journal_institution_path, class: 'button button-primary' do
|
3
|
+
= icon 'plus'
|
4
|
+
= t '.new'
|
5
|
+
|
6
|
+
.well
|
7
|
+
.table-container
|
8
|
+
%table.table
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= ::Spina::Admin::Journal::Institution.human_attribute_name :name
|
12
|
+
%th= t '.number_of_affiliations'
|
13
|
+
%th
|
14
|
+
|
15
|
+
%tbody
|
16
|
+
= render @institutions.any? ? @institutions : 'empty_list', message: t('.empty')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- if @issue.errors.any?
|
2
|
+
- content_for :notifications do
|
3
|
+
.notification.notification-danger.animated.fadeInRight
|
4
|
+
= icon 'exclamation'
|
5
|
+
.notification-message
|
6
|
+
= t 'spina.notifications.alert'
|
7
|
+
%small= @issue.errors.full_messages.join('<br />').html_safe
|
8
|
+
= link_to '#', data: { close_notification: true } do
|
9
|
+
= icon 'cross'
|
10
|
+
|
11
|
+
= form_for @issue, html: { autocomplete: 'off' } do |f|
|
12
|
+
%header#header
|
13
|
+
= render partial: 'spina/admin/shared/breadcrumbs'
|
14
|
+
|
15
|
+
#header_actions
|
16
|
+
%button.button.button-primary{ type: 'submit', style: 'margin-right: 0', data: { disable_with: t('spina.pages.saving') } }
|
17
|
+
= icon 'check'
|
18
|
+
= t '.save'
|
19
|
+
|
20
|
+
.button{style: 'margin-right: 0'}= link_to t('spina.cancel'), admin_journal_institutions_path
|
21
|
+
|
22
|
+
%nav#secondary.tabs
|
23
|
+
%ul
|
24
|
+
- @tabs.each_with_index do |tab, i|
|
25
|
+
%li{ class: ('active' if i == 0) }
|
26
|
+
= link_to t(".#{tab}"), "##{tab}"
|
27
|
+
|
28
|
+
#details.tab-content.active= render 'form_details', f: f
|
29
|
+
#articles.tab-content= render 'form_articles', f: f
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.sort-message
|
2
|
+
.well
|
3
|
+
.table-container
|
4
|
+
%table.table
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
%th= ::Spina::Admin::Journal::Volume.human_attribute_name :number
|
8
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :number
|
9
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :number
|
10
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :date
|
11
|
+
%th= ::Spina::Admin::Journal::Article.human_attribute_name :title
|
12
|
+
%th
|
13
|
+
%tbody.html5sortable{ data: { id: @issue.id, sorted_collection: 'admin_journal_articles', sort_url: !@issue.id.nil? && sort_admin_journal_articles_url(@issue) } }
|
14
|
+
= render @issue.articles.any? ? @issue.articles : 'empty_list', message: t('.no_articles')
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.page-form
|
2
|
+
.page-form-group
|
3
|
+
.page-form-label
|
4
|
+
= ::Spina::Admin::Journal::Volume.human_attribute_name :number
|
5
|
+
.page-form-content
|
6
|
+
= f.collection_select :volume_id, ::Spina::Admin::Journal::Volume.sorted_desc, :id, :number
|
7
|
+
.page-form-group
|
8
|
+
.page-form-label
|
9
|
+
= ::Spina::Admin::Journal::Issue.human_attribute_name :number
|
10
|
+
%small= t '.issue_unchangeable'
|
11
|
+
.page-form-content
|
12
|
+
= f.number_field :number, disabled: true
|
13
|
+
.page-form-group
|
14
|
+
.page-form-label
|
15
|
+
= ::Spina::Admin::Journal::Issue.human_attribute_name :title
|
16
|
+
.page-form-content
|
17
|
+
= f.text_field :title
|
18
|
+
.page-form-group
|
19
|
+
.page-form-label
|
20
|
+
= ::Spina::Admin::Journal::Issue.human_attribute_name :date
|
21
|
+
.page-form-content
|
22
|
+
= f.date_field :date
|
23
|
+
= f.fields_for :"#{@locale}_content", @parts do |ff|
|
24
|
+
= ff.hidden_field :type, value: ff.object.class.name
|
25
|
+
= ff.hidden_field :title
|
26
|
+
= ff.hidden_field :name
|
27
|
+
|
28
|
+
.page-form-group.page-part{ data: { name: ff.object.name } }
|
29
|
+
= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.name)}/form", f: ff
|
30
|
+
|
31
|
+
- unless @issue.new_record?
|
32
|
+
.pull-right= link_to t('spina.permanently_delete'), admin_journal_issue_path(@issue), method: :delete, data: { confirm: t('.delete_confirmation', number: @issue.number) }, class: 'button button-link button-danger'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
%tr{ data: { id: issue.id } }
|
2
|
+
%td= issue.volume.number
|
3
|
+
%td.position-display= issue.number
|
4
|
+
%td= issue.title
|
5
|
+
%td= time_tag issue.date, format: :iso8601
|
6
|
+
%td.nowrap.align-right
|
7
|
+
= link_to edit_admin_journal_issue_path(issue.id), class: 'button button-link' do
|
8
|
+
= icon 'pencil-outline'
|
9
|
+
= t '.view'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- content_for(:header_actions) do
|
2
|
+
= link_to new_admin_journal_issue_path, class: 'button button-primary' do
|
3
|
+
= icon 'plus'
|
4
|
+
= t '.new'
|
5
|
+
|
6
|
+
.well
|
7
|
+
.table-container
|
8
|
+
%table.table
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= ::Spina::Admin::Journal::Volume.human_attribute_name :number
|
12
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :number
|
13
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :title
|
14
|
+
%th= ::Spina::Admin::Journal::Issue.human_attribute_name :date
|
15
|
+
%th
|
16
|
+
|
17
|
+
%tbody
|
18
|
+
= render @issues.any? ? @issues : 'empty_list', message: t('.empty')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
- if @journal.errors.any?
|
2
|
+
- content_for :notifications do
|
3
|
+
.notification.notification-danger.animated.fadeInRight
|
4
|
+
= icon 'exclamation'
|
5
|
+
.notification-message
|
6
|
+
= t 'spina.notifications.alert'
|
7
|
+
%small= @journal.errors.full_messages.join('<br />').html_safe
|
8
|
+
= link_to '#', data: { close_notification: true } do
|
9
|
+
= icon 'cross'
|
10
|
+
|
11
|
+
= form_for @journal, html: { autocomplete: "off" } do |f|
|
12
|
+
%header#header
|
13
|
+
.breadcrumbs
|
14
|
+
= render_breadcrumbs
|
15
|
+
#header_actions
|
16
|
+
%button.button.button-primary{ type: 'submit', style: 'margin-right: 0', data: { disable_with: t('spina.pages.saving') } }
|
17
|
+
= icon 'check'
|
18
|
+
= t '.save'
|
19
|
+
.tab-content.active
|
20
|
+
.page-form
|
21
|
+
.page-form-group
|
22
|
+
.page-form-label
|
23
|
+
= ::Spina::Admin::Journal::Journal.human_attribute_name :name
|
24
|
+
.page-form-content
|
25
|
+
= f.text_field :name
|
26
|
+
= f.fields_for :"#{@locale}_content", @parts do |ff|
|
27
|
+
= ff.hidden_field :type, value: ff.object.class.name
|
28
|
+
= ff.hidden_field :title
|
29
|
+
= ff.hidden_field :name
|
30
|
+
|
31
|
+
.page-form-group.page-part{ data: { name: ff.object.name } }
|
32
|
+
= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.name)}/form", f: ff
|
33
|
+
|
34
|
+
- unless @journal.new_record?
|
35
|
+
.pull-right= link_to t('spina.permanently_delete'), admin_journal_journal_path(@journal), method: :delete, data: { confirm: t('.delete_confirmation', name: @journal.name) }, class: 'button button-link button-danger'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|