From eb08d340f471b33408e0c2bccb929b7ba8418c62 Mon Sep 17 00:00:00 2001 From: Ábner Silva de Oliveira Date: Wed, 1 Jul 2015 11:15:51 -0300 Subject: [PATCH] changed to show abstract text on cms _view_items partial --- lib/cms_helper.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+), 0 deletions(-) create mode 100644 lib/cms_helper.rb diff --git a/lib/cms_helper.rb b/lib/cms_helper.rb new file mode 100644 index 0000000..a3f5e25 --- /dev/null +++ b/lib/cms_helper.rb @@ -0,0 +1,19 @@ +module CmsHelper + + def link_to_article(article) + article_name = article.title + if article.folder? + link_to article_name, {:action => 'view', :id => article.id}, :class => icon_for_article(article) + else + if article.image? + image_tag(icon_for_article(article)) + link_to(article_name, article.url) + else + if "ProposalsDiscussionPlugin::Proposal".eql? article.type + link_to article.abstract, article.url, :class => icon_for_article(article) + else + link_to article_name, article.url, :class => icon_for_article(article) + end + end + end + end +end -- libgit2 0.21.2