diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 17:31:40 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-23 18:11:38 +0300 |
commit | 8917ae39e3f2a75833908413bac209373cb013eb (patch) | |
tree | 016bad6191ce801c3e7cb3092bf604b3fdc94ca7 | |
parent | 27289599e2e53bb27b897069c18b169fd3cb4cea (diff) |
Add atom link tag to every page that has one.
-rw-r--r-- | app/views/dashboard/issues.html.haml | 4 | ||||
-rw-r--r-- | app/views/dashboard/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/issues.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/layouts/_head.html.haml | 13 | ||||
-rw-r--r-- | app/views/projects/commits/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/issues/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/tree/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 3 |
9 files changed, 34 insertions, 10 deletions
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index db19a46cb26..79e518f5f38 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, issues_dashboard_url(format: :atom, private_token: current_user.private_token), title: "#{current_user.name} issues") + %h3.page-title Issues diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index fa8946011b7..2754a4894da 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, dashboard_url(format: :atom, private_token: current_user.private_token), title: "All activity") + - if @projects.any? .dashboard.row %section.activities.col-md-8 diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 6c0d89c4e7c..bfdb862a2e9 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, issues_group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} issues") + %h3.page-title Issues diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 8df9366ecbe..75a7f071c13 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} activity") + .dashboard .header-with-avatar.clearfix = image_tag group_icon(@group), class: "avatar group-avatar s90" diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 5a6ae09a506..0ff1665455e 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -5,6 +5,7 @@ %title = "#{title} | " if defined?(title) GitLab + = favicon_link_tag 'favicon.ico' = stylesheet_link_tag "application", :media => "all" = stylesheet_link_tag "print", :media => "print" @@ -14,16 +15,8 @@ %meta{name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1'} %meta{name: 'theme-color', content: '#474D57'} + = yield(:meta_tags) + = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id') = render 'layouts/bootlint' if Rails.env.development? - - -# Atom feed - - if current_user - - if controller_name == 'projects' && action_name == 'index' - = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" - - if @project && !@project.new_record? - - if current_controller?(:tree, :commits) - = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") - - if current_controller?(:issues) - = auto_discovery_link_tag(:atom, namespace_project_issues_url(@project.namespace, @project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 7ea855e1a4e..f7b5a6d1918 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") + = render "head" .tree-ref-holder diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index d3c7ae24a75..c2522816f3b 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, namespace_project_issues_url(@project.namespace, @project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") + .append-bottom-10 .pull-right .pull-left diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index feca1453697..8f789efa122 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -1,3 +1,7 @@ += content_for :meta_tags do + - if current_user + = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") + .tree-ref-holder = render 'shared/ref_switcher', destination: 'tree', path: @path diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 9dd8cb0738c..a2286773629 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,3 +1,6 @@ += content_for :meta_tags do + = auto_discovery_link_tag(:atom, user_url(@user, format: :atom), title: "Activity feed for #{@user.name}") + .row = link_to '#aside', class: 'show-aside' do %i.fa.fa-angle-left |