noodall-ui 0.1.2 → 0.1.3
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.
- data/app/models/asset.rb +5 -1
- data/app/views/noodall/admin/assets/_browser.html.erb +2 -2
- data/app/views/noodall/admin/assets/_form.html.erb +1 -1
- data/app/views/noodall/admin/assets/_show.html.erb +1 -1
- data/app/views/noodall/admin/assets/add.html.erb +2 -2
- data/app/views/noodall/admin/assets/index.html.erb +1 -1
- data/app/views/noodall/admin/nodes/index.html.erb +1 -1
- data/lib/noodall/ui/version.rb +1 -1
- metadata +12 -13
data/app/models/asset.rb
CHANGED
@@ -43,10 +43,14 @@ class Asset
|
|
43
43
|
elsif video?
|
44
44
|
file.encode(:tiff, { :offset => "#{video_thumbnail_offset}%" }).thumb(*args).url
|
45
45
|
else
|
46
|
-
file.thumb(*args).url
|
46
|
+
file.thumb(*args).url(:suffix => ".#{file_ext}")
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
def dragonfly_extension_sym
|
51
|
+
file_ext.gsub('jpeg','jpg').to_sym
|
52
|
+
end
|
53
|
+
|
50
54
|
def file_uid
|
51
55
|
# Required to rerun the correct object for Dragonfly pending
|
52
56
|
return Dragonfly::ActiveRecordExtensions::PendingUID.new if @file_uid == "PENDING"
|
@@ -6,11 +6,11 @@
|
|
6
6
|
<div class="file-detail" id="asset-<%= asset.id %>">
|
7
7
|
<span class="file-title"><%= h( asset.title ) %></span>
|
8
8
|
|
9
|
-
<%= (asset.image? or asset.video?) ? image_tag( asset.url('70x70#',
|
9
|
+
<%= (asset.image? or asset.video?) ? image_tag( asset.url('70x70#', asset.dragonfly_extension_sym) ) : asset_icon(asset) %>
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<%= link_to 'Show', noodall_admin_asset_path(asset, :readonly => readonly), :class => 'show button', :title => 'View this asset' %>
|
13
|
-
<%= link_to 'Add', asset.url, :class => 'add button', :title => 'Add this asset' %>
|
13
|
+
<%= link_to 'Add me', asset.url, :class => 'add button', :title => 'Add this asset' %>
|
14
14
|
</li>
|
15
15
|
<% end %>
|
16
16
|
</ul>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
<div id="sub-form">
|
46
46
|
<div id="image">
|
47
47
|
<% if @asset.image? or @asset.video? %>
|
48
|
-
<%= image_tag( @asset.url('260x',
|
48
|
+
<%= image_tag( @asset.url('260x', @asset.dragonfly_extension_sym), :alt => @asset.description, :id => "asset-#{@asset.id}" ) %>
|
49
49
|
<% else -%>
|
50
50
|
<%= link_to( @asset.file.name, @asset.url, :title => @asset.description, :id => "asset-#{@asset.id}" ) %>
|
51
51
|
<% end -%>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div id="image">
|
6
6
|
<% if @asset.image? or @asset.video? %>
|
7
|
-
<%= link_to(image_tag( @asset.url('500x400',
|
7
|
+
<%= link_to(image_tag( @asset.url('500x400', @asset.dragonfly_extension_sym), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url, :class => ('lightboxVideo' if @asset.video?)) %>
|
8
8
|
<% else -%>
|
9
9
|
<%= link_to( asset_icon(@asset) ) %>
|
10
10
|
<% end -%>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if @asset.image? %>
|
2
|
-
<%= link_to image_tag( @asset.url('100x100#',
|
2
|
+
<%= link_to image_tag( @asset.url('100x100#', @asset.dragonfly_extension_sym), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url('800x600', @asset.dragonfly_extension_sym), :class => 'lightbox', :title => @asset.title %>
|
3
3
|
<% elsif @asset.video? %>
|
4
4
|
<div class="video">
|
5
|
-
<%= link_to image_tag( @asset.url('220x125#',
|
5
|
+
<%= link_to image_tag( @asset.url('220x125#', @asset.dragonfly_extension_sym), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url, :class => 'lightboxVideo', :title => @asset.title %>
|
6
6
|
<strong><%= @asset.title %></strong>
|
7
7
|
</div>
|
8
8
|
<% else -%>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<tr id="asset-<%= asset.id %>" class="<%=cycle('odd', 'even')%>">
|
19
19
|
<td><%= link_to h( asset.title ), edit_noodall_admin_asset_path(asset), :class => 'edit', :title => 'Edit this asset' %></td>
|
20
20
|
<td class="file">
|
21
|
-
<%= (asset.image? or asset.video?) ? image_tag( asset.url('70x70',
|
21
|
+
<%= (asset.image? or asset.video?) ? image_tag( asset.url('70x70', asset.dragonfly_extension_sym), :alt => "#{truncate(asset.file.name, :length => 80)}") : link_to( asset_icon(asset) ) %>
|
22
22
|
<%= link_to 'Show', noodall_admin_asset_path(asset), :class => 'show', :title => 'View this asset' %>
|
23
23
|
</td>
|
24
24
|
<td><%=h asset.created_at.to_formatted_s(:short_ordinal) %></td>
|
data/lib/noodall/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve England
|
@@ -28,10 +28,10 @@ dependencies:
|
|
28
28
|
segments:
|
29
29
|
- 0
|
30
30
|
version: "0"
|
31
|
+
type: :runtime
|
31
32
|
name: noodall-core
|
32
33
|
prerelease: false
|
33
34
|
version_requirements: *id001
|
34
|
-
type: :runtime
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
37
|
none: false
|
@@ -44,27 +44,26 @@ dependencies:
|
|
44
44
|
- 0
|
45
45
|
- 6
|
46
46
|
version: 0.0.6
|
47
|
+
type: :runtime
|
47
48
|
name: thoughtbot-sortable_table
|
48
49
|
prerelease: false
|
49
50
|
version_requirements: *id002
|
50
|
-
type: :runtime
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
hash:
|
57
|
+
hash: 270495401
|
58
58
|
segments:
|
59
59
|
- 3
|
60
60
|
- 0
|
61
|
-
-
|
62
|
-
- 2
|
61
|
+
- pre2
|
63
62
|
version: 3.0.pre2
|
63
|
+
type: :runtime
|
64
64
|
name: will_paginate
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: *id003
|
67
|
-
type: :runtime
|
68
67
|
- !ruby/object:Gem::Dependency
|
69
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
69
|
none: false
|
@@ -75,10 +74,10 @@ dependencies:
|
|
75
74
|
segments:
|
76
75
|
- 0
|
77
76
|
version: "0"
|
77
|
+
type: :runtime
|
78
78
|
name: dynamic_form
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: *id004
|
81
|
-
type: :runtime
|
82
81
|
- !ruby/object:Gem::Dependency
|
83
82
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
@@ -91,10 +90,10 @@ dependencies:
|
|
91
90
|
- 0
|
92
91
|
- 0
|
93
92
|
version: 1.0.0
|
93
|
+
type: :development
|
94
94
|
name: bundler
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: *id005
|
97
|
-
type: :development
|
98
97
|
description: Noodall Rails User Interface Engine. Requires Noodall Core
|
99
98
|
email:
|
100
99
|
- steve@wearebeef.co.uk
|
@@ -674,7 +673,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
674
673
|
requirements: []
|
675
674
|
|
676
675
|
rubyforge_project:
|
677
|
-
rubygems_version: 1.
|
676
|
+
rubygems_version: 1.3.7
|
678
677
|
signing_key:
|
679
678
|
specification_version: 3
|
680
679
|
summary: Noodall Rails User Interface
|