myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3456] branches/contextualisation: Special biovel


From: noreply
Subject: [myexperiment-hackers] [3456] branches/contextualisation: Special biovel tabs
Date: Fri, 1 Mar 2013 09:21:06 +0000 (UTC)

Revision
3456
Author
fbacall
Date
2013-03-01 09:21:05 +0000 (Fri, 01 Mar 2013)

Log Message

Special biovel tabs

Modified Paths

Diff

Modified: branches/contextualisation/app/helpers/application_helper.rb (3455 => 3456)


--- branches/contextualisation/app/helpers/application_helper.rb	2013-02-28 17:28:22 UTC (rev 3455)
+++ branches/contextualisation/app/helpers/application_helper.rb	2013-03-01 09:21:05 UTC (rev 3456)
@@ -1573,10 +1573,10 @@
         logger.error("Missing layout for #{contributable.class.name} #{contributable.id}: "+
                     "#{contributable.contribution.policy.layout}")
       end
-    elsif @network
-      layout = @network.layout
+    elsif (network = @network) || (@context.is_a?(Network) && (network = @context))
+      layout = network.layout
       if layout.nil?
-        logger.error("Missing layout for Group address@hidden: address@hidden")
+        logger.error("Missing layout for Group #{network.id}")
       end
     end
 

Modified: branches/contextualisation/app/views/content/_index.rhtml (3455 => 3456)


--- branches/contextualisation/app/views/content/_index.rhtml	2013-02-28 17:28:22 UTC (rev 3455)
+++ branches/contextualisation/app/views/content/_index.rhtml	2013-03-01 09:21:05 UTC (rev 3456)
@@ -73,7 +73,7 @@
         search box below to refine the results.<% end %>
       </div>
       <div>
-        <form action="" request.query_parameters.to_param -%>" method="GET">
+        <form action="" url_with_params(request.path, request.query_parameters) -%>" method="GET">
           <div class="search_box">
             <input class="query" name="query" value="<%= params[:query] -%>" />
             <% if request.query_parameters["filter"] %>

Modified: branches/contextualisation/app/views/layouts/_myexperiment.rhtml (3455 => 3456)


--- branches/contextualisation/app/views/layouts/_myexperiment.rhtml	2013-02-28 17:28:22 UTC (rev 3455)
+++ branches/contextualisation/app/views/layouts/_myexperiment.rhtml	2013-03-01 09:21:05 UTC (rev 3456)
@@ -37,7 +37,7 @@
           <% else %>
             <%= link_to image_tag(Conf.site_logo), "/" %>
           <% end %>
-          </div>
+        </div>
         <div id="myexp_links">
           <div style="text-align: left; float: left; width: 34%; padding-top: 6px;" id="site_info_links" class="links">
             <% if @content_for_site_info_links %>
@@ -53,7 +53,11 @@
         <div class="clearer">&nbsp;</div>
       </div>
       <div id="myexp_tabs">
-        <%= render :partial => 'layouts/tab_bar' %>
+        <% if @content_for_tabs %>
+          <%= yield :tabs %>
+        <% else %>
+          <%= render :partial => 'layouts/tab_bar' %>
+        <% end %>
       </div>
       <div id="myexp_searchbar">
         <%= render :partial => "layouts/search" %>

Modified: branches/contextualisation/app/views/skins/_biovel.rhtml (3455 => 3456)


--- branches/contextualisation/app/views/skins/_biovel.rhtml	2013-02-28 17:28:22 UTC (rev 3455)
+++ branches/contextualisation/app/views/skins/_biovel.rhtml	2013-03-01 09:21:05 UTC (rev 3456)
@@ -1,6 +1,17 @@
 <% @logo_link_url  = "http://biovel.eu/" # The URL that the logo links to when clicked
-   @logo_image_url = "/images/biovel.png" # The logo image %>
+   @logo_image_url = "/images/biovel.png" # The logo image
 
+   biovel_id = @layout['network_id']
+
+   biovel_tabs = [
+       {'controller' => 'networks', 'label' => 'BioVeL', 'link' => network_path(biovel_id)},
+       {'controller' => 'workflows', 'label' => 'Workflows', 'link' => network_workflows_path(biovel_id)},
+       {'controller' => 'blobs', 'label' => 'Files', 'link' => network_blobs_path(biovel_id)},
+       {'controller' => 'packs', 'label' => 'Packs', 'link' => network_packs_path(biovel_id)}
+   ]
+
+%>
+
 <% content_for :site_info_links do %>
 
 <% end %>
@@ -23,6 +34,17 @@
   <br class="clearer"/>
 <% end %>
 
+<% content_for :tabs do %>
+  <ul class="tabnav">
+    <li class="return_tab"><%= link_to 'Home', '/home'-%></li>
+    <% biovel_tabs.each do |tab| %>
+      <li <%= (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'id="selected_tabnav"' : '' %>>
+        <%= link_to(tab['label'], tab['link']) -%>
+      </li>
+    <% end %>
+  </ul>
+<% end %>
+
 <%= render :partial => "layouts/myexperiment" %>
 
 <% if Rails.env == "production" %>

Modified: branches/contextualisation/public/stylesheets/biovel.css (3455 => 3456)


--- branches/contextualisation/public/stylesheets/biovel.css	2013-02-28 17:28:22 UTC (rev 3455)
+++ branches/contextualisation/public/stylesheets/biovel.css	2013-03-01 09:21:05 UTC (rev 3456)
@@ -50,3 +50,10 @@
   padding-top: 1em;
 }
 
+.tabnav li.return_tab {
+  margin-right: 1em;
+}
+
+.tabnav li.return_tab a:hover {
+  background-color: #cd0b37;
+}

reply via email to

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