myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3343] branches/wf4ever: WFE-821 Drop-down URL/fi


From: noreply
Subject: [myexperiment-hackers] [3343] branches/wf4ever: WFE-821 Drop-down URL/file-upload form
Date: Wed, 23 Jan 2013 16:43:26 +0000 (UTC)

Revision
3343
Author
stain
Date
2013-01-23 16:43:26 +0000 (Wed, 23 Jan 2013)

Log Message

WFE-821 Drop-down URL/file-upload form

daring to try multiple upload..

Modified Paths

Diff

Modified: branches/wf4ever/app/views/packs/_add_item_ro.rhtml (3342 => 3343)


--- branches/wf4ever/app/views/packs/_add_item_ro.rhtml	2013-01-23 16:43:18 UTC (rev 3342)
+++ branches/wf4ever/app/views/packs/_add_item_ro.rhtml	2013-01-23 16:43:26 UTC (rev 3343)
@@ -19,31 +19,51 @@
         </p>      
 <% end %>
 
+	<% if @error_message -%>
+		<p class="error_text" style="padding: 0 0.8em;"><%= @error_message -%></p>
+		<br/>
+	<% end -%>
 
-	<div class="box_currentuser_specific" style="margin-bottom: 0.5em; padding: 0.1em 0;">
-    <% form_tag(create_resource_pack_path(@pack), :multipart => true, :method => :post) do %>
-			<table class="quick_add">
-				<tr>
-					<td class="label" style="vertical-align: top; padding-bottom: 0;" rowspan=2>
-						<%= info_icon_with_tooltip("Type or paste in a link to something (either in #{Conf.sitename} or elsewhere). The link will then be resolved appropriately.") -%>
-						<b>Quick add:</b>
-						<p class="inner">(a link)</p>
-					</td>
-					<td style="padding-bottom: 0;">
-						<%= text_field_tag "uri", params[:uri], :size => 47 -%>
-					</td>
-					<td class="submit" style="padding-bottom: 0;">
-						<%= submit_tag "Add", :disable_with => "..." -%>
-					</td>
-				</tr>
-				<tr>
-					<td style="padding-top: 0;">
-						<p style="text-align: center; color: #333333; font-size: 77%; padding: 0;">
-							eg: "http://www.myexperiment.org/workflows/1" or "http://www.example.com/something-nice"
-						</p>
-					</td>
-					<td style="padding-top: 0;">&nbsp;</td>
-				</tr>
-			</table>
+
+	<div class="box_currentuser_specific">
+    <% form_tag(create_resource_pack_path(@pack), :multipart => true, :method => :post, :class => :add_item_ro) do %>
+
+      <div>
+        <label for=""
+          <%= info_icon_with_tooltip("The type indicates the item's meaning in the pack.")  -%>
+          Type:
+        </label>
+        <%= select_tag (:ro_resource_type, options_for_select(Conf.ro_resource_types, 
+                          "http://purl.org/wf4ever/ro#Resource") )  -%>
+      </div>
+    
+      <div>
+        <label for=""
+          <%= info_icon_with_tooltip( "Type or paste in a URL to a resource, file or website, which will be added as an external pack item.") -%>
+          Add Link:
+        </label>
+	    	<%= text_field_tag "uri", params[:uri], :size => 47 -%>
+        <div class="example"><span>
+          eg: <code>http://docs.example.com/file.pdf</code> or <code>http://www.example.com/website/</code></span>
+        </div>
+      </div>
+
+      
+      <div class="or">
+        -or-
+      </div>
+
+      <div>
+        <label for=""
+          <%= info_icon_with_tooltip("Select a local file which will be uploaded as part of the pack") -%>
+          Add File:
+        </label>
+        <%= file_field_tag :file, {:multiple => :multiple} -%>
+      </div>
+      <div>
+  			<%= submit_tag "Add" -%>
+      </div>
+
+  
 		<% end -%>    
 	</div>
\ No newline at end of file

Modified: branches/wf4ever/public/stylesheets/styles.css (3342 => 3343)


--- branches/wf4ever/public/stylesheets/styles.css	2013-01-23 16:43:18 UTC (rev 3342)
+++ branches/wf4ever/public/stylesheets/styles.css	2013-01-23 16:43:26 UTC (rev 3343)
@@ -2593,4 +2593,36 @@
   padding: 1em;
   margin: 0.4em;
   font-style: italic;
+}
+
+.add_item_ro {
+  margin-bottom: 0.5em; 
+  padding: 0.1em;
+  padding-right: 0;
+}
+
+.add_item_ro label {
+  display: inline-block;
+  width: 8em;
+  font-weight: bold;
+  text-align: right;  
+}
+
+.add_item_ro .example {
+  margin-top: 0;
+  margin-bottom: 0;
+  padding-left: 8em;
+}
+/* Trickery inner span to avoid smaller font-size changing padding */
+.add_item_ro .example span {
+  font-size: smaller;
+}
+
+.add_item_ro > div {
+  margin-top: 0.4em;
+  margin-bottom: 0.4em;
+}
+.add_item_ro .or {
+  padding-left: 4em;
+  color: #335;
 }
\ No newline at end of file

reply via email to

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