pg_rails 7.6.39 → 7.6.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/pg_engine/app/assets/stylesheets/tables.scss +5 -1
- data/pg_engine/app/components/inline_edit/inline_show_component.html.slim +2 -1
- data/pg_engine/app/controllers/users/accounts_controller.rb +1 -1
- data/pg_engine/app/decorators/account_decorator.rb +8 -0
- data/pg_engine/app/decorators/user_account_decorator.rb +1 -1
- data/pg_engine/app/views/pg_engine/base/index.html.slim +2 -0
- data/pg_engine/app/views/users/accounts/index.html.slim +6 -0
- data/pg_engine/app/views/users/accounts/show.html.slim +1 -1
- data/pg_engine/config/locales/es.yml +2 -0
- data/pg_layout/app/assets/stylesheets/sidebar.scss +7 -4
- data/pg_layout/app/javascript/config/index.js +11 -5
- data/pg_layout/app/lib/navbar.rb +0 -1
- data/pg_layout/app/views/layouts/pg_layout/containerized.html.slim +3 -1
- data/pg_layout/app/views/pg_layout/_sidebar.html.slim +6 -5
- data/pg_layout/app/views/pg_layout/_sidebar_mobile.html.slim +22 -2
- data/pg_layout/app/views/pg_layout/_signed_in_links.html.slim +12 -2
- data/pg_rails/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64c0c348910ec6e2795eebf4add22342e4f99c1e0a190a9a8f37299b542c5804
|
4
|
+
data.tar.gz: d128c7801a01c1beb02c52c3033b90128a6a33e2a93737972f4475a18e7d0112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1561850b970f4c782facbdca1169edda0264795e3f67c7be1525a08bd4bb6405b2b43e57b54ba5d0e24d62423185b205f3e9491b98559da444515aa9e79d6a10
|
7
|
+
data.tar.gz: e57dfba1fbbe3adbbcf8019807bfd5cdddc3fc7a97a2081e381ab369ebf7b8c35cda2fcd97fa22af64c030140c5c51caa4fb257444fa4d662dbc4d2a85a6449c
|
@@ -23,7 +23,11 @@ $values: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100;
|
|
23
23
|
}
|
24
24
|
|
25
25
|
// Table row clickable (bindListingClick)
|
26
|
-
.listado tr:has(td:hover):has(.bi-eye-fill):not(:has(.actions-wrapper:hover)):not(:has(a:hover)):not(:has(.inline-edit:hover)) td {
|
26
|
+
.listado tr:has(td:hover):has(.bi-eye-fill):not(:has(.actions-wrapper:hover)):not(:has(a:hover)):not(:has(.inline-edit:hover)):not(:has(.inline-no-edit:hover)) td {
|
27
|
+
background-color: #f2f2f2;
|
28
|
+
cursor: pointer;
|
29
|
+
}
|
30
|
+
.listado tr:has(td:hover):has(.main-row-link):not(:has(.actions-wrapper:hover)):not(:has(a:hover)):not(:has(.inline-edit:hover)):not(:has(.inline-no-edit:hover)) td {
|
27
31
|
background-color: #f2f2f2;
|
28
32
|
cursor: pointer;
|
29
33
|
}
|
@@ -33,4 +33,12 @@ class AccountDecorator < PgEngine::BaseRecordDecorator
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
36
|
+
|
37
|
+
def logo_f
|
38
|
+
if logo.present?
|
39
|
+
image_tag logo.variant(:thumb), style: 'max-height:3em'
|
40
|
+
else
|
41
|
+
content_tag 'i', nil, class: 'bi bi-bag-fill text-center d-inline-block', style: 'font-size: 1.7em; width: 1.6em'
|
42
|
+
end
|
43
|
+
end
|
36
44
|
end
|
@@ -15,7 +15,7 @@ class UserAccountDecorator < PgEngine::BaseRecordDecorator
|
|
15
15
|
helpers.content_tag :span do
|
16
16
|
h.link_to h.tenant_root_path(tid: object.to_param),
|
17
17
|
'data-turbo-frame': :_top,
|
18
|
-
class: 'btn btn-sm btn-primary' do
|
18
|
+
class: 'btn btn-sm btn-primary main-row-link' do
|
19
19
|
'<i class="bi bi-box-arrow-in-right"></i> Ingresar'.html_safe
|
20
20
|
end
|
21
21
|
end
|
@@ -53,6 +53,8 @@
|
|
53
53
|
tr
|
54
54
|
th
|
55
55
|
- atributos_para_listar.each do |att|
|
56
|
+
/ TODO: poder configurar el ordenable en false
|
57
|
+
/ Sería ideal hacer algo OOP, pero es medio bardo
|
56
58
|
th.text-nowrap style="font-size: 0.8em" = encabezado att, ordenable: true
|
57
59
|
- if action_name == 'archived'
|
58
60
|
th.text-nowrap style="font-size: 0.8em" = encabezado :discarded_at, ordenable: true
|
@@ -1,4 +1,10 @@
|
|
1
1
|
- content_for(:container_class) { 'container border p-0 my-3' }
|
2
2
|
- content_for(:container_style) { 'max-width: 50em; xborder-left: 1px solid grey' }
|
3
|
+
- content_for(:padding_top_class) { 'pt-0' }
|
3
4
|
|
4
5
|
= render template: 'pg_engine/base/index'
|
6
|
+
|
7
|
+
css:
|
8
|
+
.listado {
|
9
|
+
vertical-align: middle;
|
10
|
+
}
|
@@ -54,13 +54,16 @@ $chevron-color: 200,200,200,.5;
|
|
54
54
|
|
55
55
|
.navbar__nav-button[aria-expanded=true] {
|
56
56
|
font-weight: bold;
|
57
|
+
background-color: tint-color($primary, 5%);
|
57
58
|
}
|
58
59
|
|
59
60
|
// Child entries
|
60
|
-
#sidebar .
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
#sidebar, .offcanvas {
|
62
|
+
.collapse-inner {
|
63
|
+
background-color: tint-color($primary, 5%);
|
64
|
+
padding-bottom: 0.1em;
|
65
|
+
padding-top: 0.1em;
|
66
|
+
}
|
64
67
|
}
|
65
68
|
|
66
69
|
// Los small-items están deprecados
|
@@ -11,14 +11,20 @@ function bindListingClick () {
|
|
11
11
|
document.body.onclick = (ev) => {
|
12
12
|
if (ev.target.closest('a')) return
|
13
13
|
if (ev.target.closest('.inline-edit')) return
|
14
|
+
if (ev.target.closest('.inline-no-edit')) return
|
14
15
|
if (ev.target.closest('.listado')) {
|
15
16
|
const row = ev.target.closest('tr')
|
16
17
|
if (row) {
|
17
|
-
const
|
18
|
-
if (
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
const mainRowLink = row.querySelector('.main-row-link')
|
19
|
+
if (mainRowLink) {
|
20
|
+
mainRowLink.click()
|
21
|
+
} else {
|
22
|
+
const show = row.querySelector('.bi-eye-fill')
|
23
|
+
if (show) {
|
24
|
+
const link = show.closest('a')
|
25
|
+
if (link) {
|
26
|
+
link.click()
|
27
|
+
}
|
22
28
|
}
|
23
29
|
}
|
24
30
|
}
|
data/pg_layout/app/lib/navbar.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
- content_for :content do
|
2
2
|
- klass = modal_targeted? ? '' : (yield(:container_class).presence || 'container-fluid')
|
3
|
-
|
3
|
+
- padding_top_class = yield(:padding_top_class).presence || 'pt-3'
|
4
|
+
|
5
|
+
div class="#{padding_top_class} #{klass}" style=yield(:container_style)
|
4
6
|
= content_for?(:containerized_content) ? yield(:containerized_content) : yield
|
5
7
|
|
6
8
|
= render template: 'layouts/pg_layout/base'
|
@@ -5,18 +5,19 @@ div id="sidebar" class="#{@navbar_opened_class} flex-shrink-0 d-none d-#{@breakp
|
|
5
5
|
ul.list-unstyled.ps-0.mt-5
|
6
6
|
- @navbar.sidebar.each do |entry|
|
7
7
|
- next if @navbar.hide_entry?(entry)
|
8
|
+
- active = @navbar.active_entry?(entry, request)
|
8
9
|
li.mb-1
|
9
10
|
- if entry[:children].present?
|
10
11
|
- entry_id = "nav-entry-#{entry[:orig_idx]}"
|
11
|
-
- active = @navbar.active_entry?(entry, request)
|
12
12
|
a class="d-inline-flex text-decoration-none navbar__nav-button #{ active ? '' : 'collapsed'} #{entry[:attributes]}" data-bs-toggle="collapse" href="##{entry_id}" role="button" aria-expanded="#{ active ? 'true' : 'false'}" aria-controls=entry_id
|
13
13
|
= entry[:title]
|
14
14
|
- if active
|
15
|
-
span.bi.bi-chevron-down.ms-1 style="font-size: 0.7em"
|
15
|
+
span.bi.bi-chevron-down.ms-1.align-text-bottom style="font-size: 0.7em"
|
16
16
|
- else
|
17
|
-
span.bi.bi-chevron-right.ms-1 style="font-size: 0.7em"
|
17
|
+
span.bi.bi-chevron-right.ms-1.align-text-bottom style="font-size: 0.7em"
|
18
18
|
|
19
|
-
|
19
|
+
/ data-turbo-temporary=('true' unless active)
|
20
|
+
.collapse class="#{ 'show' if active}" id=entry_id
|
20
21
|
.collapse-inner
|
21
22
|
- entry[:children].each do |child|
|
22
23
|
- next if @navbar.hide_entry?(child)
|
@@ -24,5 +25,5 @@ div id="sidebar" class="#{@navbar_opened_class} flex-shrink-0 d-none d-#{@breakp
|
|
24
25
|
a href=child[:path] class="d-inline-flex text-decoration-none navbar__nav-button #{@navbar.active_entry?(child, request) ? 'active' : ''} #{child[:attributes]}"
|
25
26
|
= child[:title]
|
26
27
|
- else
|
27
|
-
a href=entry[:path] class="d-inline-flex text-decoration-none navbar__nav-button #{
|
28
|
+
a href=entry[:path] class="d-inline-flex text-decoration-none navbar__nav-button #{active ? 'active' : ''} #{entry[:attributes]}"
|
28
29
|
= entry[:title]
|
@@ -9,9 +9,29 @@
|
|
9
9
|
ul.list-unstyled.mt-4
|
10
10
|
- @navbar.sidebar.each do |entry|
|
11
11
|
- next if @navbar.hide_entry?(entry)
|
12
|
+
- active = @navbar.active_entry?(entry, request)
|
12
13
|
li
|
13
|
-
|
14
|
-
= entry[:
|
14
|
+
- if entry[:children].present?
|
15
|
+
- entry_id = "nav-entry-#{entry[:orig_idx]}"
|
16
|
+
|
17
|
+
a class="d-inline-flex text-decoration-none navbar__nav-button text-light #{ active ? '' : 'collapsed'} #{entry[:attributes]}" data-bs-toggle="collapse" href="##{entry_id}" role="button" aria-expanded="#{ active ? 'true' : 'false'}" aria-controls=entry_id
|
18
|
+
= entry[:title]
|
19
|
+
- if active
|
20
|
+
span.bi.bi-chevron-down.ms-1.align-text-bottom style="font-size: 0.7em"
|
21
|
+
- else
|
22
|
+
span.bi.bi-chevron-right.ms-1.align-text-bottom style="font-size: 0.7em"
|
23
|
+
|
24
|
+
/ data-turbo-temporary=('true' unless active)
|
25
|
+
.collapse class="#{ 'show' if active}" id=entry_id
|
26
|
+
.collapse-inner
|
27
|
+
- entry[:children].each do |child|
|
28
|
+
- next if @navbar.hide_entry?(child)
|
29
|
+
.mb-1
|
30
|
+
a href=child[:path] class="d-inline-flex text-decoration-none navbar__nav-button text-light #{@navbar.active_entry?(child, request) ? 'active' : ''} #{child[:attributes]}"
|
31
|
+
= child[:title]
|
32
|
+
- else
|
33
|
+
a href=entry[:path] class="navbar__nav-button pe-4 text-light #{active ? 'active' : ''} #{entry[:attributes]}"
|
34
|
+
= entry[:title]
|
15
35
|
css:
|
16
36
|
.offcanvas a { text-decoration: none; }
|
17
37
|
.offcanvas li { xmargin-top: 0.75em; }
|
@@ -15,7 +15,13 @@ ul.navbar-nav.gap-3.align-items-center class="gap-#{@breakpoint_navbar_expand}-0
|
|
15
15
|
- if @other_active_accounts&.any?
|
16
16
|
h6.dropdown-header Cambiar a:
|
17
17
|
- @other_active_accounts.each do |ua|
|
18
|
-
li
|
18
|
+
li
|
19
|
+
= link_to tenant_root_path(tid: ua.to_param), class: 'dropdown-item' do
|
20
|
+
- if ua.account.logo.present?
|
21
|
+
span = image_tag ua.account.logo.variant(:thumb), class: 'rounded-circle border border-2 me-2', width: 40, height: 40
|
22
|
+
- else
|
23
|
+
i.bi.bi-bag-fill.me-2.d-inline-block.text-center style="font-size: 1.7em; width: 1.6em"
|
24
|
+
span = ua.account
|
19
25
|
li
|
20
26
|
hr.dropdown-divider
|
21
27
|
li = link_to "Administrar #{Account.nombre_plural.downcase}", users_accounts_path(tid: nil), class: 'dropdown-item'
|
@@ -27,7 +33,11 @@ ul.navbar-nav.gap-3.align-items-center class="gap-#{@breakpoint_navbar_expand}-0
|
|
27
33
|
= Account.nombre_plural
|
28
34
|
ul.dropdown-menu
|
29
35
|
- @other_active_accounts.each do |ua|
|
30
|
-
li
|
36
|
+
li
|
37
|
+
= link_to tenant_root_path(tid: ua.to_param), class: 'dropdown-item' do
|
38
|
+
- if ua.account.logo.present?
|
39
|
+
span = image_tag ua.account.logo.variant(:thumb), class: 'rounded-circle border border-2 me-2', width: 40, height: 40
|
40
|
+
span = ua.account
|
31
41
|
li
|
32
42
|
hr.dropdown-divider
|
33
43
|
li = link_to "Administrar #{Account.nombre_plural.downcase}", users_accounts_path(tid: nil), class: 'dropdown-item'
|
data/pg_rails/lib/version.rb
CHANGED