Class: Spina::Admin::Journal::ListComponent
- Inherits:
-
ApplicationComponent
- Object
- Spina::ApplicationComponent
- ApplicationComponent
- Spina::Admin::Journal::ListComponent
- Defined in:
- app/components/spina/admin/journal/list_component.rb
Overview
A generic implementation of a list, resembling Spina’s page list.
Direct Known Subclasses
AffiliationsListComponent, ArticlesListComponent, AuthorsListComponent, AuthorshipsListComponent, InstitutionsListComponent, IssuesListComponent, LicencesListComponent, VolumesListComponent
Instance Attribute Summary collapse
-
#sortable ⇒ Object
readonly
Returns the value of attribute sortable.
Instance Method Summary collapse
-
#initialize(list_items:, sortable: false, sort_path: '') ⇒ ListComponent
constructor
A new instance of ListComponent.
- #sortable? ⇒ Boolean
Constructor Details
#initialize(list_items:, sortable: false, sort_path: '') ⇒ ListComponent
Returns a new instance of ListComponent.
10 11 12 13 14 |
# File 'app/components/spina/admin/journal/list_component.rb', line 10 def initialize(list_items:, sortable: false, sort_path: '') @sortable = sortable @list_items = list_items @sort_path = sort_path end |
Instance Attribute Details
#sortable ⇒ Object (readonly)
Returns the value of attribute sortable.
8 9 10 |
# File 'app/components/spina/admin/journal/list_component.rb', line 8 def sortable @sortable end |
Instance Method Details
#sortable? ⇒ Boolean
16 17 18 |
# File 'app/components/spina/admin/journal/list_component.rb', line 16 def sortable? sortable end |