[ARVADOS] updated: 0b3427a023ddfb5443e5c63ad65b2ef80d9865f7

git at public.curoverse.com git at public.curoverse.com
Wed Aug 27 12:31:22 EDT 2014


Summary of changes:
 apps/workbench/app/helpers/application_helper.rb           | 11 +++++++++++
 apps/workbench/app/views/projects/_index_projects.html.erb |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

       via  0b3427a023ddfb5443e5c63ad65b2ef80d9865f7 (commit)
      from  63330000144108862a4e2b02a7a8fa124d01163e (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 0b3427a023ddfb5443e5c63ad65b2ef80d9865f7
Author: radhika <radhika at curoverse.com>
Date:   Wed Aug 27 12:30:53 2014 -0400

    3339: render truncated textile descriptions in dashboard

diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index edcb7fb..605b0d3 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -210,6 +210,17 @@ module ApplicationHelper
     end
   end
 
+  def render_textile_attribute(object, attr, truncate)
+    attrvalue = object.send(attr)
+    if attrvalue && attrvalue.length > 0
+      markup = render_textile_if_textile( object, attr, attrvalue )
+      markup = markup[0,markup.index('</p>')+4] if (truncate && markup.index('</p>'))
+      return markup
+    else
+      return (attr == 'name' and object.andand.default_name) || ''
+    end
+  end
+
   def render_pipeline_component_attribute(object, attr, subattr, value_info, htmloptions={})
     datatype = nil
     required = true
diff --git a/apps/workbench/app/views/projects/_index_projects.html.erb b/apps/workbench/app/views/projects/_index_projects.html.erb
index 50d38fe..fa779d2 100644
--- a/apps/workbench/app/views/projects/_index_projects.html.erb
+++ b/apps/workbench/app/views/projects/_index_projects.html.erb
@@ -25,7 +25,7 @@
         <% end %>
       </div>
       <% if projectnode[:object].respond_to?(:description) and not projectnode[:object].description.blank? %>
-        <div class="col-md-8 small"><%= projectnode[:object].description %></div>
+        <div class="col-md-8 small"><%= render_textile_attribute projectnode[:object], "description", true %></div>
       <% end %>
     </div>
   <% end %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list