From c66bc99fb7d22d005cf0de687b9535f8bef52e23 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 10 Jan 2012 20:06:41 +0200 Subject: [PATCH] repo feed to partial --- app/views/repositories/_feed.html.haml | 15 +++++++++++++++ app/views/repositories/show.html.haml | 15 +-------------- 2 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 app/views/repositories/_feed.html.haml diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml new file mode 100644 index 00000000000..f163b477d2c --- /dev/null +++ b/app/views/repositories/_feed.html.haml @@ -0,0 +1,15 @@ +%a.project-update.titled{:href => project_commits_path(project, :ref => update.head.name)} + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 + %span.update-title + = dashboard_feed_title(update) + %span.update-author + %strong= update.author_name + authored + = time_ago_in_words(update.created_at) + ago + .title-block + %span.update-title + %span.commit.tag= update.head.name + %span.update-author + .left= truncate update.commit.id + diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index d9c67c3becb..5258ade6f54 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -4,18 +4,5 @@ #news-feed.news-feed .project-box.project-updates.ui-box.ui-box-small.ui-box-big - @activities.each do |update| - %a.project-update.titled{:href => project_commits_path(@project, :ref => update.head.name)} - = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 - %span.update-title - = dashboard_feed_title(update) - %span.update-author - %strong= update.author_name - authored - = time_ago_in_words(update.created_at) - ago - .title-block - %span.update-title - %span.commit.tag= update.head.name - %span.update-author - .left= truncate update.commit.id + = render "repositories/feed", :update => update, :project => @project -- GitLab