Diff
Modified: branches/apace/app/helpers/application_helper.rb (2153 => 2154)
--- branches/apace/app/helpers/application_helper.rb 2009-03-31 14:39:09 UTC (rev 2153)
+++ branches/apace/app/helpers/application_helper.rb 2009-03-31 15:10:54 UTC (rev 2154)
@@ -424,6 +424,14 @@
else
return nil
end
+ else
+ if c = eval(contributabletype).find_by_id(contributableid)
+ name = h(c.label)
+
+ return link ? link_to(name, contributable_url(c)) : name
+ else
+ return nil
+ end
end
end
Deleted: branches/apace/app/views/algorithms/_license.rhtml (2153 => 2154)
--- branches/apace/app/views/algorithms/_license.rhtml 2009-03-31 14:39:09 UTC (rev 2153)
+++ branches/apace/app/views/algorithms/_license.rhtml 2009-03-31 15:10:54 UTC (rev 2154)
@@ -1,108 +0,0 @@
-<% case (contributable.license.to_s); when "by-nd" %>
-
-<!--
-
-<rdf:RDF xmlns="http://web.resource.org/cc/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-<Work rdf:about="">
- <dc:title><%= contributable.title %></dc:title>
- <dc:date><%= contributable.created_at %></dc:date>
- <dc:description><%= contributable.description_html %></dc:description>
- <dc:creator><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:creator>
- <dc:rights><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:rights>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
- <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
- <license rdf:resource="http://creativecommons.org/licenses/by-nd/3.0/" />
-</Work>
-
-<License rdf:about="http://creativecommons.org/licenses/by-nd/3.0/">
- <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
- <permits rdf:resource="http://web.resource.org/cc/Distribution" />
- <requires rdf:resource="http://web.resource.org/cc/Notice" />
- <requires rdf:resource="http://web.resource.org/cc/Attribution" />
- <prohibits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-</License>
-
-</rdf:RDF>
-
--->
-
-<% when "by-sa" %>
-
-<!--
-
-<rdf:RDF xmlns="http://web.resource.org/cc/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-<Work rdf:about="">
- <dc:title><%= contributable.title %></dc:title>
- <dc:date><%= contributable.created_at %></dc:date>
- <dc:description><%= contributable.description_html %></dc:description>
- <dc:creator><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:creator>
- <dc:rights><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:rights>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
- <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
- <license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
-</Work>
-
-<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
- <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
- <permits rdf:resource="http://web.resource.org/cc/Distribution" />
- <requires rdf:resource="http://web.resource.org/cc/Notice" />
- <requires rdf:resource="http://web.resource.org/cc/Attribution" />
- <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
- <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
-</License>
-
-</rdf:RDF>
-
--->
-
-<% when "by" %>
-
-<!--
-
-<rdf:RDF xmlns="http://web.resource.org/cc/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-<Work rdf:about="">
- <dc:title><%= contributable.title %></dc:title>
- <dc:date><%= contributable.created_at %></dc:date>
- <dc:description><%= contributable.description_html %></dc:description>
- <dc:creator><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:creator>
- <dc:rights><Agent>
- <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
- </Agent></dc:rights>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
- <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
- <license rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
-</Work>
-
-<License rdf:about="http://creativecommons.org/licenses/by/3.0/">
- <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
- <permits rdf:resource="http://web.resource.org/cc/Distribution" />
- <requires rdf:resource="http://web.resource.org/cc/Notice" />
- <requires rdf:resource="http://web.resource.org/cc/Attribution" />
- <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-</License>
-
-</rdf:RDF>
-
--->
-
-<% end %>
-
-<p>
- This Algorithm is licensed under the <%= license_link contributable.license.to_s %>.
-</p>
Modified: branches/apace/app/views/algorithms/_table.rhtml (2153 => 2154)
--- branches/apace/app/views/algorithms/_table.rhtml 2009-03-31 14:39:09 UTC (rev 2153)
+++ branches/apace/app/views/algorithms/_table.rhtml 2009-03-31 15:10:54 UTC (rev 2154)
@@ -20,7 +20,7 @@
<td style="text-align: left;">
<p class="title">
<%= icon "algorithm", nil, nil, nil, '' %>
- <% title = contributable_name(contributable.id, 'Blob') %>
+ <% title = contributable_name(contributable.id, 'Algorithm') %>
<%=link_to(query ? highlight_all(title, query) : title, algorithm_path(contributable)) %>
</p>
@@ -51,7 +51,7 @@
<% if Authorization.is_authorized?("show", nil, a.attributor, current_user) -%>
<% if a.attributor_type == 'Workflow' %>
<%= icon('workflow', nil, nil, nil, '') %>
- <% elsif a.attributor_type == 'Blob' %>
+ <% elsif a.attributor_type == 'Algorithm' %>
<%= icon('algorithm', nil, nil, nil, '') %>
<% end %>
<%= contributable(a.attributor_id, a.attributor_type) %>
Modified: branches/apace/app/views/algorithms/statistics.rhtml (2153 => 2154)
--- branches/apace/app/views/algorithms/statistics.rhtml 2009-03-31 14:39:09 UTC (rev 2153)
+++ branches/apace/app/views/algorithms/statistics.rhtml 2009-03-31 15:10:54 UTC (rev 2154)
@@ -1 +1 @@
-<%= render :partial => "contributions/statistics_detailed", :locals => { :contributable => @blob } %>
\ No newline at end of file
+<%= render :partial => "contributions/statistics_detailed", :locals => { :contributable => @contributable } %>
Modified: branches/apace/config/routes.rb (2153 => 2154)
--- branches/apace/config/routes.rb 2009-03-31 14:39:09 UTC (rev 2153)
+++ branches/apace/config/routes.rb 2009-03-31 15:10:54 UTC (rev 2154)
@@ -100,6 +100,7 @@
# applications
map.resources :applications,
+ :controller => :apps,
:collection => { :all => :get, :search => :get },
:member => { :statistics => :get,
:favourite => :post,