Commit 473efc82b68dcaac61be55466e423fdbbabde710
1 parent
8812d9de
Exists in
master
and in
4 other branches
Group and team rss is valid now
Showing
10 changed files
with
51 additions
and
29 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/mixins.scss
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | color: $style_color; | 71 | color: $style_color; |
72 | text-shadow: 0 1px 1px #FFF; | 72 | text-shadow: 0 1px 1px #FFF; |
73 | font-size: 18px; | 73 | font-size: 18px; |
74 | - line-height: 42px; | 74 | + line-height: 40px; |
75 | font-weight: normal; | 75 | font-weight: normal; |
76 | letter-spacing: -1px; | 76 | letter-spacing: -1px; |
77 | } | 77 | } |
app/views/commits/_head.html.haml
@@ -23,6 +23,5 @@ | @@ -23,6 +23,5 @@ | ||
23 | 23 | ||
24 | - if current_controller?(:commits) && current_user.private_token | 24 | - if current_controller?(:commits) && current_user.private_token |
25 | %li.pull-right | 25 | %li.pull-right |
26 | - %span.rss-icon | ||
27 | - = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do | ||
28 | - = image_tag "rss_ui.png", title: "feed" | 26 | + = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do |
27 | + %i.icon-rss |
app/views/dashboard/show.atom.builder
1 | xml.instruct! | 1 | xml.instruct! |
2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do | 2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do |
3 | xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}" | 3 | xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}" |
4 | - xml.link :href => projects_url(:atom), :rel => "self", :type => "application/atom+xml" | ||
5 | - xml.link :href => projects_url, :rel => "alternate", :type => "text/html" | 4 | + xml.link :href => dashboard_url(:atom), :rel => "self", :type => "application/atom+xml" |
5 | + xml.link :href => dashboard_url, :rel => "alternate", :type => "text/html" | ||
6 | xml.id projects_url | 6 | xml.id projects_url |
7 | xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any? | 7 | xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any? |
8 | 8 |
app/views/groups/show.atom.builder
1 | xml.instruct! | 1 | xml.instruct! |
2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do | 2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do |
3 | - xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}" | ||
4 | - xml.link :href => projects_url(:atom), :rel => "self", :type => "application/atom+xml" | ||
5 | - xml.link :href => projects_url, :rel => "alternate", :type => "text/html" | 3 | + xml.title "Group feed - #{@group.name}" |
4 | + xml.link :href => group_path(@group, :atom), :rel => "self", :type => "application/atom+xml" | ||
5 | + xml.link :href => group_path(@group), :rel => "alternate", :type => "text/html" | ||
6 | xml.id projects_url | 6 | xml.id projects_url |
7 | xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any? | 7 | xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any? |
8 | 8 |
app/views/groups/show.html.haml
@@ -16,11 +16,11 @@ | @@ -16,11 +16,11 @@ | ||
16 | .description.well.light | 16 | .description.well.light |
17 | = @group.description | 17 | = @group.description |
18 | = render "projects", projects: @projects | 18 | = render "projects", projects: @projects |
19 | - %div | ||
20 | - %span.rss-icon | ||
21 | - = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do | ||
22 | - = image_tag "rss_ui.png", title: "feed" | ||
23 | - %strong News Feed | 19 | + .prepend-top-20 |
20 | + = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed" do | ||
21 | + %strong | ||
22 | + %i.icon-rss | ||
23 | + News Feed | ||
24 | 24 | ||
25 | %hr | 25 | %hr |
26 | .gitlab-promo | 26 | .gitlab-promo |
app/views/issues/_head.html.haml
@@ -6,6 +6,5 @@ | @@ -6,6 +6,5 @@ | ||
6 | = nav_link(controller: :labels) do | 6 | = nav_link(controller: :labels) do |
7 | = link_to 'Labels', project_labels_path(@project), class: "tab" | 7 | = link_to 'Labels', project_labels_path(@project), class: "tab" |
8 | %li.pull-right | 8 | %li.pull-right |
9 | - %span.rss-icon | ||
10 | - = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do | ||
11 | - = image_tag "rss_ui.png", title: "feed" | 9 | + = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do |
10 | + %i.icon-rss |
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +xml.instruct! | ||
2 | +xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do | ||
3 | + xml.title "Team feed - #{@team.name}" | ||
4 | + xml.link :href => team_url(@team, :atom), :rel => "self", :type => "application/atom+xml" | ||
5 | + xml.link :href => team_url(@team), :rel => "alternate", :type => "text/html" | ||
6 | + xml.id projects_url | ||
7 | + xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any? | ||
8 | + | ||
9 | + @events.each do |event| | ||
10 | + if event.proper? | ||
11 | + event = EventDecorator.decorate(event) | ||
12 | + xml.entry do | ||
13 | + event_link = event.feed_url | ||
14 | + event_title = event.feed_title | ||
15 | + | ||
16 | + xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}" | ||
17 | + xml.link :href => event_link | ||
18 | + xml.title truncate(event_title, :length => 80) | ||
19 | + xml.updated event.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") | ||
20 | + xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(event.author_email) | ||
21 | + xml.author do |author| | ||
22 | + xml.name event.author_name | ||
23 | + xml.email event.author_email | ||
24 | + end | ||
25 | + xml.summary event_title | ||
26 | + end | ||
27 | + end | ||
28 | + end | ||
29 | +end |
app/views/teams/show.html.haml
@@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
15 | .description.well.light | 15 | .description.well.light |
16 | = @team.description | 16 | = @team.description |
17 | = render "projects", projects: @projects | 17 | = render "projects", projects: @projects |
18 | - %div | ||
19 | - %span.rss-icon | ||
20 | - = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do | ||
21 | - = image_tag "rss_ui.png", title: "feed" | ||
22 | - %strong News Feed | 18 | + .prepend-top-20 |
19 | + = link_to team_path(@team, { format: :atom, private_token: current_user.private_token }), title: "Feed" do | ||
20 | + %strong | ||
21 | + %i.icon-rss | ||
22 | + News Feed | ||
23 | 23 | ||
24 | %hr | 24 | %hr |
25 | .gitlab-promo | 25 | .gitlab-promo |
config/routes.rb
@@ -135,7 +135,7 @@ Gitlab::Application.routes.draw do | @@ -135,7 +135,7 @@ Gitlab::Application.routes.draw do | ||
135 | # | 135 | # |
136 | # Groups Area | 136 | # Groups Area |
137 | # | 137 | # |
138 | - resources :groups, constraints: { id: /[^\/]+/ } do | 138 | + resources :groups, constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} do |
139 | member do | 139 | member do |
140 | get :issues | 140 | get :issues |
141 | get :merge_requests | 141 | get :merge_requests |
@@ -148,7 +148,7 @@ Gitlab::Application.routes.draw do | @@ -148,7 +148,7 @@ Gitlab::Application.routes.draw do | ||
148 | # | 148 | # |
149 | # Teams Area | 149 | # Teams Area |
150 | # | 150 | # |
151 | - resources :teams, constraints: { id: /[^\/]+/ } do | 151 | + resources :teams, constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} do |
152 | member do | 152 | member do |
153 | get :issues | 153 | get :issues |
154 | get :merge_requests | 154 | get :merge_requests |
features/teams/team.feature
@@ -4,11 +4,6 @@ Feature: UserTeams | @@ -4,11 +4,6 @@ Feature: UserTeams | ||
4 | And I own project "Shop" | 4 | And I own project "Shop" |
5 | And project "Shop" has push event | 5 | And project "Shop" has push event |
6 | 6 | ||
7 | - Scenario: No teams, no dashboard info block | ||
8 | - When I do not have teams with me | ||
9 | - And I visit dashboard page | ||
10 | - Then I should see dashboard page without teams info block | ||
11 | - | ||
12 | Scenario: I should see teams info block | 7 | Scenario: I should see teams info block |
13 | When I have teams with my membership | 8 | When I have teams with my membership |
14 | And I visit dashboard page | 9 | And I visit dashboard page |