myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2495] trunk: added option to hide download link


From: noreply
Subject: [myexperiment-hackers] [2495] trunk: added option to hide download link for certain workflow processors
Date: Wed, 11 Aug 2010 16:40:45 -0400 (EDT)

Revision
2495
Author
dgc
Date
2010-08-11 16:40:44 -0400 (Wed, 11 Aug 2010)

Log Message

added option to hide download link for certain workflow processors

Modified Paths

Diff

Modified: trunk/app/models/workflow.rb (2494 => 2495)


--- trunk/app/models/workflow.rb	2010-08-11 13:33:13 UTC (rev 2494)
+++ trunk/app/models/workflow.rb	2010-08-11 20:40:44 UTC (rev 2495)
@@ -295,4 +295,12 @@
     
     boost
   end
+
+  def show_download_section?
+    if processor_class
+      processor_class.show_download_section?
+    else
+      true
+    end
+  end
 end

Modified: trunk/app/views/workflows/show.rhtml (2494 => 2495)


--- trunk/app/views/workflows/show.rhtml	2010-08-11 13:33:13 UTC (rev 2494)
+++ trunk/app/views/workflows/show.rhtml	2010-08-11 20:40:44 UTC (rev 2495)
@@ -210,24 +210,28 @@
 			
 			<br/>
 			
+      <% if @workflow.show_download_section? %>
+
+        <h3>
+          <%= info_icon_with_tooltip("This section provides links to the different downloads for this version of the Workflow") %>
+          Download
+        </h3>
+        
+        <% if @authorised_to_download %>
+          <ul class="sectionIcons">
+            <li style="margin-left: 0;"><%= icon('workflow', @named_download_url, "Download Workflow file/package (for version address@hidden)", nil, "Download Workflow File/Package (address@hidden)") -%></li>
+          </ul>
+        <% else %>
+          <p class="none_text">
+            You do not have permission to download this workflow
+          </p>
+        <% end %>
+        
+        <br/>
+        
+      <% end %>
+
 			<h3>
-				<%= info_icon_with_tooltip("This section provides links to the different downloads for this version of the Workflow") %>
-				Download
-			</h3>
-			
-			<% if @authorised_to_download %>
-				<ul class="sectionIcons">
-					<li style="margin-left: 0;"><%= icon('workflow', @named_download_url, "Download Workflow file/package (for version address@hidden)", nil, "Download Workflow File/Package (address@hidden)") -%></li>
-				</ul>
-			<% else %>
-				<p class="none_text">
-					You do not have permission to download this workflow
-				</p>
-			<% end %>
-			
-			<br/>
-			
-			<h3>
 				<%= info_icon_with_tooltip("This section provides options for running this version of the Workflow") %>
 				Run
 			</h3>

Modified: trunk/lib/workflow_processors/interface.rb (2494 => 2495)


--- trunk/lib/workflow_processors/interface.rb	2010-08-11 13:33:13 UTC (rev 2494)
+++ trunk/lib/workflow_processors/interface.rb	2010-08-11 20:40:44 UTC (rev 2495)
@@ -53,6 +53,10 @@
       false
     end
     
+    def self.show_download_section?
+      true
+    end
+
     # End Class Methods
 
 

reply via email to

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