administrador 0.0.28.pre → 0.0.30.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/administrador/application/pagination_size.js.coffee +13 -0
- data/app/assets/javascripts/administrador.js +1 -1
- data/app/assets/stylesheets/administrador/application/breadcrumbs.css +1 -1
- data/app/assets/stylesheets/administrador/application/engines.css +36 -0
- data/app/assets/stylesheets/administrador/application/layout.css +23 -0
- data/app/assets/stylesheets/administrador/application/page-actions.css +13 -3
- data/app/assets/stylesheets/administrador/application/pagination.css +6 -0
- data/app/assets/stylesheets/administrador/application/sidebar-theme.css +2 -2
- data/app/assets/stylesheets/administrador.css +1 -0
- data/app/concerns/administrador/controller/engine_sidebar_concern.rb +17 -0
- data/app/concerns/administrador/controller/resources_concern.rb +4 -0
- data/app/controllers/administrador/home_controller/base.rb +1 -0
- data/app/controllers/administrador/home_controller.rb +2 -0
- data/app/controllers/administrador/resource_controller/base.rb +1 -0
- data/app/controllers/administrador/resources_controller/base.rb +1 -0
- data/app/controllers/administrador/service_controller/base.rb +1 -0
- data/app/view_helpers/administrador/application_view_helper.rb +9 -5
- data/app/view_helpers/administrador/breadcrumbs_view_helper.rb +5 -5
- data/app/views/administrador/application/_navbar.html.haml +4 -4
- data/app/views/administrador/application/sidebars/_engine.html.haml +32 -27
- data/app/views/administrador/application_view_helper/_render_engine_sidebars.html.haml +2 -1
- data/app/views/administrador/application_view_helper/_render_registered_engine_widget.html.haml +41 -0
- data/app/views/administrador/home/index.de.html.haml +4 -6
- data/app/views/administrador/home_controller/base/index.html.haml +2 -3
- data/app/views/administrador/resources_controller/base/_edit_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/_new_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/_pagination.html.haml +8 -1
- data/app/views/administrador/resources_controller/base/_show_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/edit.html.haml +1 -1
- data/app/views/administrador/resources_controller/base/index.html.haml +8 -4
- data/app/views/administrador/resources_controller/base/new.html.haml +1 -1
- data/app/views/administrador/service_controller/base/create.html.haml +1 -1
- data/app/views/administrador/service_controller/base/new.html.haml +1 -1
- data/app/views/layouts/administrador/application.html.haml +35 -22
- data/config/locales/de.yml +4 -1
- data/config/locales/en.yml +4 -1
- data/lib/administrador/configuration.rb +6 -2
- data/lib/administrador/feature.rb +2 -0
- data/lib/administrador/registered_engine.rb +41 -10
- data/lib/administrador/version.rb +1 -1
- data/lib/administrador.rb +1 -0
- data/lib/generators/administrador/install/templates/initializer.rb +10 -4
- metadata +46 -17
- data/app/assets/javascripts/administrador/application/sidebar.js.coffee~ +0 -104
- data/app/assets/stylesheets/administrador/application/engine-sidebar.css +0 -17
- data/app/assets/stylesheets/administrador/application/sidebar.css~ +0 -51
- data/app/views/administrador/resources_controller/base/_index_table_actions.html.haml~ +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0d8000ae9288c26f8ac3a7fc8d21285abd251da3615ac1a878edd84ea83631
|
4
|
+
data.tar.gz: 6ca07e3d122594f25b115d4e963d03964024770549b29b42aea4a24470f16cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c08bf0cfac988d8c3966274567a9611cf0d14c2d765f275a5374de8e6c8dcc70eb24012fe72316b2c497f09eaa0102d17904593cb1f6821ac73a3415f74b1799
|
7
|
+
data.tar.gz: a0eaced5fad91caae9fb2e4c93a846c8d52846416707cfc0661cb9d52424c6029d1bdf190741cf584d22a7fc78cd9bdb974ab44f19f71d6dcc48a2a809e1ff5a
|
@@ -0,0 +1,13 @@
|
|
1
|
+
$ ->
|
2
|
+
$('[data-select-pagination-size]').on 'change', (e) ->
|
3
|
+
queryParameters = {}
|
4
|
+
queryString = location.search.substring(1)
|
5
|
+
re = /([^&=]+)=([^&]*)/g
|
6
|
+
m = undefined
|
7
|
+
|
8
|
+
while m = re.exec(queryString)
|
9
|
+
queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2])
|
10
|
+
|
11
|
+
per_page = $(@).val()
|
12
|
+
queryParameters['per_page'] = per_page
|
13
|
+
location.search = $.param(queryParameters)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#sidebar-engines .administrador-engine-actions {
|
2
|
+
width: 1rem;
|
3
|
+
min-height: 1px;
|
4
|
+
margin-right: 1rem;
|
5
|
+
}
|
6
|
+
|
7
|
+
#sidebar-engines .administrador-engine-resources-count, .registered-engine-widget .administrador-engine-resources-count {
|
8
|
+
width: 1rem;
|
9
|
+
}
|
10
|
+
|
11
|
+
#sidebar-engines .administrador-engine a {
|
12
|
+
color: grey;
|
13
|
+
}
|
14
|
+
|
15
|
+
#sidebar-engines .administrador-engine .badge-pill, .registered-engine-widget .badge-pill {
|
16
|
+
min-width: 1.75rem;
|
17
|
+
}
|
18
|
+
|
19
|
+
#sidebar-engines .administrador-engine-actions, .registered-engine-widget .administrador-engine-actions {
|
20
|
+
/* width: 2.5rem; */
|
21
|
+
min-height: 1px;
|
22
|
+
margin-right: 0.5rem;
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
.administrador-engine-actions, .administrador-engine-resources-count {
|
27
|
+
display: inline-block;
|
28
|
+
}
|
29
|
+
|
30
|
+
.administrador-engine-resources-count {
|
31
|
+
margin-right: 0.5rem;
|
32
|
+
}
|
33
|
+
|
34
|
+
.registered-engine-widget .badge-pill {
|
35
|
+
min-width: 2.3rem;
|
36
|
+
}
|
@@ -2,10 +2,19 @@ body {
|
|
2
2
|
font-family: 'Poppins', sans-serif;
|
3
3
|
}
|
4
4
|
|
5
|
+
#main-content {
|
6
|
+
padding-top: 4rem;
|
7
|
+
padding-bottom: 3rem;
|
8
|
+
}
|
9
|
+
|
5
10
|
#main-container {
|
6
11
|
padding-top: 1rem;
|
7
12
|
}
|
8
13
|
|
14
|
+
#main-navbar {
|
15
|
+
/* height: 4rem; */
|
16
|
+
}
|
17
|
+
|
9
18
|
#main-navbar-tools .navbar-nav {
|
10
19
|
flex-direction: row;
|
11
20
|
flex-wrap: wrap;
|
@@ -13,4 +22,18 @@ body {
|
|
13
22
|
|
14
23
|
#main-navbar-tools .navbar-nav li {
|
15
24
|
margin-left: 0.75rem;
|
25
|
+
}
|
26
|
+
|
27
|
+
#page-footer {
|
28
|
+
height: 3rem;
|
29
|
+
position: fixed;
|
30
|
+
bottom: 0;
|
31
|
+
width: 100%;
|
32
|
+
}
|
33
|
+
|
34
|
+
.collection-table {
|
35
|
+
white-space: nowrap;
|
36
|
+
}
|
37
|
+
.collection-table td:last-child {
|
38
|
+
width: 100%;
|
16
39
|
}
|
@@ -1,3 +1,13 @@
|
|
1
|
-
.edit-actions
|
2
|
-
|
3
|
-
|
1
|
+
.edit-actions,
|
2
|
+
.show-actions,
|
3
|
+
.index-actions,
|
4
|
+
.new-actions,
|
5
|
+
.create-actions {
|
6
|
+
padding: 1rem;
|
7
|
+
}
|
8
|
+
|
9
|
+
.edit-actions .btn,
|
10
|
+
.show-actions .btn,
|
11
|
+
.index-actions .btn,
|
12
|
+
.new-actions .btn,
|
13
|
+
.create-actions .btn {}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Administrador
|
2
|
+
module Controller
|
3
|
+
module EngineSidebarConcern
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
helper_method :initial_engine_sidebar_state
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def initial_engine_sidebar_state
|
13
|
+
Administrador::Configuration.initial_engine_sidebar_state
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -22,6 +22,10 @@ module Administrador
|
|
22
22
|
with_conditions_from_query(super)
|
23
23
|
end if Administrador.features?(:rao_query)
|
24
24
|
|
25
|
+
def per_page_default
|
26
|
+
Administrador::Configuration.features[:kaminari].options[:per_page_default] || super
|
27
|
+
end if Administrador.features?(:kaminari)
|
28
|
+
|
25
29
|
|
26
30
|
module ResourcesCountConcern
|
27
31
|
extend ActiveSupport::Concern
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Administrador
|
2
2
|
class ApplicationViewHelper < Rao::ViewHelper::Base
|
3
|
-
def
|
4
|
-
Administrador::
|
3
|
+
def registered_engines
|
4
|
+
Administrador::RegisteredEngine.all
|
5
5
|
end
|
6
6
|
|
7
7
|
def filter_attributes_for_form(attribute_names)
|
@@ -24,16 +24,20 @@ module Administrador
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def render_engine_sidebars
|
27
|
-
|
28
|
-
c.render partial: 'administrador/application_view_helper/render_engine_sidebars', locals: { engine:
|
27
|
+
registered_engines.collect do |registered_engine|
|
28
|
+
c.render partial: 'administrador/application_view_helper/render_engine_sidebars', locals: { engine: registered_engine }
|
29
29
|
end.join.html_safe
|
30
30
|
end
|
31
31
|
|
32
32
|
def body_html
|
33
|
-
css_classes = ['administrador', c.controller.class.name.underscore.gsub('/', '-').chomp('_controller'), c.action_name].compact.join(' ')
|
33
|
+
css_classes = ['administrador', 'd-flex flex-column h-100', c.controller.class.name.underscore.gsub('/', '-').chomp('_controller'), c.action_name].compact.join(' ')
|
34
34
|
{ class: css_classes }
|
35
35
|
end
|
36
36
|
|
37
|
+
def render_registered_engine_widget(registered_engine)
|
38
|
+
render registered_engine: registered_engine
|
39
|
+
end
|
40
|
+
|
37
41
|
private
|
38
42
|
|
39
43
|
def bootstrapify_flash_keys(flash)
|
@@ -10,9 +10,9 @@ module Administrador
|
|
10
10
|
if identifier.start_with?('.')
|
11
11
|
prefix = self.class.name.underscore
|
12
12
|
caller_method = caller[0].split(' ').last.gsub("'", '')
|
13
|
-
I18n.t("#{prefix}.#{caller_method}.#{identifier}", options)
|
13
|
+
I18n.t("#{prefix}.#{caller_method}.#{identifier}", *options)
|
14
14
|
else
|
15
|
-
I18n.t(identifier, options)
|
15
|
+
I18n.t(identifier, **options)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -31,9 +31,9 @@ module Administrador
|
|
31
31
|
breadcrumbs << { label: t('.home'), url: c.administrador.root_path, link_html_options: {}, li_html_options: {}}
|
32
32
|
|
33
33
|
if c.respond_to?(:engine_class, true) && c.engine_class.present?
|
34
|
-
|
35
|
-
if
|
36
|
-
breadcrumbs << { label: t("classes.#{
|
34
|
+
registered_engine = Administrador::RegisteredEngine.find_by_class(c.engine_class)
|
35
|
+
if registered_engine.present?
|
36
|
+
breadcrumbs << { label: t("classes.#{registered_engine.engine_class.name.underscore}"), url: c.send(registered_engine.router_name).root_path, link_html_options: {}, li_html_options: {} }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -1,13 +1,13 @@
|
|
1
|
-
%nav.navbar.navbar-
|
1
|
+
%nav.navbar.navbar-dark.bg-dark.fixed-top
|
2
2
|
#main-navbar-content
|
3
3
|
%ul.navbar-nav
|
4
4
|
%li.nav-item
|
5
|
-
%button.btn.btn-circle.btn-lg.btn-
|
5
|
+
%button.btn.btn-circle.btn-lg.btn-dark{ data: { sidebar: { trigger: '#sidebar-engines' } } }
|
6
6
|
%i.fas.fa-bars
|
7
7
|
#main-navbar-tools
|
8
8
|
%ul.navbar-nav
|
9
|
-
- administrador_helper(self).
|
10
|
-
-
|
9
|
+
- administrador_helper(self).registered_engines.each do |registered_engine|
|
10
|
+
- registered_engine.sidebar_controllers.each do |sc|
|
11
11
|
%li.nav-item
|
12
12
|
%button.btn.btn-circle.btn-lg.btn-light{ data: { sidebar: { trigger: "#sidebar-#{sc.name.underscore.gsub('/', '-')}" } } }
|
13
13
|
%i.fas{ class: "fa-#{(sc.icon_name || :'ellipsis-v')}"}
|
@@ -1,34 +1,39 @@
|
|
1
|
-
%aside#sidebar-engines.p-2.pr-0{ data: { sidebar: { position: :left, size: '20rem', state:
|
1
|
+
%aside#sidebar-engines.p-2.pr-0{ data: { sidebar: { position: :left, size: '20rem', state: initial_engine_sidebar_state, mode: :push } } }
|
2
2
|
.container-fluid
|
3
3
|
.row
|
4
4
|
.col-12
|
5
|
-
- administrador_helper(self).
|
5
|
+
- administrador_helper(self).registered_engines.each_with_index do |(engine), index|
|
6
6
|
- next unless engine.options[:show_in_engine_sidebar]
|
7
7
|
.administrador-engine.mb-4.text-secondary{ id: dom_id(engine), class: dom_class(engine) }
|
8
|
-
%h6.
|
9
|
-
%i.fas.fa-home
|
8
|
+
%h6.administrador-engine-name.d-flex.text-uppercase
|
9
|
+
%i.fas.fa-home.mr-1
|
10
10
|
= link_to(send(engine.router_name).root_path, class: 'administrador-link-to-engine-home') do
|
11
11
|
= engine.translated_name
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
%
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
12
|
+
%span.ml-auto
|
13
|
+
%a{ data: { toggle: "collapse" }, href: "#engine-menu-#{index}", role: 'button', aria: { expanded: "false", controls: "engine-menu-#{index}" } }
|
14
|
+
%i.fas.fa-chevron-down
|
15
|
+
.engine-menu.collapse{ id: "engine-menu-#{index}", class: (engine.engine_class == controller.engine_class) ? "show" : nil }
|
16
|
+
%span
|
17
|
+
%ul.list-group.list-group-flush
|
18
|
+
- engine.resources_controllers.each do |rc|
|
19
|
+
%li.list-group-item
|
20
|
+
.administrador-engine-resources-count.float-right
|
21
|
+
%span.badge.badge-pill.badge-success= rc.resource_count
|
22
|
+
.administrador-engine-actions.float-right
|
23
|
+
- if rc.available_rest_actions.include?(:new)
|
24
|
+
%a.administrador-link-to-new-resources{ href: send(engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :new) }
|
25
|
+
%i.fas.fa-plus
|
26
|
+
%a.administrador-link-to-resources{ href: send(engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :index), class: "#{rc.name.underscore.gsub('_controller', '').split('/').last == controller_name ? 'current selected' : ''}" }
|
27
|
+
= rc.resource_class.model_name.human(count: :other)
|
28
|
+
- engine.resource_controllers.each do |rc|
|
29
|
+
%li.list-group-item
|
30
|
+
.administrador-engine-actions.float-right
|
31
|
+
- if rc.available_rest_actions.include?(:new)
|
32
|
+
%a.administrador-link-to-new-resources{ href: send(engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :new) }
|
33
|
+
%i.fas.fa-plus
|
34
|
+
%a.administrador-link-to-resource{ href: send(engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :show) }
|
35
|
+
= rc.resource_class.model_name.human(count: :other)
|
36
|
+
- engine.service_controllers.each do |sc|
|
37
|
+
%li.list-group-item
|
38
|
+
%a.administrador-link-to-service{ href: send(engine.router_name).url_for(controller: "/#{sc.name.underscore.gsub('_controller', '')}", action: :new) }
|
39
|
+
= sc.service_class.model_name.human(count: :other)
|
@@ -4,4 +4,5 @@
|
|
4
4
|
- size = sc.sidebar_size || '250px'
|
5
5
|
- url = sc.sidebar_url || send(engine.router_name).send("#{sc.name.demodulize.underscore.gsub('_controller', '').singularize}_path")
|
6
6
|
- mode = sc.sidebar_mode || :modal
|
7
|
-
%aside.py-2{ id: id, data: { sidebar: { position: position, size: size, state: :closed, mode: :modal, load: url } } }
|
7
|
+
%aside.py-2{ id: id, data: { sidebar: { position: position, size: size, state: :closed, mode: :modal, load: url } } }
|
8
|
+
|
data/app/views/administrador/application_view_helper/_render_registered_engine_widget.html.haml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
.registered-engine-widget
|
2
|
+
.row
|
3
|
+
.col-12
|
4
|
+
%h3= t("classes.#{registered_engine.name.underscore}")
|
5
|
+
|
6
|
+
.row.mb-4
|
7
|
+
.col-12
|
8
|
+
%ul.list-group.list-group-flush
|
9
|
+
- registered_engine.resources_controllers.each do |rc|
|
10
|
+
%li.list-group-item.d-flex
|
11
|
+
%a.administrador-link-to-resources{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :index), class: "#{rc.name.underscore.gsub('_controller', '').split('/').last == controller_name ? 'current selected' : ''}" }
|
12
|
+
= rc.resource_class.model_name.human(count: :other)
|
13
|
+
.ml-auto
|
14
|
+
.administrador-engine-actions
|
15
|
+
.btn-group
|
16
|
+
- if rc.available_rest_actions.include?(:new)
|
17
|
+
%a.btn.btn-xs.btn-success{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :new) }
|
18
|
+
%i.fas.fa-plus
|
19
|
+
- if rc.available_rest_actions.include?(:index)
|
20
|
+
%a.btn.btn-xs.btn-primary{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :index) }
|
21
|
+
%i.fas.fa-eye
|
22
|
+
.administrador-engine-resources-count
|
23
|
+
%span.badge.badge-pill.badge-success= rc.resource_count
|
24
|
+
|
25
|
+
- registered_engine.resource_controllers.each do |rc|
|
26
|
+
%li.list-group-item
|
27
|
+
.administrador-engine-actions.float-right
|
28
|
+
.btn-group
|
29
|
+
- if rc.available_rest_actions.include?(:new)
|
30
|
+
%a.btn.btn-xs.btn-success{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :new) }
|
31
|
+
%i.fas.fa-plus
|
32
|
+
- if rc.available_rest_actions.include?(:show)
|
33
|
+
%a.btn.btn-xs.btn-primary{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :show) }
|
34
|
+
%i.fas.fa-plus
|
35
|
+
%a.administrador-link-to-resource{ href: send(registered_engine.router_name).url_for(controller: "/#{rc.name.underscore.gsub('_controller', '')}", action: :show) }
|
36
|
+
= rc.resource_class.model_name.human(count: :other)
|
37
|
+
|
38
|
+
- registered_engine.service_controllers.each do |sc|
|
39
|
+
%li.list-group-item
|
40
|
+
%a.administrador-link-to-service{ href: send(registered_engine.router_name).url_for(controller: "/#{sc.name.underscore.gsub('_controller', '')}", action: :new) }
|
41
|
+
= sc.service_class.model_name.human(count: :other)
|
@@ -1,6 +1,4 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
%hr.my-4/
|
6
|
-
%p Die in dieser Oberfläche verwalteten Inhalte findest Du mit einem Klick auf das Menü oben links. Zusätzliche Features sind über die Icons oben rechts zu finden.
|
1
|
+
.row
|
2
|
+
- administrador_helper(self).registered_engines.each do |registered_engine|
|
3
|
+
.col-lg-6.col-xl-4
|
4
|
+
= administrador_helper(self).render_registered_engine_widget(registered_engine)
|
@@ -1,5 +1,4 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
%h3= t('.title', engine_name: t("classes.#{engine_class.name.underscore}"))
|
1
|
+
- current_registered_engine = Administrador::RegisteredEngine.find_by_class!(engine_class)
|
2
|
+
= administrador_helper(self).render_registered_engine_widget(current_registered_engine)
|
4
3
|
|
5
4
|
= render partial: 'index_extras'
|
@@ -1,6 +1,5 @@
|
|
1
|
-
= link_to({ action: :index }, class: 'btn btn-light btn-
|
1
|
+
= link_to({ action: :index }, class: 'btn btn-light btn-circle btn-lg') do
|
2
2
|
%i.fas.fa-arrow-left
|
3
|
-
%span.btn-text= t('.back')
|
4
3
|
|
5
4
|
.ml-auto
|
6
5
|
= link_to([resource_namespace, resource], class: 'btn btn-success btn-circle btn-lg') do
|
@@ -1 +1,8 @@
|
|
1
|
-
|
1
|
+
.pagination-controls.w-100.d-flex.justify-content-between
|
2
|
+
.d-hide
|
3
|
+
.d-flex.align-items-center
|
4
|
+
= paginate(collection, theme: 'twitter-bootstrap-4')
|
5
|
+
|
6
|
+
.d-flex.align-items-center
|
7
|
+
%select.pagination-size{ 'data-select-pagination-size': true }
|
8
|
+
= options_for_select({ '1': 1, '5': 5, '10': 10, '15': 15, '20': 20, '50': 50, '100': 100, t('views.pagination_size.all') => 'all' }, per_page)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.row
|
2
2
|
.col-12
|
3
|
-
%h1= t('.title', inflections)
|
3
|
+
%h1= t('.title', **inflections)
|
4
4
|
|
5
5
|
- if Administrador.features?(:rao_query)
|
6
6
|
.row
|
@@ -12,17 +12,21 @@
|
|
12
12
|
.col-12
|
13
13
|
.before-index-table= render partial: 'before_index_table', locals: { collection: @collection }
|
14
14
|
|
15
|
+
- if Administrador.features?(:kaminari) && @collection.respond_to?(:total_pages)
|
16
|
+
.row
|
17
|
+
.col-12
|
18
|
+
= render partial: 'pagination', locals: { collection: @collection }
|
19
|
+
|
15
20
|
.row
|
16
21
|
.col-12
|
17
|
-
= collection_table(collection: @collection, resource_class: resource_class, table_html: "collection-table table table-responsive #{resource_class.name.underscore.pluralize.gsub('/', '-')}
|
22
|
+
= collection_table(collection: @collection, resource_class: resource_class, table_html: "collection-table table table-responsive #{resource_class.name.underscore.pluralize.gsub('/', '-')}") do |table|
|
18
23
|
= render partial: 'index_table', locals: { table: table }
|
19
24
|
= render partial: 'index_table_actions', locals: { table: table }
|
20
25
|
|
21
26
|
- if Administrador.features?(:kaminari) && @collection.respond_to?(:total_pages)
|
22
27
|
.row
|
23
28
|
.col-12.d-flex
|
24
|
-
|
25
|
-
= render partial: 'pagination', locals: { collection: @collection }
|
29
|
+
= render partial: 'pagination', locals: { collection: @collection }
|
26
30
|
|
27
31
|
.row
|
28
32
|
.col-12
|