Diff
Modified: branches/wf4ever/app/helpers/folders_helper.rb (3272 => 3273)
--- branches/wf4ever/app/helpers/folders_helper.rb 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/app/helpers/folders_helper.rb 2012-12-14 16:57:02 UTC (rev 3273)
@@ -13,9 +13,11 @@
end
def make_tree_view_structure(ro)
- {:label => ro.root_folder.name,
- :labelStyle => "root_folder",
- :uri => ro.root_folder.uri}
+ if (ro.root_folder)
+ { :label => ro.root_folder.name,
+ :labelStyle => "root_folder",
+ :uri => ro.root_folder.uri }
+ end
end
def make_resources(ro)
Modified: branches/wf4ever/app/models/research_object.rb (3272 => 3273)
--- branches/wf4ever/app/models/research_object.rb 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/app/models/research_object.rb 2012-12-14 16:57:02 UTC (rev 3273)
@@ -267,6 +267,7 @@
value)
end
+
def manifest
return @manifest if @manifest
Modified: branches/wf4ever/app/views/folders/_navigation.html.erb (3272 => 3273)
--- branches/wf4ever/app/views/folders/_navigation.html.erb 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/app/views/folders/_navigation.html.erb 2012-12-14 16:57:02 UTC (rev 3273)
@@ -1,8 +1,14 @@
<%
ro = make_research_object(ro_uri)
structure = make_tree_view_structure(ro)
-resources = make_resources(ro)
+%>
+<% if not structure %>
+ <div class="error">No root folder found</div>
+<% else %>
+
+<%
+ resources = make_resources(ro)
%>
<div id="nav-tabs" class="yui-navset">
<div class="yui-content">
@@ -31,6 +37,7 @@
tree.setDynamicLoad(loadNodeData); //Trigger request when expanding a node
tree.render();
+
function loadNodeData(node, fnLoadComplete) {
var nodeLabel = encodeURI(node.label);
@@ -57,5 +64,6 @@
YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
}
+</script>
-</script>
+<% end %>
\ No newline at end of file
Modified: branches/wf4ever/app/views/research_objects/_tree.rhtml (3272 => 3273)
--- branches/wf4ever/app/views/research_objects/_tree.rhtml 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/app/views/research_objects/_tree.rhtml 2012-12-14 16:57:02 UTC (rev 3273)
@@ -1,3 +1,4 @@
+<% if ro_uri %>
<div class="contribution_section_box tree">
<h3 class="heading">
Navigate RO
@@ -5,8 +6,9 @@
<div class="rotree">
- <%= render :partial => "folders/navigation", :locals => {:ro_uri => @contributable.url} %>
+ <%= render :partial => "folders/navigation", :locals => {:ro_uri => ro_uri} %>
</div>
-</div>
\ No newline at end of file
+</div>
+<% end %>
\ No newline at end of file
Modified: branches/wf4ever/app/views/research_objects/show.rhtml (3272 => 3273)
--- branches/wf4ever/app/views/research_objects/show.rhtml 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/app/views/research_objects/show.rhtml 2012-12-14 16:57:02 UTC (rev 3273)
@@ -80,7 +80,7 @@
<%= render :partial => "research_objects/status", :locals => { :contributable => @contributable } -%>
- <%= render :partial => "research_objects/tree", :locals => { :contributable => @contributable } -%>
+ <%= render :partial => "research_objects/tree", :locals => { :contributable => @contributable, :ro_uri => @contributable.url } -%>
<% if false %>
<% end %>
Modified: branches/wf4ever/public/stylesheets/styles.css (3272 => 3273)
--- branches/wf4ever/public/stylesheets/styles.css 2012-12-14 16:56:55 UTC (rev 3272)
+++ branches/wf4ever/public/stylesheets/styles.css 2012-12-14 16:57:02 UTC (rev 3273)
@@ -2485,11 +2485,13 @@
.status {
font-size: 300%;
- text-transform: capitalize;
font-weight: bold;
}
-
.live {
font-family: "Margarine", Inconsolata, Consolas, cursive;
- text-transform: capitalize;
+ text-transform: lowercase;
}
+
+.error {
+ color: #c44;
+}
\ No newline at end of file