pg_rails 7.6.40 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf260a16e98842bebe950a0d4c3253d6c63f2690a922ec767c04d8a99ae7a0f7
4
- data.tar.gz: 57dfdff6f3042539d11089edccf7fa32df6c38f86d151256a1536f5efe6d073b
3
+ metadata.gz: 64c0c348910ec6e2795eebf4add22342e4f99c1e0a190a9a8f37299b542c5804
4
+ data.tar.gz: d128c7801a01c1beb02c52c3033b90128a6a33e2a93737972f4475a18e7d0112
5
5
  SHA512:
6
- metadata.gz: e6fa99a2c8881e8f615839ce690c7cb9bf1d3c3ed3cf31f5490641bc253bd2de7b8826ee7c9c2374716dc8b85653db0d066d5bf5dcd4739d41bac81ff2938fbc
7
- data.tar.gz: 65c53c5d31a893c6700347d16f9e3b2146a82b21ca2b5905fc214ab551ff844c9b9880118f59a1adc030cd8636fffd44908c5032482e28e3c1501dc14041af9e
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
  }
@@ -14,4 +14,5 @@
14
14
  i.bi.bi-pencil
15
15
  span = @model.decorate.send(@attribute)
16
16
  - else
17
- = @model.decorate.send(@attribute)
17
+ span.inline-no-edit
18
+ = @model.decorate.send(@attribute)
@@ -75,7 +75,7 @@ module Users
75
75
  end
76
76
 
77
77
  def atributos_para_listar
78
- %i[nombre owner]
78
+ %i[logo_f nombre owner]
79
79
  end
80
80
  end
81
81
  end
@@ -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
@@ -3,3 +3,8 @@
3
3
  - content_for(:padding_top_class) { 'pt-0' }
4
4
 
5
5
  = render template: 'pg_engine/base/index'
6
+
7
+ css:
8
+ .listado {
9
+ vertical-align: middle;
10
+ }
@@ -5,7 +5,7 @@
5
5
  .text-center
6
6
  .d-flex.justify-content-center.gap-2.align-items-center.m-3
7
7
  - if @account.logo.present?
8
- = image_tag @account.logo, style: 'max-height:3em'
8
+ = image_tag @account.logo.variant(:thumb), style: 'max-height:3em'
9
9
  .fs-1
10
10
  = @account
11
11
 
@@ -187,6 +187,8 @@ es:
187
187
  attributes:
188
188
  account:
189
189
  owner: Administrado por
190
+ logo/scoped:
191
+ listado_header: ""
190
192
  user_account:
191
193
  membership_status: Estado
192
194
  user: Nombre
@@ -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 show = row.querySelector('.bi-eye-fill')
18
- if (show) {
19
- const link = show.closest('a')
20
- if (link) {
21
- link.click()
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
  }
@@ -77,7 +77,6 @@ class Navbar
77
77
 
78
78
  def any_children_active?(entry, request)
79
79
  entry[:children].any? { |child| active_entry?(child, request) }
80
- # TODO: quitar
81
80
  end
82
81
 
83
82
  def hide_entry?(entry)
@@ -16,7 +16,8 @@ div id="sidebar" class="#{@navbar_opened_class} flex-shrink-0 d-none d-#{@breakp
16
16
  - else
17
17
  span.bi.bi-chevron-right.ms-1.align-text-bottom style="font-size: 0.7em"
18
18
 
19
- .collapse data-turbo-temporary=('true' unless active) class="#{ 'show' if active}" id=entry_id
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)
@@ -21,7 +21,8 @@
21
21
  - else
22
22
  span.bi.bi-chevron-right.ms-1.align-text-bottom style="font-size: 0.7em"
23
23
 
24
- .collapse data-turbo-temporary=('true' unless active) class="#{ 'show' if active}" id=entry_id
24
+ / data-turbo-temporary=('true' unless active)
25
+ .collapse class="#{ 'show' if active}" id=entry_id
25
26
  .collapse-inner
26
27
  - entry[:children].each do |child|
27
28
  - next if @navbar.hide_entry?(child)
@@ -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 = link_to ua.account, tenant_root_path(tid: ua.to_param), class: 'dropdown-item'
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 = link_to ua.account, tenant_root_path(tid: ua.to_param), class: 'dropdown-item'
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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  # :nocov:
4
4
  module PgRails
5
- VERSION = '7.6.40'
5
+ VERSION = '7.6.41'
6
6
  end
7
7
  # :nocov:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.6.40
4
+ version: 7.6.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso