Class: TinyAdmin::Views::Actions::Index
- Inherits:
-
DefaultLayout
- Object
- Phlex::HTML
- BasicLayout
- DefaultLayout
- TinyAdmin::Views::Actions::Index
- Defined in:
- lib/tiny_admin/views/actions/index.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#links ⇒ Object
Returns the value of attribute links.
-
#pagination_component ⇒ Object
Returns the value of attribute pagination_component.
-
#prepare_record ⇒ Object
Returns the value of attribute prepare_record.
-
#records ⇒ Object
Returns the value of attribute records.
-
#slug ⇒ Object
Returns the value of attribute slug.
Attributes inherited from DefaultLayout
#flash_component, #head_component, #messages, #navbar_component, #options, #title
Attributes inherited from BasicLayout
Instance Method Summary collapse
Methods inherited from BasicLayout
#label_for, #update_attributes
Methods included from Utils
#humanize, #params_to_s, #prepare_page, #to_class
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def actions @actions end |
#fields ⇒ Object
Returns the value of attribute fields.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def fields @fields end |
#filters ⇒ Object
Returns the value of attribute filters.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def filters @filters end |
#links ⇒ Object
Returns the value of attribute links.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def links @links end |
#pagination_component ⇒ Object
Returns the value of attribute pagination_component.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def pagination_component @pagination_component end |
#prepare_record ⇒ Object
Returns the value of attribute prepare_record.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def prepare_record @prepare_record end |
#records ⇒ Object
Returns the value of attribute records.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def records @records end |
#slug ⇒ Object
Returns the value of attribute slug.
7 8 9 |
# File 'lib/tiny_admin/views/actions/index.rb', line 7 def slug @slug end |
Instance Method Details
#view_template ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/tiny_admin/views/actions/index.rb', line 16 def view_template super do div(class: 'index') { div(class: 'row') { div(class: 'col-4') { h1(class: 'title') { title } } div(class: 'col-8') { } } div(class: 'row') { div_class = filters&.any? ? 'col-9' : 'col-12' div(class: div_class) { table(class: 'table') { table_header if fields.any? table_body } render pagination_component if pagination_component } if filters&.any? div(class: 'col-3') { filters_form = TinyAdmin::Views::Components::FiltersForm.new filters_form.update_attributes(section_path: TinyAdmin.route_for(slug), filters: filters) render filters_form } end } render TinyAdmin::Views::Components::Widgets.new() } end end |