My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 49 attachment: latest_file_uploads.patch (2.1 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/content_nodes_controller.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/content_nodes_controller.rb (revision 43)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/admin/content_nodes_controller.rb (working copy)
@@ -146,6 +146,7 @@
def set_recent_uploads
@recent_uploads = UserUpload.find(
:all,
+ :conditions => "thumbnail IS NULL",
:order => 'created_on DESC',
:limit => 9
)
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/admin/content_nodes/_crud_sidebar.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/admin/content_nodes/_crud_sidebar.rhtml (revision 43)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/admin/content_nodes/_crud_sidebar.rhtml (working copy)
@@ -54,15 +54,12 @@
style="float:left; height: 50px; width: 50px; overflow: hidden; margin: 5px;"
>
<div class="image">
- <%
- if @file.type == Image
- image_thumb_path = @file.public_filename(:thumb)
- %>
+ <% if @file.read_attribute(:type) == "Image" %>
<!-- this is an image -->
- <a href="<%= @file.public_filename %>" class="submodal-400-400"><%= image_tag image_thumb_path %></a>
+ <a href="<%= @file.public_filename %>" class="submodal-400-400"><%= image_tag @file.public_filename(:thumb) %></a>
<% else %>
<div style="background-color:#eee; padding:5px; width:40px; height:40px; font-size: 1.2em; text-align: center;">
- <a href="<%= @file.public_filename %>"><%= @file.extension.upcase %></a>
+ <a href="<%= @file.public_filename %>"><%= @file.extension.upcase %></a>
</div>
<% end %>
</div>

Powered by Google Project Hosting