diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-06-22 10:50:19 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-06-29 11:04:18 -0300 |
commit | 36d48120f66d52dcc8697893ca1ab85322ba7c8b (patch) | |
tree | 8c66cdb03c4429bf326711d8bd6956fbf45252b7 /app | |
parent | 2674b548601b279ada46d4b218a9def6fd5b9f6d (diff) | |
parent | 92e183542fe0e13930220ba3bbf67b9197cfc026 (diff) | |
download | gitlab-ce-36d48120f66d52dcc8697893ca1ab85322ba7c8b.tar.gz |
merge master into issue_3359_3
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dispatcher.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/blocks.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/groups.scss | 6 | ||||
-rw-r--r-- | app/controllers/groups_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/notification_settings_controller.rb | 14 | ||||
-rw-r--r-- | app/helpers/notifications_helper.rb | 2 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 9 |
7 files changed, 20 insertions, 22 deletions
diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index 5bb9647f6c2..9493a575801 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -85,6 +85,7 @@ class Dispatcher when 'groups:show' shortcut_handler = new ShortcutsNavigation() new NotificationsForm() + new NotificationsDropdown() when 'groups:group_members:index' new GroupMembers() new UsersSelect() diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 38023818709..41e77a4ac68 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -137,7 +137,7 @@ margin: 0; font-size: 24px; font-weight: normal; - margin-bottom: 5px; + margin-bottom: 10px; color: #4c4e54; font-size: 23px; line-height: 1.1; diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss index ac7721cbe15..101faf59174 100644 --- a/app/assets/stylesheets/pages/groups.scss +++ b/app/assets/stylesheets/pages/groups.scss @@ -48,11 +48,7 @@ .access-request-button { @include btn-gray; - position: absolute; - right: 16px; - bottom: 32px; - padding: 3px 10px; + margin-right: 10px; text-transform: none; - background-color: $background-color; } } diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index f65f9da3f9e..a04bf7df722 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -74,6 +74,10 @@ class GroupsController < Groups::ApplicationController def edit end + def projects + @projects = @group.projects.page(params[:page]) + end + def update if Groups::UpdateService.new(@group, current_user, group_params).execute redirect_to edit_group_path(@group), notice: "Group '#{@group.name}' was successfully updated." @@ -100,10 +104,6 @@ class GroupsController < Groups::ApplicationController @shared_projects = GroupProjectsFinder.new(group, only_shared: true).execute(current_user) end - def projects - @projects = @group.projects.page(params[:page]) - end - def authorize_create_group! unless can?(current_user, :create_group, nil) return render_404 diff --git a/app/controllers/notification_settings_controller.rb b/app/controllers/notification_settings_controller.rb index aacbefd4ab8..8ec4bb1233f 100644 --- a/app/controllers/notification_settings_controller.rb +++ b/app/controllers/notification_settings_controller.rb @@ -2,8 +2,6 @@ class NotificationSettingsController < ApplicationController before_action :authenticate_user! def create - resource = find_resource - return render_404 unless can_read?(resource) @notification_setting = current_user.notification_settings_for(resource) @@ -21,12 +19,12 @@ class NotificationSettingsController < ApplicationController private - def find_resource - resource = - if params[:project].present? - Project.find(params[:project][:id]) - elsif params[:namespace].present? - Group.find(params[:namespace][:id]) + def resource + @resource ||= + if params[:project_id].present? + Project.find(params[:project_id]) + elsif params[:namespace_id].present? + Group.find(params[:namespace_id]) end end diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 77783cd7640..7e8369d0a05 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -72,6 +72,6 @@ module NotificationsHelper # 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 + hidden_field_tag "#{notification_setting.source_type.downcase}_id", notification_setting.source_id end end diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 5792c5dbac5..a0a6762edcf 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -15,14 +15,17 @@ %span.visibility-icon.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) } = visibility_level_icon(@group.visibility_level, fw: false) - = render 'notifications/buttons/notifications', notification_setting: @notification_setting + %span.hidden-xs + = render 'shared/notifications/button', notification_setting: @notification_setting + + - if current_user + .pull-right + = render 'shared/members/access_request_buttons', source: @group - if @group.description.present? .cover-desc.description = markdown(@group.description, pipeline: :description) - - if current_user - = render 'shared/members/access_request_buttons', source: @group %div{ class: container_class } .top-area |