radiant-clipped_asset_roles-extension 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -34,10 +34,19 @@ module ClippedAssetRoles::AssetTagExtensions
|
|
34
34
|
}
|
35
35
|
tag 'if_assets' do |tag|
|
36
36
|
count = tag.attr['min_count'] && tag.attr['min_count'].to_i || 1
|
37
|
-
assets = tag.locals.page.assets.count(:conditions => assets_find_options(tag)[:conditions])
|
37
|
+
assets = tag.locals.page.assets.count(:conditions => assets_find_options(tag)[:conditions], :joins => assets_find_options(tag)[:joins])
|
38
38
|
tag.expand if assets >= count
|
39
39
|
end
|
40
40
|
|
41
|
+
desc %{
|
42
|
+
The opposite of @<r:if_assets/>@.
|
43
|
+
}
|
44
|
+
tag 'unless_assets' do |tag|
|
45
|
+
count = tag.attr['min_count'] && tag.attr['min_count'].to_i || 1
|
46
|
+
assets = tag.locals.page.assets.count(:conditions => assets_find_options(tag)[:conditions], :joins => assets_find_options(tag)[:joins])
|
47
|
+
tag.expand unless assets >= count
|
48
|
+
end
|
49
|
+
|
41
50
|
def find_asset_with_roles(tag, options)
|
42
51
|
if tag.locals.asset.nil? and roles = options.delete('roles')
|
43
52
|
roles.split('|').each do |role|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RadiantClippedAssetRolesExtension
|
2
|
-
VERSION = "1.0.
|
2
|
+
VERSION = "1.0.4"
|
3
3
|
SUMMARY = "Clipped Asset Roles for Radiant CMS"
|
4
4
|
DESCRIPTION = "Adds new scoping levels for assets, e.g. a 'portfolio' role for images."
|
5
5
|
URL = "https://github.com/jomz/radiant-clipped_asset_roles-extension"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-clipped_asset_roles-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: radiant-clipped-extension
|