summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/avatars_helper.rb2
-rw-r--r--app/helpers/ci_status_helper.rb8
-rw-r--r--app/helpers/commits_helper.rb8
-rw-r--r--app/helpers/icons_helper.rb2
-rw-r--r--app/helpers/issuables_helper.rb13
-rw-r--r--app/helpers/labels_helper.rb2
-rw-r--r--app/helpers/milestones_helper.rb6
7 files changed, 21 insertions, 20 deletions
diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb
index d339c01d492..43d92bde064 100644
--- a/app/helpers/avatars_helper.rb
+++ b/app/helpers/avatars_helper.rb
@@ -78,7 +78,7 @@ module AvatarsHelper
user: commit_or_event.author,
user_name: commit_or_event.author_name,
user_email: commit_or_event.author_email,
- css_class: 'hidden-xs'
+ css_class: 'd-none d-sm-inline'
}))
end
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index f0afcac5986..5fce97164ae 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -92,7 +92,7 @@ module CiStatusHelper
"pipeline-status/#{pipeline_status.sha}-#{pipeline_status.status}"
end
- def render_project_pipeline_status(pipeline_status, tooltip_placement: 'auto left')
+ def render_project_pipeline_status(pipeline_status, tooltip_placement: 'left')
project = pipeline_status.project
path = pipelines_project_commit_path(project, pipeline_status.sha, ref: pipeline_status.ref)
@@ -103,7 +103,7 @@ module CiStatusHelper
tooltip_placement: tooltip_placement)
end
- def render_commit_status(commit, ref: nil, tooltip_placement: 'auto left')
+ def render_commit_status(commit, ref: nil, tooltip_placement: 'left')
project = commit.project
path = pipelines_project_commit_path(project, commit, ref: ref)
@@ -114,7 +114,7 @@ module CiStatusHelper
tooltip_placement: tooltip_placement)
end
- def render_pipeline_status(pipeline, tooltip_placement: 'auto left')
+ def render_pipeline_status(pipeline, tooltip_placement: 'left')
project = pipeline.project
path = project_pipeline_path(project, pipeline)
render_status_with_link('pipeline', pipeline.status, path, tooltip_placement: tooltip_placement)
@@ -125,7 +125,7 @@ module CiStatusHelper
Ci::Runner.shared.blank?
end
- def render_status_with_link(type, status, path = nil, tooltip_placement: 'auto left', cssclass: '', container: 'body')
+ def render_status_with_link(type, status, path = nil, tooltip_placement: 'left', cssclass: '', container: 'body')
klass = "ci-status-link ci-status-icon-#{status.dasherize} #{cssclass}"
title = "#{type.titleize}: #{ci_label_for_status(status)}"
data = { toggle: 'tooltip', placement: tooltip_placement, container: container }
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index f5a7871a6e0..e5c3be47801 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -27,7 +27,7 @@ module CommitsHelper
return unless @project && @ref
# Add the root project link and the arrow icon
- crumbs = content_tag(:li) do
+ crumbs = content_tag(:li, class: 'breadcrumb-item') do
link_to(
@project.path,
project_commits_path(@project, @ref)
@@ -38,7 +38,7 @@ module CommitsHelper
parts = @path.split('/')
parts.each_with_index do |part, i|
- crumbs << content_tag(:li) do
+ crumbs << content_tag(:li, class: 'breadcrumb-item') do
# The text is just the individual part, but the link needs all the parts before it
link_to(
part,
@@ -62,7 +62,7 @@ module CommitsHelper
# Returns a link formatted as a commit branch link
def commit_branch_link(url, text)
- link_to(url, class: 'label label-gray ref-name branch-link') do
+ link_to(url, class: 'badge badge-gray ref-name branch-link') do
sprite_icon('branch', size: 12, css_class: 'fork-svg') + "#{text}"
end
end
@@ -76,7 +76,7 @@ module CommitsHelper
# Returns a link formatted as a commit tag link
def commit_tag_link(url, text)
- link_to(url, class: 'label label-gray ref-name') do
+ link_to(url, class: 'badge badge-gray ref-name') do
sprite_icon('tag', size: 12, css_class: 'append-right-5 vertical-align-middle') + "#{text}"
end
end
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 2f304b040c7..58372edff3c 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -60,7 +60,7 @@ module IconsHelper
def spinner(text = nil, visible = false)
css_class = 'loading'
- css_class << ' hide' unless visible
+ css_class << ' hidden' unless visible
content_tag :div, class: css_class do
icon('spinner spin') + text
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index f39a62bccc8..8572c2b7276 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -157,15 +157,15 @@ module IssuablesHelper
output = ""
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")
+ author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "d-none d-sm-inline-block", tooltip: true)
+ author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "d-block d-sm-none")
end
output << "&ensp;".html_safe
output << content_tag(:span, (issuable_first_contribution_icon if issuable.first_contribution?), class: 'has-tooltip', title: _('1st contribution!'))
- output << content_tag(:span, (issuable.task_status if issuable.tasks?), id: "task_status", class: "hidden-xs hidden-sm")
- output << content_tag(:span, (issuable.task_status_short if issuable.tasks?), id: "task_status_short", class: "hidden-md hidden-lg")
+ output << content_tag(:span, (issuable.task_status if issuable.tasks?), id: "task_status", class: "d-none d-sm-none d-md-inline-block")
+ output << content_tag(:span, (issuable.task_status_short if issuable.tasks?), id: "task_status_short", class: "d-md-none d-lg-none d-xl-inline-block")
output.html_safe
end
@@ -199,7 +199,7 @@ module IssuablesHelper
if display_count
count = issuables_count_for_state(issuable_type, state)
- html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge')
+ html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill')
end
html.html_safe
@@ -359,7 +359,8 @@ module IssuablesHelper
url: project_todos_path(@project),
delete_path: (dashboard_todo_path(todo) if todo),
placement: (is_collapsed ? 'left' : nil),
- container: (is_collapsed ? 'body' : nil)
+ container: (is_collapsed ? 'body' : nil),
+ boundary: 'viewport'
}
end
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb
index c4a6a1e4bb3..e1b0e7a4a3e 100644
--- a/app/helpers/labels_helper.rb
+++ b/app/helpers/labels_helper.rb
@@ -81,7 +81,7 @@ module LabelsHelper
# Intentionally not using content_tag here so that this method can be called
# by LabelReferenceFilter
- span = %(<span class="label color-label #{"has-tooltip" if tooltip}" ) +
+ span = %(<span class="badge color-label #{"has-tooltip" if tooltip}" ) +
%(style="background-color: #{label.color}; color: #{text_color}" ) +
%(title="#{escape_once(label.description)}" data-container="body">) +
%(#{escape_once(label.name)}#{label_suffix}</span>)
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb
index e8caab3e50c..15a15405f1d 100644
--- a/app/helpers/milestones_helper.rb
+++ b/app/helpers/milestones_helper.rb
@@ -89,7 +89,7 @@ module MilestonesHelper
def milestone_progress_bar(milestone)
options = {
- class: 'progress-bar progress-bar-success',
+ class: 'progress-bar bg-success',
style: "width: #{milestone.percent_complete(current_user)}%;"
}
@@ -112,8 +112,6 @@ module MilestonesHelper
def milestone_tooltip_title(milestone)
if milestone
"#{milestone.title}<br />#{milestone_tooltip_due_date(milestone)}"
- else
- _('Milestone')
end
end
@@ -173,6 +171,8 @@ module MilestonesHelper
def milestone_tooltip_due_date(milestone)
if milestone.due_date
"#{milestone.due_date.to_s(:medium)} (#{remaining_days_in_words(milestone)})"
+ else
+ _('Milestone')
end
end