Modified: branches/biocat/app/helpers/application_helper.rb (2391 => 2392)
--- branches/biocat/app/helpers/application_helper.rb 2010-04-26 15:49:57 UTC (rev 2391)
+++ branches/biocat/app/helpers/application_helper.rb 2010-04-27 15:20:55 UTC (rev 2392)
@@ -349,6 +349,8 @@
return nil unless network
return title(network)
+ elsif contributortype.to_s == "FederationSource"
+ link_to "The BioCatalogue", "http://www.biocatalogue.org"
else
return nil
end
@@ -365,6 +367,8 @@
return nil unless network
return h(network.title)
+ elsif contributortype.to_s == "FederationSource"
+ "The BioCatalogue"
else
return nil
end
@@ -424,6 +428,13 @@
else
return nil
end
+ when "Service"
+ if s = Service.find(:first, :conditions => ["id = ?", contributableid])
+ name = h(s.name)
+ return link ? link_to(name, service_url(s)) : name
+ else
+ return nil
+ end
end
end
@@ -770,6 +781,8 @@
return "famfamfam_silk/text_signature.png"
when "home"
return "famfamfam_silk/application_home.png"
+ when "service"
+ return "biocat_icon.png"
else
return Conf.label_icons[method.to_s] if Conf.label_icons[method.to_s]
end
Modified: branches/biocat/app/views/services/_table.rhtml (2391 => 2392)
--- branches/biocat/app/views/services/_table.rhtml 2010-04-26 15:49:57 UTC (rev 2391)
+++ branches/biocat/app/views/services/_table.rhtml 2010-04-27 15:20:55 UTC (rev 2392)
@@ -1,32 +1,99 @@
<% query ||= false -%>
<% odd_row = false -%>
+
<% unless collection.empty? %>
<table class="alt_table">
- <% for contributable in collection %>
+ <% for service in collection %>
<tr class="<%= (odd_row = !odd_row) ? "odd_row" : "even_row" %>">
- <% cache(:controller => 'services_cache', :action ="" 'listing', :id => contributable.id) do -%>
+ <% cache(:controller => 'services_cache', :action ="" 'listing', :id => service.id) do -%>
<td style="width: 100px;">
- <p style="margin-top:0; padding-top:0; text-align: center;"><b>Submitter:</b></p>
- <center><%= link_to contributable.submitter_label, contributable.submitter_uri %></center>
+ <% service.service_types.each do |t| %>
+ <div class="workflow_type_box" style="width: auto; margin-bottom: 0.5em;">
+ <%= h(t.label) -%>
+ </div>
+ <% end %>
+
+ <p style="margin-top:0; padding-top:0; text-align: center; margin-top: 1em;"><b>Submitter:</b></p>
+ <p style="text-align: center;"><%= link_to service.submitter_label, service.submitter_uri %></p>
</td>
<td style="text-align: left;">
<p class="title">
- <%= icon contributable.class.to_s.underscore, nil, nil, nil, '' %>
- <% title = contributable.name %>
- <%= link_to(query ? highlight_all(title, query) : title, service_path(contributable)) %>
+ <% unless service.monitor_small_symbol_url.blank? %>
+ <span style="float: right; margin-left: 1em;">
+ <% mon_text = "Latest Monitoring Status: <b>#{service.monitor_label}</b><br/>#{service.monitor_message}<br/> Last checked: #{timeago_fuzzy(service.monitor_last_checked)}" %>
+ <%= image_tag service.monitor_small_symbol_url, :style => "margin-left: 0.5em;", :title => tooltip_title_attrib(mon_text), :alt => mon_text -%>
+ </span>
+ <% end %>
+
+ <%= icon "service", nil, nil, nil, '' %>
+ <% title = h(service.name) %>
+ <%= link_to(query ? highlight_all(title, query) : title, service_path(service)) %>
+
+ <% unless service.flag_url.blank? %>
+ <%= image_tag service.flag_url, :style => "margin-left: 0.5em;", :title => tooltip_title_attrib(h(service.country)), :alt => h(service.country) -%>
+ <% end %>
</p>
-
+
<p style="font-size: 85%; margin-top: 0; padding-top: 0;">
- <b>Retrieved at:</b> <%= datetime(contributable.created_at, false) %>
+ <b>Retrieved at:</b> <%= datetime(service.created_at, false) %>
+ <% unless service.created_at == service.updated_at %>
+ <b>Last updated at:</b> <%= datetime(service.updated_at, false) -%>
+ <% end %>
</p>
+
+ <p style="font-size: 85%;">
+ <b>Provider:</b> <%= link_to h(service.provider_label), service.provider_uri -%>
+ </p>
+
+ <div class="desc" style="font-size: 85%;">
+ <% unless service.description.blank? -%>
+ <% desc = truncate(strip_html(service.description), 500) -%>
+ <%= query ? highlight_all(desc, query) : desc %>
+ <% else -%>
+ <span class="none_text">No description</span>
+ <% end -%>
+ </div>
+
+ <% unless service.wsdl.blank? %>
+ <p style="font-size: 85%;">
+ <b>WSDL Location:</b> <%= link_to h(service.wsdl), service.wsdl -%> |
+ </p>
+ <% end %>
+
+ <% unless service.endpoint.blank? %>
+ <p style="font-size: 85%;">
+ <b>Service Enpoint: </b> <%= link_to h(service.endpoint), service.endpoint -%>
+ </p>
+ <% end %>
+
+ <% unless (tags = service.service_tags).empty? %>
+ <p style="font-size: 85%;">
+ <a href="" service_path(service) + '#tags' -%>"><b>Tags</b> (<%=tags.length-%>):</a>
+ </p>
+ <div style="display:inline;" class="tags_onesize" style="font-size: 85%;">
+ <div class="hTagcloud">
+ <ul class="popularity">
+ <% tags.each do |tag| %>
+ <li>
+ <%= link_to h(tag.label), tag.uri, :title => tooltip_title_attrib("Click to see tag on BioCatalogue") -%>
+ <%= "<li>|</li>" unless tag == tags[tags.length-1] -%>
+ </li>
+ <% end %>
+ </ul>
+ </div>
+ </div>
+ <% else %>
+ <p style="font-size: 85%;"><i>This Service has no tags!</i></p>
+ <% end %>
+
+ <p style="font-size: 85%; text-align: right;">
+ <%= link_to "BioCatalogue Link", service.uri -%>
+ </p>
</td>
<% end %>
- <td class="actions" style="width: 80px;">
- <%= icon "show", service_path(contributable), nil, nil, "View" %>
- </td>
</tr>
<% end %>
</table>