myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3268] branches/wf4ever/app/views/research_object


From: noreply
Subject: [myexperiment-hackers] [3268] branches/wf4ever/app/views/research_objects: Split out stuff and dummy metadata
Date: Fri, 14 Dec 2012 16:56:28 +0000 (UTC)

Revision
3268
Author
stain
Date
2012-12-14 16:56:28 +0000 (Fri, 14 Dec 2012)

Log Message

Split out stuff and dummy metadata

Modified Paths

Added Paths

Diff

Added: branches/wf4ever/app/views/research_objects/_resources.rhtml (0 => 3268)


--- branches/wf4ever/app/views/research_objects/_resources.rhtml	                        (rev 0)
+++ branches/wf4ever/app/views/research_objects/_resources.rhtml	2012-12-14 16:56:28 UTC (rev 3268)
@@ -0,0 +1,69 @@
+
+
+<h2>Resources from manifest</h2>
+
+<table class="simple">
+
+  <tr>
+    <td>created_at</td>
+    <td><%=h @contributable.created_at -%></td>
+  </tr>
+
+  <tr>
+    <td>updated_at</td>
+    <td><%=h @contributable.updated_at -%></td>
+  </tr>
+
+  <tr>
+    <td>URL</td>
+    <td><%=h @contributable.url -%></td>
+  </tr>
+
+  <tr>
+    <td>title</td>
+    <td><%=h @contributable.title -%></td>
+  </tr>
+
+  <tr>
+    <td>description</td>
+    <td><%= @contributable.description_html -%></td>
+  </tr>
+
+  <tr>
+    <td>RDF statement count</td>
+    <td><%= @contributable.statements.length -%></td>
+  </tr>
+
+</table>
+
+<% resources   = @contributable.wf4ever_resources %>
+<% annotations = @contributable.annotations       %>
+
+<% if resources.length > 0 %>
+
+  <h2>Pack Items</h2>
+
+  <%= research_object_resources(@contributable) -%>
+
+<% end %>
+
+<% if annotations.length > 0 %>
+
+  <h2>Annotations</h2>
+
+  <table class="simple">
+    <tr>
+      <th>Type</th>
+      <th>Value</th>
+    </tr>
+    <% annotations.each do |annotation| %>
+      <tr>
+        <td><%=h annotation[:type] -%></td>
+        <td><%=h annotation[:body] -%></td>
+      </tr>
+    <% end %>
+  </table>
+
+  <br />
+
+<% end %>
\ No newline at end of file

Added: branches/wf4ever/app/views/research_objects/_statements.html (0 => 3268)


--- branches/wf4ever/app/views/research_objects/_statements.html	                        (rev 0)
+++ branches/wf4ever/app/views/research_objects/_statements.html	2012-12-14 16:56:28 UTC (rev 3268)
@@ -0,0 +1,44 @@
+
+<% if @contributable.statements.length > 0 %>
+
+  <div class="fold">
+
+    <div class="foldTitle">RDF statements (<%= @contributable.statements.length -%>)</div>
+    <div class="foldContent" style="display: none;">
+
+      <h2>Summary</h2>
+
+      <table class="simple">
+        <tr>
+          <th>URI</th>
+          <th>S</th>
+          <th>P</th>
+          <th>O</th>
+        </tr>
+        <% research_object_summary(@contributable).each do |row| %>
+          <tr>
+            <td><%=h row[0] -%></td>
+            <td><%= row[1] -%></td>
+            <td><%= row[2] -%></td>
+            <td><%= row[3] -%></td>
+          </tr>
+        <% end %>
+      </table>
+
+      <h2>Statements</h2>
+
+      <div id="statement_list">
+        <% @contributable.statements.each do |statement| %>
+          <div>
+            <table>
+              <tr><td><%=h statement.subject_text   -%></td></tr>
+              <tr><td><%=h statement.predicate_text -%></td></tr>
+              <tr><td><%=h statement.objekt_text    -%></td></tr>
+            </table>
+          </div>
+        <% end %>
+      </div>
+    </div>
+  </div>
+  
+<% end %>

Added: branches/wf4ever/app/views/research_objects/_versions.rhtml (0 => 3268)


--- branches/wf4ever/app/views/research_objects/_versions.rhtml	                        (rev 0)
+++ branches/wf4ever/app/views/research_objects/_versions.rhtml	2012-12-14 16:56:28 UTC (rev 3268)
@@ -0,0 +1,91 @@
+<script type="text/_javascript_">
+  function showVersion(form) {
+    var url = ""
+		location.href = ""
+		form.submit
+  }
+</script>
+<div class="contribution_version_selector_box">
+
+  <table>
+    <tbody>
+      <tr>
+        <td class="heading" style="vertical-align: top;">
+          <img alt="Information" src="" style="vertical-align:middle;" title="header=[] body=[This box shows version 7 for this entry] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200]">          <span>Version 7 (latest)</span>
+          <span class="count_text">(of 7)</span>
+          <a name="versions"></a>
+        </td>
+        <td>
+          
+             <form  return false;" style="text-align: right;">
+              <b>View version: </b>
+              <select id="resource_versions"  style="visibility: visible; ">
+                
+                  <option value="/research_objects/16/versions/7" selected="">
+                      7 (latest)
+                  </option>
+                
+                  <option value="/research_objects/16/versions/6">
+                      6 
+                  </option>
+                
+                  <option value="/research_objects/16/versions/5">
+                      5 
+                  </option>
+                
+                  <option value="/research_objects/16/versions/4">
+                      4 
+                  </option>
+                
+                  <option value="/research_objects/16/versions/3">
+                      3 
+                  </option>
+                
+                  <option value="/research_objects/16/versions/2">
+                      2 
+                  </option>
+                
+                  <option value="/research_objects/16/versions/1">
+                      1 (earliest)
+                  </option>
+                
+              </select>
+            </form>
+          
+        </td>
+      </tr>
+    </tbody>
+  </table>
+      
+  <div id="version_info_box" style="color: #666666;  font-size: 85%; margin: 0.6em 0.5em 0.2em 0.5em; border-top: 1px solid #DDDDDD; padding-top: 0.4em;">
+    <p style="text-align: center;">
+      <b>Version created on:</b>
+      <span>02/09/11 @ 11:43:00</span>
+      
+        <b>by:</b>
+        <span><a href="" title="header=[] body=[Paul Fisher] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200]">Paul Fisher</a></span>
+      
+      
+        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
+        <span><a href=""  return false;">Revision comment <img alt="Expand" src="" style="margin-left: 0.3em; vertical-align: middle;"></a></span>
+      
+    </p>
+    
+    
+      <p style="text-align: center;">
+        <b>Last edited on:</b>
+        <span>02/09/11 @ 11:44:57</span>
+        
+          <b>by:</b>
+          <span><a href="" title="">Paul Fisher</a></span>
+        
+      </p>
+    
+  </div>
+  
+      <div id="version_info_box_comments" style="display: none; border: 1px dotted #CCCCCC; padding: 0.3em 0.5em;">
+      <p>Fixed missing lister service</p>
+    </div>
+  
+
+</div>
\ No newline at end of file

Modified: branches/wf4ever/app/views/research_objects/show.rhtml (3267 => 3268)


--- branches/wf4ever/app/views/research_objects/show.rhtml	2012-12-14 16:56:22 UTC (rev 3267)
+++ branches/wf4ever/app/views/research_objects/show.rhtml	2012-12-14 16:56:28 UTC (rev 3268)
@@ -1,114 +1,73 @@
-<h1>Research Object: <%=h @contributable.title -%></h1>
 
-<h2>Resources from manifest</h2>
+<ul class="sectionIcons">
+	<% if @authorised_to_edit -%>
+		<li><%= icon('new', new_version_workflow_path(@workflow), nil, nil, 'Upload New Version')%></li>
+	<% end -%>	
+	<% if mine?(@workflow) -%>
+		<li><%= icon('manage', edit_workflow_path(@workflow), nil, nil, 'Manage Workflow Entry')%></li>
+	<% end -%>
+	<% if Authorization.check("destroy", @workflow, current_user) -%>
+		<li>
+			<%= icon('destroy', workflow_path(@workflow), nil, { :confirm => 'This deletes all versions of the Workflow and all metadata such as tags, comments and citations. Are you sure?', :method => :delete }, 'Delete Workflow Entry') %>
+		</li>
+	<% end -%>
+</ul>
 
-<table class="simple">
+<h1>Research Object: <%=h @contributable.title -%></h1>
 
-  <tr>
-    <td>created_at</td>
-    <td><%=h @contributable.created_at -%></td>
-  </tr>
+<%= render :partial => "contributions/datetime_info", :locals => { :contributable => @contributable } -%>
 
-  <tr>
-    <td>updated_at</td>
-    <td><%=h @contributable.updated_at -%></td>
-  </tr>
 
-  <tr>
-    <td>URL</td>
-    <td><%=h @contributable.url -%></td>
-  </tr>
+<div class="contribution_mini_nav">
+	|
+	<%= link_to "Made", "#license" %>
+	|
+  <%= link_to "Up", "#workflows" %>
+	|
+  <%= link_to "Links", "#workflows" %>
+	|
+</div>
 
-  <tr>
-    <td>title</td>
-    <td><%=h @contributable.title -%></td>
-  </tr>
 
-  <tr>
-    <td>description</td>
-    <td><%= @contributable.description_html -%></td>
-  </tr>
 
-  <tr>
-    <td>RDF statement count</td>
-    <td><%= @contributable.statements.length -%></td>
-  </tr>
 
-</table>
 
-<% resources   = @contributable.wf4ever_resources %>
-<% annotations = @contributable.annotations       %>
-
-<% if resources.length > 0 %>
-
-  <h2>Pack Items</h2>
-
-  <%= research_object_resources(@contributable) -%>
-
-<% end %>
-
-<% if annotations.length > 0 %>
-
-  <h2>Annotations</h2>
-
-  <table class="simple">
-    <tr>
-      <th>Type</th>
-      <th>Value</th>
-    </tr>
-    <% annotations.each do |annotation| %>
-      <tr>
-        <td><%=h annotation[:type] -%></td>
-        <td><%=h annotation[:body] -%></td>
-      </tr>
-    <% end %>
-  </table>
-
-  <br />
-
-<% end %>
-
-<% if @contributable.statements.length > 0 %>
-
-  <div class="fold">
-
-    <div class="foldTitle">RDF statements (<%= @contributable.statements.length -%>)</div>
-    <div class="foldContent" style="display: none;">
-
-      <h2>Summary</h2>
-
-      <table class="simple">
-        <tr>
-          <th>URI</th>
-          <th>S</th>
-          <th>P</th>
-          <th>O</th>
-        </tr>
-        <% research_object_summary(@contributable).each do |row| %>
-          <tr>
-            <td><%=h row[0] -%></td>
-            <td><%= row[1] -%></td>
-            <td><%= row[2] -%></td>
-            <td><%= row[3] -%></td>
-          </tr>
-        <% end %>
-      </table>
-
-      <h2>Statements</h2>
-
-      <div id="statement_list">
-        <% @contributable.statements.each do |statement| %>
-          <div>
-            <table>
-              <tr><td><%=h statement.subject_text   -%></td></tr>
-              <tr><td><%=h statement.predicate_text -%></td></tr>
-              <tr><td><%=h statement.objekt_text    -%></td></tr>
-            </table>
-          </div>
-        <% end %>
+<div class="contribution_left_box">
+	
+	<div class="contribution_version_box">
+<%= render :partial => "research_objects/versions", :locals => { :contributable => @contributable } -%>
+ 
+  
+	  <div class="contribution_version_inner_box">
+      <div class="annotation">
+        <span class="type">Title:</span>
+  			<span class="title">Hello World</span>
+        <div class="provenance">
+          <span class="authoredBy">Stian Soiland-Reyes</span> on 
+          <span class="authoredOn">2012-05-14 17:05</span>
+        </div>
       </div>
-    </div>
-  </div>
+      
+      <div class="annotation">
+        <h3 class="type">Description</h3>
+        <div class="body">
+          This research object shows a Hello World workflow. This is particularly interesting because
+          it is difficult to create a much simpler research object, but still expose most of the RO 
+          functionality.
+        </div>
+        <div class="provenance">
+          <span class="authoredBy">Stian Soiland-Reyes</span> on 
+          <span class="authoredOn">2012-12-24 15:04</span>
+        </div>        
+      </div>  
+    </div>   
+  
+  </div>  
 
+<% if false %>
+  <%= render :partial => "research_objects/resources", :locals => { :contributable => @contributable } -%>
+  <%= render :partial => "research_objects/statements", :locals => { :contributable => @contributable } -%>
 <% end %>
 
+</div>
+

reply via email to

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