effective_assets 1.4.6 → 1.4.7

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
  SHA1:
3
- metadata.gz: c87aaa1f7bea793889c220aa1a78764d0a7f6bb1
4
- data.tar.gz: ec17d7a9054ea3b8de1bd533bd8612f362f299a5
3
+ metadata.gz: f018916536c26112201f9310749f01c6d29daafe
4
+ data.tar.gz: dbfcdb4b2b86a7a206f993632bd52ac1cfe094f5
5
5
  SHA512:
6
- metadata.gz: 48e653a86aea67db00958a15bfc91b96daf223f091bf3148b3a876e0ed67ad31cf2de1dfedb220d805e482c87642dae9a14ec19e523a14fb54601f530514f173
7
- data.tar.gz: 9764b9185790dac272758a48d481d41e4319c7eee88672b02b2bc450d9aacf40d2b742f8c905a11233ed5ba34ae7fea6039ce19706bb3b4727f47426f2b9706c
6
+ metadata.gz: 43fb4505fa7070cf9bd360b61b14e9f4f1f312a2f74dcc6ad0f4f88e3ce2395397002e2113204f5ad9e83fecc30bf3bedf7ea109eaec069221725ef95dd9cf93
7
+ data.tar.gz: 29305b62ab227d99114bcd550066420bd07791f6474f712640009284324718a160418a827057581a108c0aab8a2db075cc5ce1d1f30e912ab74d51eefd136e02
@@ -44,6 +44,7 @@ module Effective
44
44
  attachment.position = 0
45
45
  attachable_object_name = params[:attachable_object_name].to_s
46
46
  attachment_actions = params[:attachment_actions]
47
+ attachment_links = params[:attachment_links]
47
48
 
48
49
  attachment_partial =
49
50
  case params[:attachment_style].to_s
@@ -55,7 +56,7 @@ module Effective
55
56
  'attachment_as_thumbnail'
56
57
  end
57
58
 
58
- render :partial => "asset_box_input/#{attachment_partial}", :locals => {:attachment => attachment, :attachable_object_name => attachable_object_name, :attachment_actions => attachment_actions}, :status => 200, :content_type => 'text/html'
59
+ render :partial => "asset_box_input/#{attachment_partial}", :locals => {:attachment => attachment, :attachable_object_name => attachable_object_name, :attachment_actions => attachment_actions, attachment_links: attachment_links}, :status => 200, :content_type => 'text/html'
59
60
  else
60
61
  render :text => '', :status => 200
61
62
  end
@@ -133,6 +133,7 @@ module Inputs
133
133
  :locals => {
134
134
  :attachment => attachment,
135
135
  :attachment_actions => @options[:attachment_actions].map(&:to_s),
136
+ :attachment_links => @options[:attachment_links],
136
137
  :hidden => (count > @options[:limit]),
137
138
  :disabled => @options[:disabled],
138
139
  :attachable_object_name => @object_name,
@@ -156,6 +157,7 @@ module Inputs
156
157
  :drop_files_help_text => 'Drop files here',
157
158
  :progress_bar_partial => 'asset_box_input/progress_bar_template',
158
159
  :attachment_style => :thumbnail, # :thumbnail, :table, or :list
160
+ :attachment_links => true,
159
161
  :attachment_add_to => :bottom, # :bottom or :top (of attachments div)
160
162
  :attachment_actions => [:remove], # or :insert, :delete, :remove
161
163
  :table_filter_bar => false,
@@ -3,7 +3,10 @@
3
3
 
4
4
  %li.attachment
5
5
  .attachment-title.caption
6
- = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
6
+ - if attachment_links
7
+ = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
8
+ - else
9
+ = attachment.asset.title
7
10
 
8
11
  - if attachment_actions.include?('remove')
9
12
  %a.attachment-remove{:href => '#'}
@@ -5,7 +5,10 @@
5
5
  %td.attachment-image
6
6
  = effective_asset_image_tag(attachment.asset)
7
7
  %td.attachment-title{:title => effective_asset_title(attachment.asset)}
8
- = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
8
+ - if attachment_links
9
+ = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
10
+ - else
11
+ = attachment.asset.title
9
12
  %td.attachment-size
10
13
  = number_to_human_size(attachment.asset.data_size)
11
14
  %td
@@ -6,7 +6,10 @@
6
6
  = effective_asset_image_tag(attachment.asset)
7
7
 
8
8
  .attachment-title.caption
9
- = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
9
+ - if attachment_links
10
+ = link_to attachment.asset.title, attachment.asset.url, :target => '_blank'
11
+ - else
12
+ = attachment.asset.title
10
13
 
11
14
  - if attachment_actions.include?('remove')
12
15
  %a.attachment-remove{:href => '#'}
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.4.6'.freeze
2
+ VERSION = '1.4.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails