cmor_tags 0.0.38.pre → 0.0.39.pre

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
  SHA256:
3
- metadata.gz: cd7998a3c4b060d17ef9427075ad3379069bc837238aff71271fa19a9c159402
4
- data.tar.gz: 385b67df32a1608eb077541a90b695e7f77167821645d19e6cb98c2048128004
3
+ metadata.gz: 3192a898c447ca30089974cf0616ad6de2a6b66a5b74735be733136fb9573639
4
+ data.tar.gz: 104d7e701cc5902aa286043e995c037feb9414b7483724f23479633b75ac9980
5
5
  SHA512:
6
- metadata.gz: 493b62bf774a743c0effac12a7b68c12e79317f755656c5495553ed24b010ada8e5ae44e75fd19e69d5fe7bd9871a0aed4be8926cfefbf002cfef7a36750baf7
7
- data.tar.gz: 56f9a336d135da5bb01e7afd6962ab48241b05354ea315dc6aa7cb528fb932aadb3c80f30fd9009c87437c2e6bde7b5c46001f2139f7ed7725864483f253895a
6
+ metadata.gz: 3b2383a6835ae3c6c6d88c4a4275e98ac7be5ae214ab3364beae900f6b6bbd4688af1a7be70e373dae34d3389eca01720d9690c38149d3b4cf41913be6214ba4
7
+ data.tar.gz: bc81c789df0f424eb9da8c7c11ba3eba9d4a440fa9e15c91ce0f2c8511f98c5c1c46f2c6e50c261de8b4f1b7c91216dbd9f3c36179d1dfc39be22d36c938cf43
@@ -5,10 +5,6 @@ module Cmor
5
5
  @tag_search ||= Cmor::Tags::TagSearch.new
6
6
  render partial: 'cmor/tags/search_box'
7
7
  end
8
-
9
- def tag_labels_for(resource)
10
- render 'cmor/tags/tag_labels_for_resource', resource: resource
11
- end
12
8
  end
13
9
  end
14
10
  end
@@ -0,0 +1,21 @@
1
+ module Cmor
2
+ module Tags
3
+ # Example:
4
+ #
5
+ # # app/controllers/application_controller.rb
6
+ # class ApplicationController < ActionController::Base
7
+ # view_helper Cmor::Tags::ApplicationViewHelper, as: :tags_helper
8
+ # end
9
+ #
10
+ class ApplicationViewHelper < Rao::ViewHelper::Base
11
+ # Example:
12
+ #
13
+ # # app/views/posts/_post.html.haml
14
+ # = tags_helper(self).render_tags_for(post)
15
+ #
16
+ def render_tags_for(resource)
17
+ render resource: resource
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,4 @@
1
+ %span.tags-for-resource
2
+ - resource.tags.each do |tag|
3
+ = link_to(cmor_tags.tag_path(tag_list: CGI::escape(tag.name)), class: 'label label-default', style: "background-color: #{tag.color}") do
4
+ = tag.name
@@ -1,4 +1,4 @@
1
- = simple_form_for(@service, url: url_for(action: :create, only_path: true)) do |form|
1
+ = simple_form_for(@service, url: searchs_path) do |form|
2
2
  = render partial: 'form', locals: { form: form }
3
3
 
4
4
  #tag_search_result
@@ -1,2 +1,2 @@
1
- = simple_form_for(@service, url: url_for(action: :create, only_path: true)) do |form|
1
+ = simple_form_for(@service, url: searchs_path) do |form|
2
2
  = render partial: 'form', locals: { form: form }
@@ -51,7 +51,7 @@ de:
51
51
  search: "Katzen, Baum, grün, ..."
52
52
  helpers:
53
53
  submit:
54
- search:
54
+ cmor/tags/search:
55
55
  create: 'Suchen'
56
56
  routes:
57
57
  cmor_tags_engine: tags
@@ -51,7 +51,7 @@ en:
51
51
  search: "cats, tree, green, ..."
52
52
  helpers:
53
53
  submit:
54
- tag_search:
54
+ cmor/tags/search:
55
55
  create: 'Search'
56
56
  routes:
57
57
  cmor_tags_engine: tags
data/config/routes.rb CHANGED
@@ -6,7 +6,7 @@ Cmor::Tags::Engine.routes.draw do
6
6
  # get '/', on: :collection, to: "tag_searchs#create"
7
7
  # end
8
8
 
9
- get '/:tag_list', to: "searchs#create" # , as: 'tag'
9
+ get '/:tag_list', to: "searchs#create", as: 'tag'
10
10
 
11
11
  root to: 'searchs#new'
12
12
  end
@@ -1,4 +1,3 @@
1
- # This migration comes from cmor_tags (originally 20190301132031)
2
1
  class AddColorToTags < ActiveRecord::Migration[5.2]
3
2
  def change
4
3
  add_column :tags, :color, :string
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.38.pre
4
+ version: 0.0.39.pre
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: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.38.pre
33
+ version: 0.0.39.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.38.pre
40
+ version: 0.0.39.pre
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cmor_core_frontend
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.38.pre
47
+ version: 0.0.39.pre
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.38.pre
54
+ version: 0.0.39.pre
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -369,8 +369,9 @@ files:
369
369
  - app/models/cmor/tags/search.rb
370
370
  - app/models/cmor/tags/tag.rb
371
371
  - app/models/cmor/tags/tagging.rb
372
+ - app/view_helpers/cmor/tags/application_view_helper.rb
372
373
  - app/views/cmor/tags/_search_box.html.haml
373
- - app/views/cmor/tags/_tag_labels_for_resource.html.haml
374
+ - app/views/cmor/tags/application_view_helper/_render_tags_for.html.haml
374
375
  - app/views/cmor/tags/searchs/_form.html.haml
375
376
  - app/views/cmor/tags/searchs/create.html.haml
376
377
  - app/views/cmor/tags/searchs/new.html.haml
@@ -1,4 +0,0 @@
1
- %span.tags-for-resource
2
- - resource.tags.each do |tag|
3
- = link_to(cmor_tags.tag_path(tag: CGI::escape(tag.name)), class: 'label label-default', style: "background-color: #{tag.color}") do
4
- = tag.name