Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
52e62f71
Commit
52e62f71
authored
May 31, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce CE/EE diff in app/views/admin/groups/
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
6c5c3833
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
app/models/group.rb
app/models/group.rb
+7
-2
app/views/admin/groups/_form.html.haml
app/views/admin/groups/_form.html.haml
+7
-0
app/views/admin/groups/_group.html.haml
app/views/admin/groups/_group.html.haml
+3
-0
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+7
-1
No files found.
app/models/group.rb
View file @
52e62f71
...
@@ -141,13 +141,14 @@ class Group < Namespace
...
@@ -141,13 +141,14 @@ class Group < Namespace
)
)
end
end
def
add_user
(
user
,
access_level
,
current_user:
nil
,
expires_at:
nil
)
def
add_user
(
user
,
access_level
,
current_user:
nil
,
expires_at:
nil
,
ldap:
false
)
GroupMember
.
add_user
(
GroupMember
.
add_user
(
self
,
self
,
user
,
user
,
access_level
,
access_level
,
current_user:
current_user
,
current_user:
current_user
,
expires_at:
expires_at
expires_at:
expires_at
,
ldap:
ldap
)
)
end
end
...
@@ -195,6 +196,10 @@ class Group < Namespace
...
@@ -195,6 +196,10 @@ class Group < Namespace
owners
.
include?
(
user
)
&&
owners
.
size
==
1
owners
.
include?
(
user
)
&&
owners
.
size
==
1
end
end
def
ldap_synced?
false
end
def
post_create_hook
def
post_create_hook
Gitlab
::
AppLogger
.
info
(
"Group
\"
#{
name
}
\"
was created"
)
Gitlab
::
AppLogger
.
info
(
"Group
\"
#{
name
}
\"
was created"
)
...
...
app/views/admin/groups/_form.html.haml
View file @
52e62f71
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
=
form_errors
(
@group
)
=
form_errors
(
@group
)
=
render
'shared/group_form'
,
f:
f
=
render
'shared/group_form'
,
f:
f
=
render_if_exists
'shared/repository_size_limit_setting'
,
form:
f
,
type: :group
=
render_if_exists
'admin/namespace_plan'
,
f:
f
.form-group.row.group-description-holder
.form-group.row.group-description-holder
=
f
.
label
:avatar
,
"Group avatar"
,
class:
'col-form-label col-sm-2'
=
f
.
label
:avatar
,
"Group avatar"
,
class:
'col-form-label col-sm-2'
.col-sm-10
.col-sm-10
...
@@ -15,6 +18,8 @@
...
@@ -15,6 +18,8 @@
=
render
'groups/group_admin_settings'
,
f:
f
=
render
'groups/group_admin_settings'
,
f:
f
=
render_if_exists
'namespaces/shared_runners_minutes_settings'
,
group:
@group
,
form:
f
-
if
@group
.
new_record?
-
if
@group
.
new_record?
.form-group.row
.form-group.row
.offset-sm-2.col-sm-10
.offset-sm-2.col-sm-10
...
@@ -28,3 +33,5 @@
...
@@ -28,3 +33,5 @@
.form-actions
.form-actions
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
=
link_to
'Cancel'
,
admin_group_path
(
@group
),
class:
"btn btn-cancel"
=
link_to
'Cancel'
,
admin_group_path
(
@group
),
class:
"btn btn-cancel"
=
render_if_exists
'ldap_group_links/ldap_syncrhonizations'
,
group:
@group
app/views/admin/groups/_group.html.haml
View file @
52e62f71
-
group
=
local_assigns
.
fetch
(
:group
)
-
css_class
=
'no-description'
if
group
.
description
.
blank?
-
css_class
=
'no-description'
if
group
.
description
.
blank?
%li
.group-row
{
class:
css_class
}
%li
.group-row
{
class:
css_class
}
...
@@ -8,6 +9,8 @@
...
@@ -8,6 +9,8 @@
%span
.badge.badge-pill
%span
.badge.badge-pill
=
storage_counter
(
group
.
storage_size
)
=
storage_counter
(
group
.
storage_size
)
=
render_if_exists
'admin/namespace_plan_badge'
,
namespace:
group
%span
%span
=
icon
(
'bookmark'
)
=
icon
(
'bookmark'
)
=
number_with_delimiter
(
group
.
projects
.
count
)
=
number_with_delimiter
(
group
.
projects
.
count
)
...
...
app/views/admin/groups/show.html.haml
View file @
52e62f71
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
%strong
%strong
=
@group
.
created_at
.
to_s
(
:medium
)
=
@group
.
created_at
.
to_s
(
:medium
)
=
render_if_exists
'admin/namespace_plan_info'
,
namespace:
@group
%li
%li
%span
.light
Storage:
%span
.light
Storage:
%strong
=
storage_counter
(
@group
.
storage_size
)
%strong
=
storage_counter
(
@group
.
storage_size
)
...
@@ -58,6 +60,10 @@
...
@@ -58,6 +60,10 @@
=
group_lfs_status
(
@group
)
=
group_lfs_status
(
@group
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'workflow/lfs/manage_large_binaries_with_git_lfs'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'workflow/lfs/manage_large_binaries_with_git_lfs'
)
=
render_if_exists
'namespaces/shared_runner_status'
,
namespace:
@group
=
render_if_exists
'ldap_group_links/ldap_group_links_show'
,
group:
@group
.card
.card
.card-header
.card-header
%h3
.card-title
%h3
.card-title
...
@@ -104,7 +110,7 @@
...
@@ -104,7 +110,7 @@
=
form_tag
admin_group_members_update_path
(
@group
),
id:
"new_project_member"
,
class:
"bulk_import"
,
method: :put
do
=
form_tag
admin_group_members_update_path
(
@group
),
id:
"new_project_member"
,
class:
"bulk_import"
,
method: :put
do
%div
%div
=
users_select_tag
(
:user_ids
,
multiple:
true
,
email_user:
true
,
scope: :all
)
=
users_select_tag
(
:user_ids
,
multiple:
true
,
email_user:
true
,
s
kip_ldap:
@group
.
ldap_synced?
,
s
cope: :all
)
.prepend-top-10
.prepend-top-10
=
select_tag
:access_level
,
options_for_select
(
GroupMember
.
access_level_roles
),
class:
"project-access-select select2"
=
select_tag
:access_level
,
options_for_select
(
GroupMember
.
access_level_roles
),
class:
"project-access-select select2"
%hr
%hr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment