diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 2 | ||||
-rw-r--r-- | app/finders/group_projects_finder.rb | 5 | ||||
-rw-r--r-- | app/views/admin/groups/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/groups/index.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 5 |
5 files changed, 13 insertions, 4 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 668396a0f20..8e2a981be7c 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -59,6 +59,6 @@ class Admin::GroupsController < Admin::ApplicationController end def group_params - params.require(:group).permit(:name, :description, :path, :avatar) + params.require(:group).permit(:name, :description, :path, :avatar, :visibility_level) end end diff --git a/app/finders/group_projects_finder.rb b/app/finders/group_projects_finder.rb index 2470af7c685..3b9a421b118 100644 --- a/app/finders/group_projects_finder.rb +++ b/app/finders/group_projects_finder.rb @@ -1,19 +1,18 @@ class GroupProjectsFinder < UnionFinder def initialize(group, options = {}) - @group = group + @group = group @options = options end def execute(current_user = nil) segments = group_projects(current_user) - find_union(segments, Project) end private def group_projects(current_user) - only_owned = @options.fetch(:only_owned, false) + only_owned = @options.fetch(:only_owned, false) only_shared = @options.fetch(:only_shared, false) projects = [] diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 198026a1f75..7f2b1cd235d 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -10,6 +10,8 @@ .col-sm-10 = render 'shared/choose_group_avatar_button', f: f + = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group + - if @group.new_record? .form-group .col-sm-offset-2.col-sm-10 diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 118d3cfea07..6bdc885a312 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -46,6 +46,9 @@ %h4 = link_to [:admin, group] do + %span{ class: visibility_level_color(group.visibility_level) } + = visibility_level_icon(group.visibility_level) + %i.fa.fa-folder = group.name diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 264fa1bf0cd..f309e80a39a 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -28,6 +28,11 @@ = @group.description %li + %span.light Visibility level: + %strong + = visibility_level_label(@group.visibility_level) + + %li %span.light Created on: %strong = @group.created_at.to_s(:medium) |