summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-12-07 16:49:24 +0000
committerMike Greiling <mike@pixelcog.com>2018-12-07 16:49:24 +0000
commit420328d79e53c95d4aea3a098fe066aa43a25114 (patch)
tree58f01396aa1652c7e674421006ee9e346f3bf0e8 /app/controllers
parent621a2c2d6c91990154fb1f8c5885caa9c9f9a93a (diff)
parent75496059a1c36c2139bf29fa20fd4370c511fdd1 (diff)
downloadgitlab-ce-420328d79e53c95d4aea3a098fe066aa43a25114.tar.gz
Merge branch '51243-further-improvements-to-project-overview-ui' into 'master'
Resolve "Further improvements to Project overview UI" Closes #51243 See merge request gitlab-org/gitlab-ce!22196
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/notification_settings_controller.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/notification_settings_controller.rb b/app/controllers/notification_settings_controller.rb
index 84dce74ace8..384f308269a 100644
--- a/app/controllers/notification_settings_controller.rb
+++ b/app/controllers/notification_settings_controller.rb
@@ -16,7 +16,11 @@ class NotificationSettingsController < ApplicationController
@notification_setting = current_user.notification_settings.find(params[:id])
@saved = @notification_setting.update(notification_setting_params_for(@notification_setting.source))
- render_response
+ if params[:hide_label].present?
+ render_response("projects/buttons/_notifications")
+ else
+ render_response
+ end
end
private
@@ -37,9 +41,9 @@ class NotificationSettingsController < ApplicationController
can?(current_user, ability_name, resource)
end
- def render_response
+ def render_response(response_template = "shared/notifications/_button")
render json: {
- html: view_to_html_string("shared/notifications/_button", notification_setting: @notification_setting),
+ html: view_to_html_string(response_template, notification_setting: @notification_setting),
saved: @saved
}
end