decidim-category_enhanced 0.0.2 → 0.0.3

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: 7e028f0b6ff373b12ae9a0600023b53745ebb76310a7eb21c9edde184864026d
4
- data.tar.gz: aa870ae05c2796120e20ac6846fc96263c43e58ae2b1a0747bbffb4c75fcd1d6
3
+ metadata.gz: '09da12e560535e047703fad419fd65a81239ef708e1e91beefa030243165d3c2'
4
+ data.tar.gz: 6efe2890eb964867c990a505b9111f4613a8c4809a91c9f5b619b00682cefbb1
5
5
  SHA512:
6
- metadata.gz: 20cce776ae43d359c6d3adfa5edbbe1c28fabf195f9b20d37a47b3ca83fa8a05bdfc0b4471bb0fb58b6e7e3130252200b612b3e969b3735ed294820a415c578a
7
- data.tar.gz: 4d429dddb52fa486290e1320e4be820a0ef72764afe8a4d716e243bcde6f1dfc14b123076b82fb08d7343c22debdb6a7968eb4a67da59d106b8d8b8ec694ddc6
6
+ metadata.gz: 8236f1cb7d07e2229abef4281c05997902098bfaacc190f28e4016492dfafd4dc8ed58d1d0e17e482b59192c437085121d9755aa770a27973a85eb6375ec0640
7
+ data.tar.gz: c3b9a706495c87ddbe7913dd232e720ae8ff8cf8b996bdb5ad8774688704692236670c9a6d7bee22c374bc3ae659fea7235ef389b07f170795ec2b988d8d014d
@@ -0,0 +1,33 @@
1
+ <figure>
2
+ <ul class="tags tags--proposal tags--list">
3
+ <% if category.present? %>
4
+ <li>
5
+ <%= link_to resource_locator(model).index(filter: { with_any_category: [category.id.to_s] }), title: t("decidim.tags.filter_results_for_category", resource: translated_attribute(category.name)), style: category_styles do %>
6
+ <span class="show-for-sr"><%= t "decidim.tags.filter_results_for_category", resource: decidim_html_escape(translated_attribute(category.name)) %></span>
7
+ <span aria-hidden="true"><%= decidim_html_escape(translated_attribute(category.name)) %></span>
8
+ <% end %>
9
+ <% if previous_category.present? && show_previous_category? %>
10
+ &nbsp;
11
+ <small class="text-small">
12
+ <%= t("changed_from", scope: "decidim.proposals.proposals.tags", previous_name: "#{previous_category.translated_name}").html_safe %>
13
+ </small>
14
+ <% end %>
15
+ </li>
16
+ <% end %>
17
+
18
+ <% if has_visible_scopes?(model) %>
19
+ <li>
20
+ <%= link_to resource_locator(model).index(filter: { with_any_scope: [scope.id] }), title: t("decidim.tags.filter_results_for_scope", resource: translated_attribute(scope.name)) do %>
21
+ <span class="show-for-sr"><%= t "decidim.tags.filter_results_for_scope", resource: translated_attribute(scope.name) %></span>
22
+ <span aria-hidden="true"><%= translated_attribute(scope.name) %></span>
23
+ <% end %>
24
+ <% if previous_scope.present? && show_previous_scope? %>
25
+ &nbsp;
26
+ <small class="text-small">
27
+ <%= t("changed_from", scope: "decidim.proposals.proposals.tags", previous_name: "#{translated_attribute(previous_scope.name)}").html_safe %>
28
+ </small>
29
+ <% end %>
30
+ </li>
31
+ <% end %>
32
+ </ul>
33
+ </figure>
@@ -31,11 +31,17 @@ module Decidim
31
31
 
32
32
  if Decidim::CategoryEnhanced.coloured_labels
33
33
  Decidim::TagsCell.prepend Decidim::CategoryEnhanced::Overrides::TagsCell
34
+ Decidim::Proposals::ProposalTagsCell.prepend Decidim::CategoryEnhanced::Overrides::TagsCell
34
35
  end
35
36
  end
36
37
  end
37
38
  end
38
39
 
40
+ initializer "category_enhanced.add_cells_view_paths", before: "decidim_proposals.add_cells_view_paths" do
41
+ Cell::ViewModel.view_paths << File.expand_path("#{Decidim::CategoryEnhanced::Engine.root}/app/cells")
42
+ Cell::ViewModel.view_paths << File.expand_path("#{Decidim::CategoryEnhanced::Engine.root}/app/views") # for partials
43
+ end
44
+
39
45
  initializer "category_enhanced.webpacker.assets_path" do
40
46
  Decidim.register_assets_path File.expand_path("app/packs", root)
41
47
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-meetings version.
5
5
  module CategoryEnhanced
6
6
  def self.version
7
- "0.0.2"
7
+ "0.0.3"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-category_enhanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandru Emil Lupu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -62,6 +62,7 @@ files:
62
62
  - LICENSE-AGPLv3.txt
63
63
  - README.md
64
64
  - Rakefile
65
+ - app/cells/decidim/proposals/proposal_tags/show.erb
65
66
  - app/controllers/decidim/category_enhanced/admin/application_controller.rb
66
67
  - app/controllers/decidim/category_enhanced/application_controller.rb
67
68
  - app/helpers/decidim/category_enhanced/application_helper.rb