Modified: branches/packs/app/views/packs/_add_item.rhtml (3659 => 3660)
--- branches/packs/app/views/packs/_add_item.rhtml 2013-09-02 13:33:11 UTC (rev 3659)
+++ branches/packs/app/views/packs/_add_item.rhtml 2013-09-02 14:22:16 UTC (rev 3660)
@@ -7,71 +7,79 @@
<% form_tag quick_add_pack_url(@pack) 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>
+
+ <tr class="uri">
+ <td class="label">Choose URI</td>
+ <td>
+ <%= text_field_tag "uri", params[:uri], :placeholder => 'http://www.example.com/resource' -%>
+ <%= 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. You can specify a particular version of a resource within #{Conf.sitename} using this box.") -%>
</td>
- <td style="padding-bottom: 0;">
- <div>
- <%= text_field_tag "uri", params[:uri], :style => "width: 280px;",
- :placeholder => 'http://www.example.com/resource' -%>
- </div>
+ </tr>
- <% unless (contributions = current_user.contributions).empty? -%>
- <div>or</div>
- <div>
- <select id="uri2" name="uri2" style="width: 280px;">
- <option value="">Select from your contributions...</option>
- <% contributions.each do |c| -%>
- <% if ["workflow", "blob", "pack"].include? c.contributable_type.downcase -%>
- <% show = (c.contributable.class.to_s == 'Pack' ? (@pack.id != c.contributable.id) : true) -%> <!-- prevents from displaying current pack in the list of things that are enabled to be added to the current pack -->
- <% if show -%>
- <option value="<%= contributable_url(c.contributable_id, c.contributable_type, @base_host) -%>">
- <%= "#{visible_name c.contributable_type}: #{contributable_name(c.contributable_id, c.contributable_type)}" -%>
- </option>
- <% end %>
- <% end -%>
+ <% unless (contributions = current_user.contributions).empty? -%>
+ <tr class="uri">
+ <td class="label"></td>
+ <td>
+ or <select id="uri2" name="uri2">
+ <option value="">select from your contributions...</option>
+ <% contributions.each do |c| -%>
+ <% if ["workflow", "blob", "pack"].include? c.contributable_type.downcase -%>
+ <% show = (c.contributable.class.to_s == 'Pack' ? (@pack.id != c.contributable.id) : true) -%> <!-- prevents from displaying current pack in the list of things that are enabled to be added to the current pack -->
+ <% if show -%>
+ <option value="<%= contributable_url(c.contributable_id, c.contributable_type, @base_host) -%>">
+ <%= "#{visible_name c.contributable_type}: #{contributable_name(c.contributable_id, c.contributable_type)}" -%>
+ </option>
+ <% end %>
<% end -%>
- </select>
- </div>
- <% end %>
+ <% end -%>
+ </select>
+ </td>
+ </tr>
+ <% end %>
- <% unless (bookmarks = current_user.bookmarks).empty? -%>
- <div>or</div>
- <div>
- <select id="uri3" name="uri3" style="width: 320px;">
- <option value="">Select from your favourites...</option>
- <% bookmarks.each do |b| -%>
- <% if ["workflow", "blob", "pack"].include? b.bookmarkable_type.downcase -%>
- <% show = (b.bookmarkable_type == 'Pack' ? (@pack.id != b.bookmarkable_id) : true) -%> <!-- prevents from displaying current pack in the list of things that are enabled to be added to the current pack -->
- <% if show -%>
- <option value="<%= contributable_url(b.bookmarkable_id, b.bookmarkable_type, @base_host) -%>">
- <%= "#{visible_name b.bookmarkable_type}: #{contributable_name(b.bookmarkable_id, b.bookmarkable_type)}" -%>
- </option>
- <% end %>
- <% end -%>
+ <% unless (bookmarks = current_user.bookmarks).empty? -%>
+ <tr class="uri">
+ <td class="label"></td>
+ <td>
+ or <select id="uri3" name="uri3">
+ <option value="">select from your favourites...</option>
+ <% bookmarks.each do |b| -%>
+ <% if ["workflow", "blob", "pack"].include? b.bookmarkable_type.downcase -%>
+ <% show = (b.bookmarkable_type == 'Pack' ? (@pack.id != b.bookmarkable_id) : true) -%> <!-- prevents from displaying current pack in the list of things that are enabled to be added to the current pack -->
+ <% if show -%>
+ <option value="<%= contributable_url(b.bookmarkable_id, b.bookmarkable_type, @base_host) -%>">
+ <%= "#{visible_name b.bookmarkable_type}: #{contributable_name(b.bookmarkable_id, b.bookmarkable_type)}" -%>
+ </option>
+ <% end %>
<% end -%>
- </select>
- </div>
- <% end %>
+ <% end -%>
+ </select>
+ </td>
+ </tr>
+ <% end %>
+ <tr>
+ <td class="label">Type</td>
+ <td>
<%= select_tag(:type, options_for_select(Conf.ro_resource_types.map { |x| [x["label"], x["uri"]] },
"http://purl.org/wf4ever/ro#Resource") ) -%>
- Folder: <%= select_tag(:folder, options_for_select(['(automatic)'] + @ore_directories)) -%>
</td>
- <td class="submit">
- <%= submit_tag "Add", :disable_with => "..." -%>
+ </tr>
+
+ <tr>
+ <td class="label">Folder</td>
+ <td>
+ <%= select_tag(:folder, options_for_select(['(automatic)'] + @ore_directories)) -%>
</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/resource"
- </p>
+ <td></td>
+ <td class="submit">
+ <%= submit_tag "Add item", :disable_with => "..." -%>
</td>
- <td style="padding-top: 0;"> </td>
</tr>
+
</table>
<% end -%>
<% end -%>
Modified: branches/packs/app/views/packs/show.rhtml (3659 => 3660)
--- branches/packs/app/views/packs/show.rhtml 2013-09-02 13:33:11 UTC (rev 3659)
+++ branches/packs/app/views/packs/show.rhtml 2013-09-02 14:22:16 UTC (rev 3660)
@@ -141,15 +141,6 @@
<br/><br/>
- <% if @authorised_to_edit -%>
- <h3>
- <%= info_icon_with_tooltip("This section provides various ways of adding items to this pack") %>
- Add an Item
- </h3>
- <a name="add_item"></a>
- <%= render :partial => "add_item", :locals => { :pack => @pack } -%>
- <% end %>
-
<h3>
<%= info_icon_with_tooltip("This section provides the ability to add relationships between items in this pack") %>
Relationships
@@ -171,8 +162,17 @@
</div>
</div>
- <h1>Debug</h1>
+ <% if @authorised_to_edit -%>
+ <h2>
+ <%= info_icon_with_tooltip("This section provides various ways of adding items to this pack") %>
+ Add an Item
+ </h2>
+ <a name="add_item"></a>
+ <%= render :partial => "add_item", :locals => { :pack => @pack } -%>
+ <% end %>
+ <h2>Debug</h2>
+
<div id="tabsContainer" class="tabsContainer"></div>
<div class="tabContainer">
Modified: branches/packs/public/stylesheets/styles.css (3659 => 3660)
--- branches/packs/public/stylesheets/styles.css 2013-09-02 13:33:11 UTC (rev 3659)
+++ branches/packs/public/stylesheets/styles.css 2013-09-02 14:22:16 UTC (rev 3660)
@@ -1841,39 +1841,24 @@
color: gray;
}
-table.quick_add {
- border-collapse: collapse;
- width: 99%;
- color: #333333;
+TABLE.quick_add TD {
+ text-align: left;
}
-table.quick_add td {
- vertical-align: middle;
+TABLE.quick_add TD.label {
+ text-align: right;
+ font-weight: bold;
}
-table.quick_add td * {
- vertical-align: middle;
+TABLE.quick_add INPUT[type="text"],
+TABLE.quick_add SELECT {
+ width: 400px;
}
-table.quick_add td.label {
- text-align: left;
- line-height: 1.0;
- width: 11em;
+TABLE.quick_add TR.uri TD {
+ padding-top: 0;
}
-table.quick_add td.label .inner {
- font-size: 77%;
- text-align: center;
- color: #990000;
- font-weight: bold;
-}
-
-
-table.quick_add td.submit {
- text-align: left;
- width: 4em;
-}
-
.group_announcements {
margin-top: 0.8em;
padding: 0 0.5em;