ecm_tags_backend 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 619ed39b63f97ad4a1dd50da7433263ee4eaa14c
4
- data.tar.gz: 930132d5919308b3ee1fada485fee8a2fb160bb8
3
+ metadata.gz: e0a1666a15051211d9dba4a20b8af3845e7d1645
4
+ data.tar.gz: fa860f4188a1d738b6bb23a394275c15abfeac0b
5
5
  SHA512:
6
- metadata.gz: 8d12931eace60148926207f532deaf7494c403a08560542a9290b7b50abd980357d4f00ecc92072bef5cc0fe2d0c1e5670ab63566babcf2b339e7769bf65e162
7
- data.tar.gz: 592b58ca6e605fef416b557240da5e83aedfe36124d542c2498048c641575bbdc33e37e9f3d710ad5e30ea351c06b592150e10525514d995321f55362ef6b799
6
+ metadata.gz: 70dfce2bd8452961e693bb8519679474a344377539c02efd8767a7151e30c397dfd96c40b429da9fd71e0c13cb94b40ecca56268b3be719003c40fc574e6eaab
7
+ data.tar.gz: 9521ff7b3ce75efd5bc751693e3305bb667ac1ec5fa27eb67a013b240ab76d359adb565b0b981dd4d298be5e0cb1ca282dcef5bf611ee43da5fd6091820425d6
@@ -1,5 +1,5 @@
1
1
  = form.association :tag
2
- = form.input(:taggable, collection: Ecm::Tags::Backend.taggable_class_names.map(&:constantize),
2
+ = form.input(:taggable, collection: Ecm::Tags::Backend::Configuration.taggable_classes,
3
3
  as: :grouped_select,
4
4
  group_method: :all,
5
5
  group_label_method: :model_name,
@@ -7,7 +7,7 @@
7
7
  label_method: :human,
8
8
  include_blank: true,
9
9
  selected: form.object.taggable.try(:to_global_id))
10
- = form.input(:tagger, collection: Ecm::Tags::Backend.tagger_class_names.map(&:constantize),
10
+ = form.input(:tagger, collection: Ecm::Tags::Backend::Configuration.tagger_classes,
11
11
  as: :grouped_select,
12
12
  group_method: :all,
13
13
  group_label_method: :model_name,
@@ -19,6 +19,14 @@ module Ecm
19
19
 
20
20
  mattr_accessor(:taggable_class_names) { [] }
21
21
  mattr_accessor(:tagger_class_names) { [] }
22
+
23
+ def self.taggable_classes
24
+ @@taggable_class_names.map(&:constantize)
25
+ end
26
+
27
+ def self.tagger_classes
28
+ @@tagger_class_names.map(&:constantize)
29
+ end
22
30
  end
23
31
  end
24
32
  end
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module Tags
3
3
  module Backend
4
- VERSION = '1.1.0'.freeze
4
+ VERSION = '1.2.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -2,7 +2,8 @@ Ecm::Tags::Backend.configure do |config|
2
2
  # Set the resources, that will be shown in the backend menu.
3
3
  #
4
4
  # Default: config.registered_controllers = -> {[
5
- # Ecm::Tags::Backend::TagsController
5
+ # Ecm::Tags::Backend::TagsController,
6
+ # Ecm::Tags::Backend::TaggingsController
6
7
  # ]}
7
8
  #
8
9
  config.registered_controllers = lambda {
@@ -21,4 +22,16 @@ Ecm::Tags::Backend.configure do |config|
21
22
  [
22
23
  ]
23
24
  }
25
+
26
+ # Specify the models that can be tagged.
27
+ #
28
+ # Default: config.taggable_class_names = %w()
29
+ #
30
+ config.taggable_class_names = %w()
31
+
32
+ # Specify the models the can tag things.
33
+ #
34
+ # Default: config.tagger_class_names = %w()
35
+ #
36
+ config.tagger_class_names = %w()
24
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_tags_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-15 00:00:00.000000000 Z
11
+ date: 2018-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -65,7 +65,6 @@ files:
65
65
  - app/views/ecm/tags/backend/_tag_labels_for_resource.html.haml
66
66
  - app/views/ecm/tags/backend/_tag_toolbar.html.haml
67
67
  - app/views/ecm/tags/backend/taggings/_form.haml
68
- - app/views/ecm/tags/backend/taggings/_form.haml.original
69
68
  - app/views/ecm/tags/backend/taggings/_show.haml
70
69
  - app/views/ecm/tags/backend/taggings/_table.haml
71
70
  - app/views/ecm/tags/backend/taggings/create_by_gid_and_tag.js.erb
@@ -1,18 +0,0 @@
1
- = form.input :tag
2
- = form.input(:taggable, :collection => [ Ecm::Pictures::PictureGallery, Ecm::Pictures::Picture ],
3
- as: :grouped_select,
4
- group_method: :all,
5
- group_label_method: :model_name,
6
- value_method: :to_global_id,
7
- label_method: :human,
8
- include_blank: true,
9
- selected: form.object.taggable.try(:to_global_id))
10
- = form.input(:tagger, :collection => [ Ecm::UserArea::User ],
11
- as: :grouped_select,
12
- group_method: :all,
13
- group_label_method: :model_name,
14
- value_method: :to_global_id,
15
- label_method: :human,
16
- include_blank: true,
17
- selected: form.object.tagger.try(:to_global_id))
18
- = form.input :context