pg_rails 7.0.8.pre.alpha.43 → 7.0.8.pre.alpha.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +3 -5
- data/pg_engine/app/models/user.rb +1 -1
- data/pg_engine/config/locales/es.yml +3 -0
- data/pg_engine/config/simple_form/simple_form_bootstrap.rb +16 -0
- data/pg_layout/app/javascript/controllers/navbar_controller.js +8 -1
- data/pg_layout/app/views/pg_layout/_navbar.html.erb +4 -1
- data/pg_layout/app/views/pg_layout/_sidebar_mobile.html.erb +3 -6
- data/pg_rails/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24ba4e7696371a6111d27203476e573c6ea9d0a182f8495a9109effa3ea310e7
|
4
|
+
data.tar.gz: ff5baec88b8d412bd3cf462c51afeddaa457ded9c999f47d14d350951f2a1497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90fe56d611f0804685215c9624d6eeae554c8caae3904e224d6a8904623753fc51e47b12eb3208060c9f6194719ec5ba064b643d0b92c59d7cea36cf81799bdd
|
7
|
+
data.tar.gz: c633ac8e64af14d6ae0afb11c53d6944c1358e081e871656c9490f2184d3488e565c80217b5f78fdf0a91af6ccb38d43cde746335fe97b2916734b7fb21d6d01
|
@@ -56,11 +56,9 @@ module PgEngine
|
|
56
56
|
|
57
57
|
before_action do
|
58
58
|
@breakpoint_navbar_expand = 'md'
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
'opened'
|
63
|
-
end
|
59
|
+
navbar_expanded = cookies[:navbar_expand] != 'false'
|
60
|
+
@navbar_opened_class = navbar_expanded ? 'opened' : ''
|
61
|
+
@navbar_chevron_class = navbar_expanded ? 'bi-chevron-left' : 'bi-chevron-right'
|
64
62
|
@navbar = Navbar.new(Current.user)
|
65
63
|
|
66
64
|
if Rollbar.configuration.enabled && Rails.application.credentials.rollbar.present?
|
@@ -45,7 +45,7 @@ class User < ApplicationRecord
|
|
45
45
|
validates_uniqueness_of :email, message: 'ya pertenece a un usuario'
|
46
46
|
validates_format_of :email, with: /\A[^@\s]+@[^@\s]+\z/
|
47
47
|
validates_presence_of :password, if: :password_required?
|
48
|
-
validates_confirmation_of :password, if: :password_required?, message: '
|
48
|
+
validates_confirmation_of :password, if: :password_required?, message: 'no coincide'
|
49
49
|
validates_length_of :password, if: :password_required?, within: 6..128,
|
50
50
|
message: 'es demasiado corta (6 caracteres mínimo)'
|
51
51
|
|
@@ -69,6 +69,22 @@ SimpleForm.setup do |config|
|
|
69
69
|
b.use :hint, wrap_with: { class: 'form-text' }
|
70
70
|
end
|
71
71
|
|
72
|
+
config.wrappers :vertical_form_inline_wrap, class: 'mb-3' do |b|
|
73
|
+
b.use :html5
|
74
|
+
b.use :placeholder
|
75
|
+
b.optional :maxlength
|
76
|
+
b.optional :minlength
|
77
|
+
b.optional :pattern
|
78
|
+
b.optional :min_max
|
79
|
+
b.optional :readonly
|
80
|
+
b.use :label, class: 'form-label d-block'
|
81
|
+
b.wrapper class: 'd-inline-block' do |bb|
|
82
|
+
bb.use :input, class: 'form-control', error_class: 'is-invalid'
|
83
|
+
end
|
84
|
+
b.use :error, wrap_with: { class: 'invalid-feedback' }
|
85
|
+
b.use :hint, wrap_with: { class: 'form-text' }
|
86
|
+
end
|
87
|
+
|
72
88
|
config.wrappers :vertical_no_margin_control, &control_wrapper
|
73
89
|
|
74
90
|
config.wrappers :vertical_no_margin_select, &select_wrapper
|
@@ -3,7 +3,14 @@ import Cookies from './../utils/cookies'
|
|
3
3
|
|
4
4
|
export default class extends Controller {
|
5
5
|
expandNavbar (e) {
|
6
|
-
|
6
|
+
const icon = this.element.querySelector('i')
|
7
|
+
if (document.getElementById('sidebar').classList.toggle('opened')) {
|
8
|
+
icon.classList.add('bi-chevron-left')
|
9
|
+
icon.classList.remove('bi-chevron-right')
|
10
|
+
} else {
|
11
|
+
icon.classList.remove('bi-chevron-left')
|
12
|
+
icon.classList.add('bi-chevron-right')
|
13
|
+
}
|
7
14
|
const isOpened = document.getElementById('sidebar').classList.contains('opened')
|
8
15
|
new Cookies().setCookie('navbar_expand', isOpened, 30)
|
9
16
|
}
|
@@ -2,13 +2,16 @@
|
|
2
2
|
<div class="container-fluid">
|
3
3
|
<% unless @sidebar == false %>
|
4
4
|
<button data-controller="navbar" data-action="navbar#expandNavbar" class="btn btn-outline-light me-2 d-none d-<%= @breakpoint_navbar_expand %>-inline-block">
|
5
|
-
<i class="bi
|
5
|
+
<i class="bi <%= @navbar_chevron_class %>"></i>
|
6
6
|
</button>
|
7
7
|
|
8
8
|
<button class="btn btn-outline-light d-inline-block d-<%= @breakpoint_navbar_expand %>-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
|
9
9
|
<i class="bi bi-list"></i>
|
10
10
|
</button>
|
11
11
|
<% end %>
|
12
|
+
<% @navbar.extensiones.each do |extension| %>
|
13
|
+
<%= extension %>
|
14
|
+
<% end %>
|
12
15
|
<%= @navbar.logo if @navbar.logo.present? %>
|
13
16
|
</div>
|
14
17
|
</nav>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
|
2
|
-
<div class="offcanvas-header">
|
2
|
+
<div class="offcanvas-header" data-bs-theme="dark">
|
3
3
|
<h5 class="offcanvas-title" id="offcanvasExampleLabel"></h5>
|
4
4
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
5
5
|
</div>
|
6
6
|
<div class="offcanvas-body">
|
7
7
|
<% if user_signed_in? %>
|
8
|
-
<span class="text-
|
8
|
+
<span class="text-light"><%= Current.user %></span>
|
9
9
|
<hr>
|
10
10
|
<% end %>
|
11
11
|
<ul class="list-unstyled mt-4">
|
@@ -15,16 +15,13 @@
|
|
15
15
|
<li>
|
16
16
|
<a
|
17
17
|
href="<%= entry[:path] %>"
|
18
|
-
class="<%= @navbar.active_entry?(entry, request) ? 'active' : '' %>"
|
18
|
+
class="text-light <%= @navbar.active_entry?(entry, request) ? 'active' : '' %>"
|
19
19
|
<%= entry[:attributes] %>
|
20
20
|
>
|
21
21
|
<%= entry[:title] %>
|
22
22
|
</a>
|
23
23
|
</li>
|
24
24
|
<% end %>
|
25
|
-
<% @navbar.extensiones.each do |extension| %>
|
26
|
-
<%= extension %>
|
27
|
-
<% end %>
|
28
25
|
</ul>
|
29
26
|
</div>
|
30
27
|
</div>
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|