diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-06 12:19:03 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-06 12:19:03 +0100 |
commit | 80a013ef4f1c6dc982023dc39c27063ab1d3e121 (patch) | |
tree | f23cd0ea6e45bdfb7db2711e883119fa30a48ac0 | |
parent | 2aa8a75f69e338a94cca52a43058d156c0e3a1a1 (diff) | |
download | gitlab-ce-breadcrumbs-improvements.tar.gz |
removed show_new_nav? referencesbreadcrumbs-improvements
-rw-r--r-- | app/helpers/groups_helper.rb | 28 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 15 | ||||
-rw-r--r-- | app/helpers/page_layout_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 10 | ||||
-rw-r--r-- | app/views/projects/wikis/show.html.haml | 8 | ||||
-rw-r--r-- | app/views/shared/snippets/_header.html.haml | 8 |
6 files changed, 14 insertions, 61 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 9e7c25492b7..eab1feb8a1f 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -16,35 +16,19 @@ module GroupsHelper full_title = '' group.ancestors.reverse.each_with_index do |parent, index| - if show_new_nav? && index > 0 + if index > 0 add_to_breadcrumb_dropdown(group_title_link(parent, hidable: false, show_avatar: true), location: :before) else - full_title += if show_new_nav? - breadcrumb_list_item group_title_link(parent, hidable: false) - else - "#{group_title_link(parent, hidable: true)} <span class='hidable'> / </span>".html_safe - end + full_title += breadcrumb_list_item group_title_link(parent, hidable: false) end end - if show_new_nav? - full_title += render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :before, title: _("Show parent subgroups") - end + full_title += render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :before, title: _("Show parent subgroups") - full_title += if show_new_nav? - breadcrumb_list_item group_title_link(group) - else - group_title_link(group) - end + full_title += breadcrumb_list_item group_title_link(group) full_title += ' · '.html_safe + link_to(simple_sanitize(name), url, class: 'group-path breadcrumb-item-text js-breadcrumb-item-text') if name - if show_new_nav? - full_title.html_safe - else - content_tag :span, class: 'group-title' do - full_title.html_safe - end - end + full_title.html_safe end def projects_lfs_status(group) @@ -86,7 +70,7 @@ module GroupsHelper def group_title_link(group, hidable: false, show_avatar: false) link_to(group_path(group), class: "group-path breadcrumb-item-text js-breadcrumb-item-text #{'hidable' if hidable}") do output = - if (group.try(:avatar_url) || show_avatar)) && !Rails.env.test? + if (group.try(:avatar_url) || show_avatar) && !Rails.env.test? image_tag(group_icon(group), class: "avatar-tile", width: 15, height: 15) else "" diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index e39d62ecf63..2cf2e7dddb0 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -127,20 +127,7 @@ module IssuablesHelper def issuable_meta(issuable, project, text) output = "" - - unless show_new_nav? - output << content_tag(:strong, class: "identifier") do - concat("#{text} ") - concat(to_url_reference(issuable)) - end - end - - opened_text = if show_new_nav? - "Opened" - else - " opened" - end - output << "#{opened_text} #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe + output << "Opened #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe output << content_tag(:strong) do author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "hidden-xs", tooltip: true) author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "hidden-sm hidden-md hidden-lg") diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb index 38a66ae1de9..5946c475835 100644 --- a/app/helpers/page_layout_helper.rb +++ b/app/helpers/page_layout_helper.rb @@ -82,11 +82,7 @@ module PageLayoutHelper else return @header_title unless @header_title_url - if show_new_nav? - breadcrumb_list_item(link_to(@header_title, @header_title_url)) - else - link_to(@header_title, @header_title_url) - end + breadcrumb_list_item(link_to(@header_title, @header_title_url)) end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index b07cb7a775a..86665ea2aec 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -60,7 +60,7 @@ module ProjectsHelper link_to(simple_sanitize(owner.name), user_path(owner)) end - project_link = link_to project_path(project), { class: ("project-item-select-holder" unless show_new_nav?) } do + project_link = link_to project_path(project) do output = if project.avatar_url && !Rails.env.test? project_icon(project, alt: project.name, class: 'avatar-tile', width: 15, height: 15) @@ -72,12 +72,10 @@ module ProjectsHelper output.html_safe end - if show_new_nav? - namespace_link = breadcrumb_list_item(namespace_link) unless project.group - project_link = breadcrumb_list_item project_link - end + namespace_link = breadcrumb_list_item(namespace_link) unless project.group + project_link = breadcrumb_list_item project_link - "#{namespace_link} #{('/' unless show_new_nav?)} #{project_link}".html_safe + "#{namespace_link} #{project_link}".html_safe end def remove_project_message(project) diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml index 5f93168bdde..b066a812ec8 100644 --- a/app/views/projects/wikis/show.html.haml +++ b/app/views/projects/wikis/show.html.haml @@ -2,18 +2,12 @@ - breadcrumb_title @page.title.capitalize - wiki_breadcrumb_dropdown_links(@page.slug) - page_title @page.title.capitalize, "Wiki" - -- if show_new_nav? - - add_to_breadcrumbs "Wiki", get_project_wiki_path(@project) +- add_to_breadcrumbs "Wiki", get_project_wiki_path(@project) .wiki-page-header.has-sidebar-toggle %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } = icon('angle-double-left') - - unless show_new_nav? - .wiki-breadcrumb - %span= breadcrumb(@page.slug) - .nav-text %h2.wiki-page-title= @page.title.capitalize %span.wiki-last-edit-by diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index 03bc0b25055..119d189f21d 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -3,14 +3,8 @@ %span.sr-only = visibility_level_label(@snippet.visibility_level) = visibility_level_icon(@snippet.visibility_level, fw: false) - - unless show_new_nav? - %strong.item-title - Snippet #{@snippet.to_reference} %span.creator - - if show_new_nav? - Authored - - else - authored + Authored = time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago') by #{link_to_member(@project, @snippet.author, size: 24, author_class: "author item-title", avatar_class: "hidden-xs")} |