From 72b090b890fc438923b9bcb35d0461564f71cebc Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 21 Apr 2015 16:47:00 +0200 Subject: [PATCH] Move activity feed buttons out of event_filter into actual show views. --- app/views/dashboard/_activities.html.haml | 9 +++++++++ app/views/groups/show.html.haml | 10 ++++++++++ app/views/projects/show.html.haml | 1 + app/views/shared/_event_filter.html.haml | 14 -------------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index c1fc1602d0a..ffc893b16d3 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -1,4 +1,13 @@ = render "events/event_last_push", event: @last_push + +- if current_user + %ul.nav.nav-pills.event_filter.pull-right + %li.pull-right + = link_to dashboard_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do + %i.fa.fa-rss + News Feed + = render 'shared/event_filter' +%hr .content_list = spinner diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 75a7f071c13..c4a7800c463 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -17,7 +17,17 @@ %section.activities.col-md-8 - if current_user = render "events/event_last_push", event: @last_push + + - if current_user + %ul.nav.nav-pills.event_filter.pull-right + %li + = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'rss-btn' do + %i.fa.fa-rss + News Feed + = render 'shared/event_filter' + %hr + .content_list = spinner %aside.side.col-md-4 diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 4464c51744a..864bda359b6 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -40,6 +40,7 @@ %section.col-md-9 = render "events/event_last_push", event: @last_push = render 'shared/event_filter' + %hr .content_list = spinner %aside.col-md-3.project-side diff --git a/app/views/shared/_event_filter.html.haml b/app/views/shared/_event_filter.html.haml index d07a9e2b924..334db60690d 100644 --- a/app/views/shared/_event_filter.html.haml +++ b/app/views/shared/_event_filter.html.haml @@ -3,17 +3,3 @@ = event_filter_link EventFilter.merged, 'Merge events' = event_filter_link EventFilter.comments, 'Comments' = event_filter_link EventFilter.team, 'Team' - - - if current_user - - if current_controller?(:dashboard) - %li.pull-right - = link_to dashboard_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do - %i.fa.fa-rss - News Feed - - - if current_controller?(:groups) - %li.pull-right - = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'rss-btn' do - %i.fa.fa-rss - News Feed -%hr