radiant-clipped-extension 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -56,7 +56,6 @@ The clipped extension is configured in the usual way, but only its minor setting
56
56
 
57
57
  * `paperclip.url` sets the url scheme for attached files. Paperclip interpolations are applied. You probably don't want to change this.
58
58
  * `paperclip.path` sets the path scheme for attached files. Paperclip interpolations are applied. You might conceivably want to change this.
59
- * `paperclip.additional_thumbnails` is a string of comma-separated style definitions that is passed to paperclip for any asset type that has a post-processor (that is, currently, images, pdfs and video clips). The definitions are in the format name=geometry and when assembled the string will look something like `preview=640x640>,square=#260x260`. Thumbnail and icon styles are already defined and don't need to be configured this way.
60
59
  * `paperclip.storage` can be 'filesystem' (the default) or 'fog' for cloud storage (such as s3).
61
60
  * `paperclip.skip_filetype_validation` is true by default and allows uploads of any mime type.
62
61
 
@@ -113,6 +112,13 @@ And you can set some defaults:
113
112
  * `assets.insertion_size` is the name of the style that's used when you click on 'insert' to add a radius asset tag to your text. You can edit it after insertion, of course.
114
113
  * `assets.display_size` is the name of the style that's shows when you edit a single asset in the admin interface.
115
114
 
115
+
116
+ ### Asset Thumbnail Sizes
117
+
118
+ To configure different thumbnail sizes, set `assets.thumbnails.image`. Here is an example of setting two custom thumbnail sizes:
119
+
120
+ Radiant::Config['assets.thumbnails.image'] = "custom:geometry=200x300>,format=jpg|bigger:geometry=600x700>,format=jpg"
121
+
116
122
  ## Usage
117
123
 
118
124
  For most purposes you will probably work with assets while you're working on pages. Click on one of the 'assets' links and a panel will pop up allowing you to find, insert and attach existing assets or upload new ones.
@@ -64,7 +64,7 @@ class Asset < ActiveRecord::Base
64
64
  delegate :paperclip_processors, :paperclip_styles, :style_dimensions, :style_format, :to => :asset_type
65
65
 
66
66
  def thumbnail(style_name='original')
67
- return asset.url if style_name.to_sym == :original
67
+ return asset.url if style_name.to_sym == :original
68
68
  return asset.url(style_name.to_sym) if has_style?(style_name)
69
69
  return asset_type.icon(style_name)
70
70
  end
@@ -0,0 +1,110 @@
1
+ # encoding: utf-8
2
+ ---
3
+ fr:
4
+ assets: 'M&eacute;dias'
5
+ asset_types:
6
+ all: 'Tous'
7
+ documents: 'Documents'
8
+ fonts: 'Fonts'
9
+ images: 'Images'
10
+ others: 'Autres'
11
+ audios: 'Audio'
12
+ flashes: 'Flash'
13
+ videos: 'Video'
14
+ pdfs: 'PDFs'
15
+ swfs: 'Flash'
16
+
17
+ activerecord:
18
+ errors:
19
+ models:
20
+ asset:
21
+ attributes:
22
+ asset:
23
+ blank: 'Il faut choisir un fichier &aacute; t&eacute;l&eacute;charger!'
24
+
25
+ clipped_extension:
26
+ actions: Actions
27
+ all: 'Tous'
28
+ all_thumbnails_refreshed: 'Tous les thumbnails sont r&eacute;gen&eacute;r&eacute;.'
29
+ alt_text_or_title: 'Alt-Text ou Titre <span class="hint">(optionnel)</span>'
30
+ asset: 'M&eacute;dia'
31
+ asset_edit_title: 'Modifier M&eacute;dia'
32
+ asset_errors: 'D&eacute;sol&eacute;. {{errors}}'
33
+ asset_page_attachment_note: 'M&eacute;dias attach&eacute;. These can be inserted with drag and drop or shown with the <code>&lt;r:assets:each /&gt;</code> tag.'
34
+ asset_note: 'M&eacute;dias attach&eacute;.'
35
+ assets: 'M&eacute;dias'
36
+ assets_explanation: 'Assets and images can be uploaded and then attached or inserted into pages, snippets and layouts. Click on a asset name above to edit it or click <code>Remove</code> to delete it.'
37
+ assets_title: 'M&eacute;dias'
38
+ asset_page_upload_note: 'M&eacute;dias t&eacute;l&eacute;chargez ici seront automatiquement attach&eacute; a cette page.'
39
+ asset_upload_note: 'Choose an asset to upload here. If the <code>Title</code> field is left blank, the filename (without the file type) will be automatically added. By clicking on <code>More</code>, you can add a caption as well.'
40
+ attached_assets: 'M&eacute;dias attach&eacute;'
41
+ attach: 'Attacher'
42
+ attach_asset: 'attache m&eacute;dia'
43
+ attach_assets: 'Attache m&eacute;dias'
44
+ attach_existing: 'Attache m&eacute;dias existantes'
45
+ attach_to_page: 'Attache a ce page'
46
+ audio: 'Audio'
47
+ cancel_attachment: 'D&eacute;sattache'
48
+ copy: 'Copie'
49
+ copy_alt: 'copy radius tag to clipboard'
50
+ choose_file: 'Choissisez Fichier'
51
+ documents: 'Documents'
52
+ caption: 'Caption'
53
+ confirm_refresh_assets: 'Are you sure you want to regenerate every asset thumbnail? This is likely to take a long time and use a lot of server resources: <strong class="warning">the performance of your site is very likely to be affected</strong> and your browser may time out before the operation is complete. This is only recommended if your asset collection is small!'
54
+ confirm_remove_asset: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following asset?'
55
+ confirm_remove_from_page: 'Are you sure you want to remove this assets from the page?'
56
+ delete_asset: 'Supprimer M&eacute;dia'
57
+ detach: 'D&eacute;tacher'
58
+ edit: 'Modifier'
59
+ edit_asset: 'Modifier {{asset}}'
60
+ filename: 'Nom du fichier'
61
+ find_assets: 'Trouver M&eacute;dias'
62
+ images: 'Images'
63
+ images_automatically_created: 'images sont cr&eacute;&eacute;es automatiquement'
64
+ insert: 'Ins&eacute;rer'
65
+ modify: 'Modifier'
66
+ movies: 'Vid&eacute;os'
67
+ need_to_upload: 'Vous souhaitez t&eacute;l&eacute;charger?'
68
+ new_asset: 'Nouveau M&eacute;dia'
69
+ no_assets_found: 'There were no assets found'
70
+ no_assets: 'Aucun M&eacute;dia'
71
+ no_attached_assets: 'Aucun M&eacute;dia attach&eacute;.'
72
+ others: 'Autres'
73
+ refresh_assets: 'Regenerate all thumbnails'
74
+ regenerate: 'Regenerate'
75
+ regenerate_thumbnails: 'Regenerate Thumbnails'
76
+ remove_asset: 'Supprimer M&eacute;dia'
77
+ remove_from_page: 'Supprimer de cette page'
78
+ reorder: 'R&eacute;ordonner'
79
+ remove: 'Supprimer'
80
+ refresh_assets_rake_task: 'For better results please log into your server and run <code>rake paperclip:refresh class=Asset</code>.'
81
+ replace_file: 'Replace File'
82
+ save_and_upload: 'Save and Upload'
83
+ search_assets: 'Search for assets'
84
+ search: 'Rechercher'
85
+ select: 'Selecter'
86
+ thumbnails_refreshed: "Thumbnails refreshed."
87
+ title: 'Titre'
88
+ type: 'Type'
89
+ types_to_find: 'Types &aacute; trouver'
90
+ upload: 'T&eacute;l&eacute;charger'
91
+ upload_asset: 'T&eacute;l&eacute;charger M&eacute;dia'
92
+
93
+ config:
94
+ assets:
95
+ additional_thumbnails: 'Additional Thumbnails'
96
+ content_types: 'Content Types'
97
+ create_image_thumbnails?: 'Image thumbnails'
98
+ create_pdf_thumbnails?: 'PDF thumbnails'
99
+ create_video_thumbnails?: 'Video thumbnails'
100
+ display_size: 'Display Size'
101
+ insertion_size: 'Insertion Size'
102
+ max_asset_size: 'Max Asset Size'
103
+ path: 'Path'
104
+ s3:
105
+ bucket: 'Bucket'
106
+ key: 'Cl&eacute;'
107
+ secret: 'Secret'
108
+ skip_filetype_validation: 'Skip Filetype Validation'
109
+ storage: 'H&eacute;bergement'
110
+ url: 'Url'
@@ -1,5 +1,7 @@
1
1
  module AssetTags
2
2
  include Radiant::Taggable
3
+ include ActionView::Helpers::TagHelper
4
+ include ActionView::Helpers::AssetTagHelper
3
5
 
4
6
  class TagError < StandardError; end
5
7
 
@@ -230,9 +232,8 @@ module AssetTags
230
232
  size = options.delete('size') || 'original'
231
233
  raise TagError, "asset #{tag.locals.asset.title} has no '#{size}' thumbnail" unless tag.locals.asset.has_style?(size)
232
234
  options['alt'] ||= tag.locals.asset.title
233
- attributes = options.inject('') { |s, (k, v)| s << %{#{k.downcase}="#{v}" } }.strip
234
235
  url = tag.locals.asset.thumbnail(size)
235
- %{<img src="#{url}" #{attributes} />} rescue nil
236
+ image_tag url, options rescue nil
236
237
  end
237
238
 
238
239
  desc %{
@@ -1,5 +1,5 @@
1
1
  module RadiantClippedExtension
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  SUMMARY = %q{Assets for Radiant CMS}
4
4
  DESCRIPTION = %q{Asset-management derived from Keith Bingman's Paperclipped extension.}
5
5
  URL = "http://radiantcms.org"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-clipped-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-10-14 00:00:00.000000000 Z
16
+ date: 2015-01-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: acts_as_list
@@ -86,9 +86,6 @@ executables: []
86
86
  extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
- - LICENSE
90
- - README.md
91
- - Rakefile
92
89
  - app/controllers/admin/assets_controller.rb
93
90
  - app/controllers/admin/page_attachments_controller.rb
94
91
  - app/helpers/admin/assets_helper.rb
@@ -129,6 +126,7 @@ files:
129
126
  - config/initializers/radiant_config.rb
130
127
  - config/locales/de.yml
131
128
  - config/locales/en.yml
129
+ - config/locales/fr.yml
132
130
  - config/locales/nl.yml
133
131
  - config/locales/ru.yml
134
132
  - config/routes.rb
@@ -153,6 +151,7 @@ files:
153
151
  - lib/radiant-clipped-extension.rb
154
152
  - lib/tasks/clipped_extension_tasks.rake
155
153
  - lib/tasks/paperclip_tasks.rake
154
+ - LICENSE
156
155
  - public/flash/ZeroClipboard.swf
157
156
  - public/images/admin/assets/add.png
158
157
  - public/images/admin/assets/archive_icon.png
@@ -192,6 +191,8 @@ files:
192
191
  - public/javascripts/admin/assets.js
193
192
  - public/stylesheets/sass/admin/assets.sass
194
193
  - radiant-clipped-extension.gemspec
194
+ - Rakefile
195
+ - README.md
195
196
  - spec/ci/before_script
196
197
  - spec/ci/script
197
198
  - spec/controllers/admin/assets_controller_spec.rb
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  version: '0'
236
237
  requirements: []
237
238
  rubyforge_project:
238
- rubygems_version: 1.8.24
239
+ rubygems_version: 1.8.23
239
240
  signing_key:
240
241
  specification_version: 3
241
242
  summary: Assets for Radiant CMS