diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-02 00:11:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-02 00:11:09 +0300 |
commit | 11b7785066d3e81916cbf653f4eb6568148f7e01 (patch) | |
tree | d4e66091e1cbef57db10d2c9c16cd98106e9a633 /app/helpers | |
parent | 69f0d90aad454a2b8f3c4e2f2ca31886a14a8642 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/ci/pipeline_editor_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/notifications_helper.rb | 46 |
2 files changed, 1 insertions, 48 deletions
diff --git a/app/helpers/ci/pipeline_editor_helper.rb b/app/helpers/ci/pipeline_editor_helper.rb index 3f48b2687b9..a71b0f4a83a 100644 --- a/app/helpers/ci/pipeline_editor_helper.rb +++ b/app/helpers/ci/pipeline_editor_helper.rb @@ -5,8 +5,7 @@ module Ci include ChecksCollaboration def can_view_pipeline_editor?(project) - can_collaborate_with_project?(project) && - Gitlab::Ci::Features.ci_pipeline_editor_page_enabled?(project) + can_collaborate_with_project?(project) end end end diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 729585be84a..9db28b54fe9 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -72,52 +72,6 @@ module NotificationsHelper end end - def notification_list_item(level, setting) - title = notification_title(level) - - data = { - notification_level: level, - notification_title: title - } - - content_tag(:li, role: "menuitem") do - link_to '#', class: "update-notification #{('is-active' if setting.level == level)}", data: data do - link_output = content_tag(:strong, title, class: 'dropdown-menu-inner-title') - link_output << content_tag(:span, notification_description(level), class: 'dropdown-menu-inner-content') - end - end - end - - # Identifier to trigger individually dropdowns and custom settings modals in the same view - def notifications_menu_identifier(type, notification_setting) - "#{type}-#{notification_setting.user_id}-#{notification_setting.source_id}-#{notification_setting.source_type}" - end - - # Create hidden field to send notification setting source to controller - def hidden_setting_source_input(notification_setting) - return unless notification_setting.source_type - - hidden_field_tag "#{notification_setting.source_type.downcase}_id", notification_setting.source_id - end - - def notification_event_name(event) - # All values from NotificationSetting.email_events - case event - when :success_pipeline - s_('NotificationEvent|Successful pipeline') - else - event_name = "NotificationEvent|#{event.to_s.humanize}" - s_(event_name) - end - end - - def notification_setting_icon(notification_setting = nil) - sprite_icon( - !notification_setting.present? || notification_setting.disabled? ? "notifications-off" : "notifications", - css_class: "icon notifications-icon js-notifications-icon" - ) - end - def show_unsubscribe_title?(noteable) can?(current_user, "read_#{noteable.to_ability_name}".to_sym, noteable) end |