lato_spaces 3.1.3 → 3.1.5
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/app/models/concerns/lato_spaces/associable_required.rb +1 -4
- data/app/models/concerns/lato_spaces/associable_unique.rb +1 -1
- data/app/views/lato_spaces/application/index.html.erb +2 -2
- data/app/views/lato_spaces/groups/create.html.erb +2 -2
- data/lib/lato_spaces/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: 70979ee95e6c750d066798c627ea760e6eb635275e30e057613bc40c3c4e8a81
|
4
|
+
data.tar.gz: f40be9e0eb4c5fe06ef83727e32c4e9403aaef930c16f1a1dee27cc25928935a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65cf6dade6c4a207e68c71f5e0ac9bd4af8688f104950682bde704c1de4e22bf66fca82309e77287016d6aba2ddd1ad3016b6ef04714ff957c2ec3a3506b0845
|
7
|
+
data.tar.gz: 013c60b9478d2167faa616fa9730ea2f97a55354d2dc25aacc2ae201c881d83062f8361d7b4a6290c48469d6fcc9642f5dfe9f35e5caaef1a4755e1a517be2bd
|
@@ -21,10 +21,7 @@ module LatoSpaces::AssociableRequired
|
|
21
21
|
|
22
22
|
# listen LatoSpaces::Association destroy event to destroy item
|
23
23
|
LatoSpaces::Association.after_destroy do |association|
|
24
|
-
|
25
|
-
self.destroy!
|
26
|
-
end
|
24
|
+
association.item&.destroy!
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
30
|
-
|
@@ -7,7 +7,7 @@ module LatoSpaces::AssociableUnique
|
|
7
7
|
|
8
8
|
# listen LatoSpaces::Association create event to avoid duplicate associations
|
9
9
|
LatoSpaces::Association.before_create do |association|
|
10
|
-
if association.
|
10
|
+
if association.item&.lato_spaces_associations&.length&.positive?
|
11
11
|
throw(:abort)
|
12
12
|
end
|
13
13
|
end
|
@@ -15,11 +15,11 @@
|
|
15
15
|
<span class="fw-bold"><%= group.name %></span>
|
16
16
|
<div class="d-flex justify-content-center align-items-center mt-2">
|
17
17
|
<% if @session.user.lato_spaces_admin || LatoSpaces.config.permit_group_management %>
|
18
|
-
<%= link_to lato_spaces.groups_show_path(group), class: "btn btn-light
|
18
|
+
<%= link_to lato_spaces.groups_show_path(group), class: "btn btn-light me-1", data: { turbo_frame: '_top' } do %>
|
19
19
|
<i class="bi bi-gear"></i>
|
20
20
|
<% end %>
|
21
21
|
<% end %>
|
22
|
-
<%= link_to lato_spaces.setgroup_path(group), class: "btn btn-#{is_selected ? 'success' : 'primary'}
|
22
|
+
<%= link_to lato_spaces.setgroup_path(group), class: "btn btn-#{is_selected ? 'success' : 'primary'} ms-1", data: { turbo_method: :post } do %>
|
23
23
|
<i class="bi bi-check-circle<%= is_selected ? '-fill' : '' %>"></i>
|
24
24
|
<% end %>
|
25
25
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%= lato_page_head '
|
1
|
+
<%= lato_page_head I18n.t('lato_spaces.new_group'), [
|
2
2
|
{ label: I18n.t('lato_spaces.spaces'), path: lato_spaces.root_path },
|
3
|
-
{ label: '
|
3
|
+
{ label: I18n.t('lato_spaces.groups'), path: lato_spaces.groups_path }
|
4
4
|
] %>
|
5
5
|
|
6
6
|
<div class="card">
|
data/lib/lato_spaces/version.rb
CHANGED