summaryrefslogtreecommitdiffstats
path: root/app/views/my/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/my/blocks')
-rw-r--r--app/views/my/blocks/_calendar.rhtml2
-rw-r--r--app/views/my/blocks/_documents.rhtml14
-rw-r--r--app/views/my/blocks/_latest_news.rhtml16
3 files changed, 9 insertions, 23 deletions
diff --git a/app/views/my/blocks/_calendar.rhtml b/app/views/my/blocks/_calendar.rhtml
index 2d7930f52..fd221bcb4 100644
--- a/app/views/my/blocks/_calendar.rhtml
+++ b/app/views/my/blocks/_calendar.rhtml
@@ -34,7 +34,7 @@ while day <= @date_to
elsif day == i.due_date
image_tag('arrow_to')
end %>
- <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
+ <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
<% end %>
</td>
<%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
diff --git a/app/views/my/blocks/_documents.rhtml b/app/views/my/blocks/_documents.rhtml
index 5fa8c7980..8e7f6bc50 100644
--- a/app/views/my/blocks/_documents.rhtml
+++ b/app/views/my/blocks/_documents.rhtml
@@ -1,15 +1,7 @@
<h3><%=l(:label_document_plural)%></h3>
-<ul>
-<% for document in Document.find :all,
+<%= render(:partial => 'documents/document',
+ :collection => Document.find(:all,
:limit => 10,
:conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
- :include => [:project] %>
- <li>
- <b><%= link_to document.title, :controller => 'documents', :action => 'show', :id => document %></b>
- <br />
- <%= truncate document.description, 150 %><br />
- <em><%= format_time(document.created_on) %></em><br />&nbsp;
- </li>
-<% end unless @user.projects.empty? %>
-</ul> \ No newline at end of file
+ :include => [:project])) unless @user.projects.empty? %> \ No newline at end of file
diff --git a/app/views/my/blocks/_latest_news.rhtml b/app/views/my/blocks/_latest_news.rhtml
index 85430ef54..625603ac0 100644
--- a/app/views/my/blocks/_latest_news.rhtml
+++ b/app/views/my/blocks/_latest_news.rhtml
@@ -1,13 +1,7 @@
<h3><%=l(:label_news_latest)%></h3>
-<ul>
-<% for news in News.find :all,
- :limit => 10,
- :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
- :include => [:project, :author] %>
- <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br />
- <% unless news.summary.empty? %><%= news.summary %><br /><% end %>
- <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />&nbsp;
- </li>
-<% end unless @user.projects.empty? %>
-</ul> \ No newline at end of file
+<%= render (:partial => 'news/news',
+ :collection => News.find(:all,
+ :limit => 10,
+ :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
+ :include => [:project, :author])) unless @user.projects.empty? %> \ No newline at end of file