myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2986] branches/galaxy-integration/app: Fixed nil


From: noreply
Subject: [myexperiment-hackers] [2986] branches/galaxy-integration/app: Fixed nil error and tweaked some wording
Date: Fri, 11 May 2012 11:28:06 +0000 (UTC)

Revision
2986
Author
fbacall
Date
2012-05-11 11:28:05 +0000 (Fri, 11 May 2012)

Log Message

Fixed nil error and tweaked some wording

Modified Paths

Diff

Modified: branches/galaxy-integration/app/controllers/application_controller.rb (2985 => 2986)


--- branches/galaxy-integration/app/controllers/application_controller.rb	2012-05-09 14:44:28 UTC (rev 2985)
+++ branches/galaxy-integration/app/controllers/application_controller.rb	2012-05-11 11:28:05 UTC (rev 2986)
@@ -1202,20 +1202,22 @@
 
   # Applies a header to the page
   def check_external_site_request
-    external_url_keys = params.keys & Conf.external_site_integrations.keys.collect {|s| s + "_url"}
+    unless params.empty?
+      external_url_keys = params.keys & Conf.external_site_integrations.keys.collect {|s| s + "_url"}
 
-    if external_url_keys.size == 1
-      external_url_key = external_url_keys.first
-      external_url = params[external_url_key]
+      if external_url_keys.size == 1
+        external_url_key = external_url_keys.first
+        external_url = params[external_url_key]
 
-      if %w(http https).include?(URI.parse(external_url).scheme)
-        session[:came_from] = external_url_key[0..-5] # Strip the _url part
-        session[:return_url] = CGI.unescape(external_url)
-      else
-        raise("Invalid return URL given for #{external_url_key}: \n\t#{external_url}")
+        if %w(http https).include?(URI.parse(external_url).scheme)
+          session[:came_from] = external_url_key[0..-5] # Strip the _url part
+          session[:return_url] = CGI.unescape(external_url)
+        else
+          raise("Invalid return URL given for #{external_url_key}: \n\t#{external_url}")
+        end
+      elsif external_url_keys.size > 1
+        raise("#{external_url_keys.size} external URLs specified. Can only cope with one!")
       end
-    elsif external_url_keys.size > 1
-      raise("#{external_url_keys.size} external URLs specified. Can only cope with one!")
     end
   end
 

Modified: branches/galaxy-integration/app/views/workflows/galaxy/_run_options.rhtml (2985 => 2986)


--- branches/galaxy-integration/app/views/workflows/galaxy/_run_options.rhtml	2012-05-09 14:44:28 UTC (rev 2985)
+++ branches/galaxy-integration/app/views/workflows/galaxy/_run_options.rhtml	2012-05-11 11:28:05 UTC (rev 2986)
@@ -1,7 +1,7 @@
 <% if session[:came_from] == 'galaxy' %>
   <style type="text/css">
     div.galaxy_import_form {
-      margin: 0 0.5em;
+      margin: 0.5em;
       text-align: center;
       border: 1px solid #D8B365;
       font-family: Verdana, sans-serif;
@@ -17,6 +17,7 @@
       margin-bottom: 0.5em;
     }
   </style>
+
   <div class="galaxy_import_form">
     <div class="header">Import this workflow into Galaxy</div>
     <form action="" session[:return_url].chomp("/") -%>/workflow/import_workflow" method="POST" name="import_workflow">
@@ -28,4 +29,6 @@
       <input type="submit" value="Import" name="import_button"/>
     </form>
   </div>
+<% else %>
+  <p class="none_text">Not currently available.</p>
 <% end %>

Modified: branches/galaxy-integration/app/views/workflows/show.rhtml (2985 => 2986)


--- branches/galaxy-integration/app/views/workflows/show.rhtml	2012-05-09 14:44:28 UTC (rev 2985)
+++ branches/galaxy-integration/app/views/workflows/show.rhtml	2012-05-11 11:28:05 UTC (rev 2986)
@@ -251,7 +251,7 @@
 
 			<h3>
 				<%= info_icon_with_tooltip("This section provides options for running this version of the Workflow") %>
-				Run
+        <%= @viewing_version.content_type.title == "Galaxy" ? "Import" : "Run" %>
 			</h3>
 				
 			<% if @authorised_to_download %>

reply via email to

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