Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-20 19:28:14 +0300
committerDouwe Maan <douwe@gitlab.com>2015-09-20 20:09:43 +0300
commit47e926bec0a9da28daaca7dc92415b25f2301daf (patch)
tree1af109baecd783f4db5d8e618275791ccfd2da79 /app/views
parent23f9a64566ec0da50c9ee842ba749a8f33eacb8e (diff)
Minor code cleanup
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/buttons/_notifications.html.haml27
1 files changed, 14 insertions, 13 deletions
diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml
index 9bb46157229..57f764178d5 100644
--- a/app/views/projects/buttons/_notifications.html.haml
+++ b/app/views/projects/buttons/_notifications.html.haml
@@ -1,13 +1,14 @@
-- if current_user and !@membership.nil?
- = form_tag profile_notifications_path, method: :put, remote: true, class: 'inline-form', id: 'notification-form' do
- = hidden_field_tag :notification_type, 'project'
- = hidden_field_tag :notification_id, @membership.id
- = hidden_field_tag :notification_level
- %span.dropdown
- %a.dropdown-toggle.btn.btn-new#notifications-button{href: '#', "data-toggle" => "dropdown"}
- = icon('bell')
- = notification_label(@membership)
- = icon('angle-down')
- %ul.dropdown-menu.dropdown-menu-right.project-home-dropdown
- - Notification.project_notification_levels.each do |level|
- = notification_list_item(level, @membership) \ No newline at end of file
+- return unless @membership
+
+= form_tag profile_notifications_path, method: :put, remote: true, class: 'inline-form', id: 'notification-form' do
+ = hidden_field_tag :notification_type, 'project'
+ = hidden_field_tag :notification_id, @membership.id
+ = hidden_field_tag :notification_level
+ %span.dropdown
+ %a.dropdown-toggle.btn.btn-new#notifications-button{href: '#', "data-toggle" => "dropdown"}
+ = icon('bell')
+ = notification_label(@membership)
+ = icon('angle-down')
+ %ul.dropdown-menu.dropdown-menu-right.project-home-dropdown
+ - Notification.project_notification_levels.each do |level|
+ = notification_list_item(level, @membership)