2875: collection description is now textile and also the display is updated.
authorradhika <radhika@curoverse.com>
Tue, 16 Sep 2014 15:22:02 +0000 (11:22 -0400)
committerradhika <radhika@curoverse.com>
Tue, 16 Sep 2014 15:22:02 +0000 (11:22 -0400)
apps/workbench/app/models/collection.rb
apps/workbench/app/views/application/show.html.erb
apps/workbench/app/views/collections/show.html.erb

index edd87add19ada373ef4892fc532b2ffe8884a8de..40fd930e38a99ae453ff11e01defcedec35af5fb 100644 (file)
@@ -110,4 +110,8 @@ class Collection < ArvadosBase
     end
   end
 
+  def textile_attributes
+    [ 'description' ]
+  end
+
 end
index d4b17856cba514611f6c74b6a4e65369d2d396b8..0697fefec596d55aa79e40cc419013c513456efb 100644 (file)
@@ -5,7 +5,7 @@
 <% end %>
 
 <% content_for :content_top do %>
-  <% if !['Group','User'].include? @object.class.to_s # not a project %>
+  <% if !['Group','User', 'Collection'].include? @object.class.to_s # projects and collections handle it themselves %>
     <%= render partial: 'name_and_description' %>
   <% end %>
 
index 94b099a25c8c7256a3a63430080a0778d7f9d7c9..a80cf3985d92731b561b81dec01e62acc91d0323 100644 (file)
@@ -33,6 +33,9 @@
        </h3>
       </div>
       <div class="panel-body">
+        <div class="arv-description-as-subtitle">
+          <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "(No description provided)", 'data-toggle' => 'manual' } %>
+        </div>
         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
         <% if defined? @same_pdh %>
           <p>Found in collections:<p>