Modified: branches/wf4ever/app/views/workflows/edit.rhtml (3211 => 3212)
--- branches/wf4ever/app/views/workflows/edit.rhtml 2012-11-27 12:58:29 UTC (rev 3211)
+++ branches/wf4ever/app/views/workflows/edit.rhtml 2012-11-27 13:58:22 UTC (rev 3212)
@@ -17,11 +17,16 @@
<% form_for(:workflow, :url ="" workflow_path(@workflow), :html => { :method => :put }) do |f| %>
- <p>
- <b>Research Object URI:</b>
- <%= f.text_field :ro_uri, :size => 60 %>
- </p>
+ <div class="ro_uri_edit_box">
+ <p><b>Research Object URI</b></p>
+ <p>You may associate this workflow with a <em>research object</em> by
+ specifying the URI to it. Once set, metadata will be synchronised
+ with the research object.</p>
+
+ <p><%= f.text_field :ro_uri, :size => 60, :placeholder => 'http://example.org/rodl/ROs/research_object/' %></p>
+ </div>
+
<%= render :partial => "tags/tags_form", :locals => { :edit => true, :taggable => @workflow } %>
<%= render :partial => "contributions/credit_attribution_form", :locals => { :edit => true, :contributable => @workflow } %>
Modified: branches/wf4ever/app/views/workflows/show.rhtml (3211 => 3212)
--- branches/wf4ever/app/views/workflows/show.rhtml 2012-11-27 12:58:29 UTC (rev 3211)
+++ branches/wf4ever/app/views/workflows/show.rhtml 2012-11-27 13:58:22 UTC (rev 3212)
@@ -1,6 +1,9 @@
<% title = @workflow.title %>
-<% @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.title, nil]).each do |s, p, o| title = o.to_s end %>
+<% if @workflow.ro_uri %>
+ <% @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.title, nil]).each do |s, p, o| title = o.to_s end %>
+<% end %>
+
<% t "#{h title} (#{h @workflow.contributor_name}) [#{h(@workflow.type_display_name)} Workflow]" -%>
<%= render :partial => "workflows/deprecation_event", :collection => @workflow.deprecations -%>
@@ -94,20 +97,22 @@
<br/>
- <% creators = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.creator, nil]) %>
- <% contributors = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.contributor, nil]) %>
+ <% if @workflow.ro_uri %>
+ <% creators = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.creator, nil]) %>
+ <% contributors = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.contributor, nil]) %>
- <% if creators.count > 0 || contributors.count > 0 %>
+ <% if creators.count > 0 || contributors.count > 0 %>
- <h3>
- <%= info_icon_with_tooltip("This section shows the creators and contributors of the Workflow") %>
- Credit
- </h3>
-
- <ul>
- <% creators.each do |s, p, o| %><li><%=h o.to_s -%> (creator)</li><% end %>
- <% contributors.each do |s, p, o| %><li><%=h o.to_s -%> (contributor)</li><% end %>
- </ul>
+ <h3>
+ <%= info_icon_with_tooltip("This section shows the creators and contributors of the Workflow") %>
+ Credit
+ </h3>
+
+ <ul>
+ <% creators.each do |s, p, o| %><li><%=h o.to_s -%> (creator)</li><% end %>
+ <% contributors.each do |s, p, o| %><li><%=h o.to_s -%> (contributor)</li><% end %>
+ </ul>
+ <% end %>
<% end %>
<h3>
@@ -141,30 +146,31 @@
Description
</h3>
- <% @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.description, nil]).each do |s, p, o| %>
- <div class="contribution_description">
- <p><%=h o.to_s %></p>
- </div>
- <% end %>
+ <% if @workflow.ro_uri %>
+ <% @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.description, nil]).each do |s, p, o| %>
+ <div class="contribution_description">
+ <p><%=h o.to_s %></p>
+ </div>
+ <% end %>
- <% subjects = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.subject, nil]) %>
+ <% subjects = @annotations.query([RDF::URI.parse(workflow_url(@workflow)), RDF::DC.subject, nil]) %>
- <% if subjects.count > 0 %>
- <div class="tag_list">
- <ul>
- <% subjects.each do |s, p, o| %>
- <li><%=h o.to_s -%></li>
- <% end %>
- </ul>
- </div>
- <% end %>
+ <% if subjects.count > 0 %>
+ <div class="tag_list">
+ <ul>
+ <% subjects.each do |s, p, o| %>
+ <li><%=h o.to_s -%></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
- <br/>
+ <br/>
- <h3>
- <%= info_icon_with_tooltip("This section provides example data sets (workflow inputs and outputs) to this workflow") %>
- Example data sets
- </h3>
+ <h3>
+ <%= info_icon_with_tooltip("This section provides example data sets (workflow inputs and outputs) to this workflow") %>
+ Example data sets
+ </h3>
<%
workflow_uri = RDF::URI.parse(workflow_url(@workflow))
@@ -200,39 +206,40 @@
data_sets = (inputs + outputs).group_by do |item| item[:data_sets] end
%>
- <% if data_sets.length == 0 %>
- <p class="none_text">
- There are no data sets with this workflow.
- </p>
- <% else %>
- <% data_sets.each do |data_set| %>
+ <% if data_sets.length == 0 %>
+ <p class="none_text">
+ There are no data sets with this workflow.
+ </p>
+ <% else %>
+ <% data_sets.each do |data_set| %>
- <% inputs = data_set[1].select do |item| item[:type] == :input end %>
- <% outputs = data_set[1].select do |item| item[:type] == :output end %>
+ <% inputs = data_set[1].select do |item| item[:type] == :input end %>
+ <% outputs = data_set[1].select do |item| item[:type] == :output end %>
- <% if inputs.length > 0 && outputs.length > 0 %>
- <table class="simple">
- <tr>
- <th>Input / Output</th>
- <th>Example</th>
- </tr>
- <% if inputs.length > 0 %>
- <% inputs.each do |input| %>
- <tr>
- <td>Input: <%=h input[:label] -%></td>
- <td><%=h input[:value] -%></td>
- </tr>
+ <% if inputs.length > 0 && outputs.length > 0 %>
+ <table class="simple">
+ <tr>
+ <th>Input / Output</th>
+ <th>Example</th>
+ </tr>
+ <% if inputs.length > 0 %>
+ <% inputs.each do |input| %>
+ <tr>
+ <td>Input: <%=h input[:label] -%></td>
+ <td><%=h input[:value] -%></td>
+ </tr>
+ <% end %>
<% end %>
- <% end %>
- <% if outputs.length > 0 %>
- <% outputs.each do |output| %>
- <tr>
- <td>Output: <%=h output[:label] -%></td>
- <td><%=h output[:value] -%></td>
- </tr>
+ <% if outputs.length > 0 %>
+ <% outputs.each do |output| %>
+ <tr>
+ <td>Output: <%=h output[:label] -%></td>
+ <td><%=h output[:value] -%></td>
+ </tr>
+ <% end %>
<% end %>
- <% end %>
- </table>
+ </table>
+ <% end %>
<% end %>
<% end %>
<% end %>
Modified: branches/wf4ever/public/stylesheets/styles.css (3211 => 3212)
--- branches/wf4ever/public/stylesheets/styles.css 2012-11-27 12:58:29 UTC (rev 3211)
+++ branches/wf4ever/public/stylesheets/styles.css 2012-11-27 13:58:22 UTC (rev 3212)
@@ -2431,3 +2431,20 @@
padding-right: 4px;
}
+div.ro_uri_edit_box {
+ text-align: center;
+ background: #EEEEEE;
+ background-image: url('/images/header-bg.png');
+ background-position: top;
+ background-repeat: repeat-x;
+ border: 1px solid #999999;
+ border-bottom: 2px solid #999999;
+ width: 550px;
+ padding: 8px;
+ margin: 16px auto;
+}
+
+div.ro_uri_edit_box input {
+ width: 546px;
+}
+