myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2392] branches/biocat: Initial implementation of


From: noreply
Subject: [myexperiment-hackers] [2392] branches/biocat: Initial implementation of the services table partial.
Date: Tue, 27 Apr 2010 11:20:56 -0400 (EDT)

Revision
2392
Author
jits
Date
2010-04-27 11:20:55 -0400 (Tue, 27 Apr 2010)

Log Message

Initial implementation of the services table partial.

Modified Paths

Added Paths

Property Changed

Diff

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>

Added: branches/biocat/public/images/biocat_icon.png


(Binary files differ)
Property changes on: branches/biocat/public/images/biocat_icon.png ___________________________________________________________________

Added: svn:mime-type

Property changes: branches/biocat/tmp


Added: svn:ignore

Property changes: branches/biocat/vendor/plugins/acts_as_solr/solr/solr


Added: svn:ignore


reply via email to

[Prev in Thread] Current Thread [Next in Thread]