Modified: branches/wf4ever/app/models/pack.rb (3379 => 3380)
--- branches/wf4ever/app/models/pack.rb 2013-01-30 05:55:06 UTC (rev 3379)
+++ branches/wf4ever/app/models/pack.rb 2013-01-30 13:53:41 UTC (rev 3380)
@@ -75,9 +75,9 @@
ce.creator = @manifest.graph.first_object([resource.object, RDF::DC.creator, nil])
ce.checksum = @manifest.graph.first_object([resource.object, RDF::RO.checksum, nil])
ce.size = @manifest.graph.first_value([resource.object, RDF::RO.filesize, nil])
-
- next unless ce.name
+ next if @manifest.graph.query([resource.object, RDF.type, RDF::RO.Folder]).count > 0
+
@entries << ce
end
@entries = @entries.sort_by {|ce| ce.name or ce.uri}
Modified: branches/wf4ever/app/views/packs/_items.rhtml (3379 => 3380)
--- branches/wf4ever/app/views/packs/_items.rhtml 2013-01-30 05:55:06 UTC (rev 3379)
+++ branches/wf4ever/app/views/packs/_items.rhtml 2013-01-30 13:53:41 UTC (rev 3380)
@@ -97,25 +97,23 @@
</table>
</li>
<% else %>
- <% if e && e.name %>
- <%
- label = e.ro_local_uri
- annotations = get_annotations(pack.ro_uri, e.uri)
- types = resource_types_as_labels(annotations, e.uri)
- %>
- <li><%= link_to(label, pack_resources_path(pack) + '/' + e.ro_local_uri) -%>
- <% if not types.empty? %>
- (<%= types -%>)
- <% end %>
- <%= link_to_remote("<img src='' />",
- :update => "pack_items",
- :url ="" pack_resources_path(pack) + '/' + e.ro_local_uri,
- :method => :delete,
- :complete => "new Effect.Highlight('pack_items', { duration: 1.5 });",
- :confirm => "Are you sure you want to delete this resource?" )
- %>
- </li>
- <% end %>
+ <%
+ label = e.ro_local_uri
+ annotations = get_annotations(pack.ro_uri, e.uri)
+ types = resource_types_as_labels(annotations, e.uri)
+ %>
+ <li><%= link_to(label, pack_resources_path(pack) + '/' + e.ro_local_uri) -%>
+ <% if not types.empty? %>
+ (<%= types -%>)
+ <% end %>
+ <%= link_to_remote("<img src='' />",
+ :update => "pack_items",
+ :url ="" pack_resources_path(pack) + '/' + e.ro_local_uri,
+ :method => :delete,
+ :complete => "new Effect.Highlight('pack_items', { duration: 1.5 });",
+ :confirm => "Are you sure you want to delete this resource?" )
+ %>
+ </li>
<% end %>
<% end -%>