removed show_new_nav? references

This commit is contained in:
Phil Hughes 2017-09-06 12:19:03 +01:00
parent 2aa8a75f69
commit 80a013ef4f
6 changed files with 14 additions and 61 deletions

View file

@ -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 += ' &middot; '.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
""

View file

@ -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")

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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")}