Commit eb08d340f471b33408e0c2bccb929b7ba8418c62
1 parent
6b143566
Exists in
master
and in
9 other branches
changed to show abstract text on cms _view_items partial
Showing
1 changed file
with
19 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +module CmsHelper | ||
2 | + | ||
3 | + def link_to_article(article) | ||
4 | + article_name = article.title | ||
5 | + if article.folder? | ||
6 | + link_to article_name, {:action => 'view', :id => article.id}, :class => icon_for_article(article) | ||
7 | + else | ||
8 | + if article.image? | ||
9 | + image_tag(icon_for_article(article)) + link_to(article_name, article.url) | ||
10 | + else | ||
11 | + if "ProposalsDiscussionPlugin::Proposal".eql? article.type | ||
12 | + link_to article.abstract, article.url, :class => icon_for_article(article) | ||
13 | + else | ||
14 | + link_to article_name, article.url, :class => icon_for_article(article) | ||
15 | + end | ||
16 | + end | ||
17 | + end | ||
18 | + end | ||
19 | +end |