radiant-taggable-extension 2.0.3 → 2.0.4

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.
@@ -0,0 +1,6 @@
1
+ - fields_for :asset, @asset do |f|
2
+ %tr
3
+ %td.label
4
+ = f.label :furniture
5
+ %td.field{:style => 'text-align: left'}
6
+ = f.check_box :furniture
@@ -0,0 +1,9 @@
1
+ / - include_stylesheet 'admin/taggable'
2
+ / - include_javascript 'autocomplete'
3
+ / - include_javascript 'admin/taggable'
4
+ - fields_for :asset, @asset do |f|
5
+ %tr
6
+ %th.label
7
+ = f.label :keywords
8
+ %td.field
9
+ = f.text_field :keywords, :class => 'textbox tagger'
@@ -0,0 +1,9 @@
1
+ / - include_stylesheet 'admin/taggable'
2
+ / - include_javascript 'autocomplete'
3
+ / - include_javascript 'admin/taggable'
4
+ - fields_for :page, @page do |f|
5
+ %tr
6
+ %th.label
7
+ = f.label :keywords
8
+ %td.field
9
+ = f.text_field :keywords, :class => 'textbox tagger'
@@ -1,4 +1,9 @@
1
1
  en:
2
+ activerecord:
3
+ attributes:
4
+ asset:
5
+ keywords: "Tags"
6
+ furniture: "Furniture?"
2
7
  tags: "Tags"
3
8
  helpers:
4
9
  label:
@@ -7,5 +12,3 @@ en:
7
12
  page_id: "Pointer to page"
8
13
  visible: "Visible?"
9
14
  description: "Description (optional)"
10
- taggable_extension:
11
- site_furniture: "Site furniture? (not shown in lists and galleries)"
@@ -0,0 +1,15 @@
1
+ class KeywordsField < ActiveRecord::Migration
2
+ def self.up
3
+ Page.find(:all).each do |page|
4
+ if keywords = page.field(:keywords).try(:content)
5
+ page.attached_tags = Tag.from_list(keywords)
6
+ page.save
7
+ end
8
+ page.field(:keywords).delete
9
+ end
10
+ end
11
+
12
+ def self.down
13
+
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  module RadiantTaggableExtension
2
- VERSION = '2.0.3'
2
+ VERSION = '2.0.4'
3
3
  SUMMARY = %q{Tagging, clouding and faceting extension for Radiant CMS}
4
4
  DESCRIPTION = %q{General purpose tagging and retrieval extension: more versatile but less focused than the tags extension. A good way to support faceted search.}
5
5
  URL = "http://spanner.org/radiant/taggable"
@@ -10,12 +10,6 @@ module Taggable
10
10
  def load_taggable_regions
11
11
  @tag = load_default_tag_regions
12
12
  end
13
-
14
- # def load_default_regions_with_tags
15
- # load_default_regions_without_tags
16
- # load_taggable_regions
17
- # end
18
- # alias_method_chain :load_default_regions, :tags
19
13
 
20
14
  protected
21
15
 
@@ -119,9 +119,6 @@ module Taggable
119
119
  self.attached_tags.empty? ? [] : self.class.from_all_tags(self.attached_tags) - [self]
120
120
  end
121
121
 
122
- # in the case of pages and anything else that keywords in the same way this overrides the existing column
123
- # the rest of the time it's just another way of specifying tags.
124
-
125
122
  def keywords
126
123
  self.attached_tags.map {|t| t.title}.join(', ')
127
124
  end
@@ -17,11 +17,11 @@ class TaggableExtension < Radiant::Extension
17
17
  SiteController.send :include, Taggable::SiteController # some path and parameter handling in support of library pages
18
18
  Admin::PagesController.send :include, Taggable::AdminPagesController # tweaks the admin interface to make page tags more prominent
19
19
  UserActionObserver.instance.send :add_observer!, Tag # tags get creator-stamped
20
-
21
- unless defined? admin.tag
22
- Radiant::AdminUI.send :include, Taggable::AdminUI
23
- Radiant::AdminUI.load_taggable_regions
24
- end
20
+ Radiant::AdminUI.send :include, Taggable::AdminUI unless defined? admin.tag
21
+ admin.tag ||= Radiant::AdminUI.load_taggable_regions
22
+ admin.asset.edit.add :extended_metadata, 'furniture'
23
+ admin.asset.edit.add :extended_metadata, 'tags'
24
+ admin.page.edit.add :extended_metadata, 'tags'
25
25
 
26
26
  tab("Content") do
27
27
  add_item("Tags", "/admin/tags")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-taggable-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 3
10
- version: 2.0.3
9
+ - 4
10
+ version: 2.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-11 00:00:00 +01:00
19
- default_executable:
18
+ date: 2011-10-11 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: sanitize
@@ -50,9 +49,9 @@ files:
50
49
  - app/models/library_page.rb
51
50
  - app/models/tag.rb
52
51
  - app/models/tagging.rb
53
- - app/views/admin/assets/_edit_metadata.html.haml
54
- - app/views/admin/assets/_edit_title.html.haml
55
- - app/views/admin/pages/_edit_title.html.haml
52
+ - app/views/admin/assets/_furniture.html.haml
53
+ - app/views/admin/assets/_tags.html.haml
54
+ - app/views/admin/pages/_tags.html.haml
56
55
  - app/views/admin/tags/_form.html.haml
57
56
  - app/views/admin/tags/_search_results.html.haml
58
57
  - app/views/admin/tags/_show_assets.html.haml
@@ -67,6 +66,7 @@ files:
67
66
  - db/migrate/002_import_keywords.rb
68
67
  - db/migrate/20110316210834_structural_tags.rb
69
68
  - db/migrate/20110411075109_metaphones.rb
69
+ - db/migrate/20111011075109_keywords_field.rb
70
70
  - lib/link_renderer.rb
71
71
  - lib/natcmp.rb
72
72
  - lib/radiant-taggable-extension.rb
@@ -89,7 +89,6 @@ files:
89
89
  - public/javascripts/autocomplete.js
90
90
  - public/stylesheets/sass/admin/taggable.sass
91
91
  - public/stylesheets/sass/tagcloud.sass
92
- - radiant-taggable-extension-2.0.2.gem
93
92
  - radiant-taggable-extension.gemspec
94
93
  - Rakefile
95
94
  - README.md
@@ -102,11 +101,10 @@ files:
102
101
  - spec/spec.opts
103
102
  - spec/spec_helper.rb
104
103
  - taggable_extension.rb
105
- has_rdoc: true
106
104
  homepage: http://spanner.org/radiant/taggable
107
105
  licenses: []
108
106
 
109
- post_install_message: "\n Add this to your Gemfile with:\n\n gem 'radiant-taggable-extension', '~> 2.0.3'\n\n "
107
+ post_install_message: "\n Add this to your Gemfile with:\n\n gem 'radiant-taggable-extension', '~> 2.0.4'\n\n "
110
108
  rdoc_options: []
111
109
 
112
110
  require_paths:
@@ -132,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
130
  requirements: []
133
131
 
134
132
  rubyforge_project:
135
- rubygems_version: 1.5.3
133
+ rubygems_version: 1.8.10
136
134
  signing_key:
137
135
  specification_version: 3
138
136
  summary: Tagging, clouding and faceting extension for Radiant CMS
@@ -1,7 +0,0 @@
1
- %tr
2
- %td.label
3
- Display
4
- %td.field{:style => 'text-align: left;'}
5
- - fields_for :asset, @asset do |fields|
6
- = fields.check_box :furniture
7
- = fields.label :furniture, t('taggable_extension.site_furniture')
@@ -1,14 +0,0 @@
1
- - include_stylesheet 'admin/taggable'
2
- - include_javascript 'autocomplete'
3
- - include_javascript 'admin/taggable'
4
-
5
- - fields_for :asset, @asset do |fields|
6
- %p.keywords
7
- %label{:for=>"asset_keywords"}
8
- Tags
9
- = fields.text_field :keywords, :class => 'textbox tagger'
10
-
11
- %p.title
12
- %label{:for=>"asset_title"}
13
- Title
14
- = fields.text_field :title, :class => 'textbox', :maxlength => 100
@@ -1,12 +0,0 @@
1
- - include_stylesheet 'admin/taggable'
2
- - include_javascript 'autocomplete'
3
- - include_javascript 'admin/taggable'
4
-
5
- - fields_for :page, @page do |fields|
6
- %p.keywords
7
- %label{:for=>"page_keywords"}
8
- =t('tags')
9
- = fields.text_field :keywords, :class => 'textbox tagger'
10
- %p.title
11
- %label{:for=>"page_title"}= t('page_title')
12
- = fields.text_field :title, :class => 'textbox', :maxlength => 255
Binary file