[ARVADOS] updated: ce9f11911e57b6d79e44f510d47703ca8a3fcd9c
git at public.curoverse.com
git at public.curoverse.com
Tue Dec 2 11:01:50 EST 2014
Summary of changes:
apps/workbench/app/models/collection.rb | 14 +-------------
.../workbench/app/views/collections/_index_tbody.html.erb | 15 ++++++++++-----
2 files changed, 11 insertions(+), 18 deletions(-)
via ce9f11911e57b6d79e44f510d47703ca8a3fcd9c (commit)
from 0e24e2fd257b7aa27e04fa4376b5297d331a6a99 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ce9f11911e57b6d79e44f510d47703ca8a3fcd9c
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Dec 2 10:22:06 2014 -0500
4699: Fix crash when collection has tags but no name. closes #4699
diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb
index b5347dc..686b816 100644
--- a/apps/workbench/app/models/collection.rb
+++ b/apps/workbench/app/models/collection.rb
@@ -90,20 +90,8 @@ class Collection < ArvadosBase
end
end
- def portable_data_hash
- if self[:portable_data_hash].nil?
- return self[:uuid]
- else
- super
- end
- end
-
def friendly_link_name lookup=nil
- if self.respond_to? :name
- self.name
- else
- self.portable_data_hash
- end
+ name || portable_data_hash
end
def textile_attributes
diff --git a/apps/workbench/app/views/collections/_index_tbody.html.erb b/apps/workbench/app/views/collections/_index_tbody.html.erb
index 25d8796..5d2fe2c 100644
--- a/apps/workbench/app/views/collections/_index_tbody.html.erb
+++ b/apps/workbench/app/views/collections/_index_tbody.html.erb
@@ -2,11 +2,16 @@
<tr class="collection" data-object-uuid="<%= c.uuid %>">
<td>
- <% friendly_name = c.friendly_link_name %>
- <% @collection_info[c.uuid][:tag_links].each do |tag_link| %>
- <% friendly_name += raw(" <span class='label label-info'>#{tag_link.name}</span>") %>
- <% end %>
- <%= render :partial => "selection_checkbox", :locals => {:object => c, :friendly_name => friendly_name} %>
+ <%=
+ friendly_name = c.friendly_link_name
+ @collection_info[c.uuid][:tag_links].each do |tag_link|
+ friendly_name += raw(" <span class='label label-info'>#{tag_link.name}</span>")
+ end
+ render partial: "selection_checkbox", locals: {
+ object: c,
+ friendly_name: friendly_name
+ }
+ %>
<%= render :partial => "show_object_button", :locals => {object: c, size: 'xs'} %>
</td>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list