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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
225980db
Commit
225980db
authored
Dec 20, 2017
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Employ Groups dropdown in admin view
parent
5664ea2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
+7
-19
app/helpers/sorting_helper.rb
app/helpers/sorting_helper.rb
+6
-2
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+1
-17
No files found.
app/helpers/sorting_helper.rb
View file @
225980db
...
@@ -43,14 +43,18 @@ module SortingHelper
...
@@ -43,14 +43,18 @@ module SortingHelper
end
end
def
groups_sort_options_hash
def
groups_sort_options_hash
options
=
{
{
sort_value_recently_created
=>
sort_title_recently_created
,
sort_value_recently_created
=>
sort_title_recently_created
,
sort_value_oldest_created
=>
sort_title_oldest_created
,
sort_value_oldest_created
=>
sort_title_oldest_created
,
sort_value_recently_updated
=>
sort_title_recently_updated
,
sort_value_recently_updated
=>
sort_title_recently_updated
,
sort_value_oldest_updated
=>
sort_title_oldest_updated
sort_value_oldest_updated
=>
sort_title_oldest_updated
}
}
end
options
def
admin_groups_sort_options_hash
groups_sort_options_hash
.
merge
(
sort_value_largest_group
=>
sort_title_largest_group
)
end
end
def
member_sort_options_hash
def
member_sort_options_hash
...
...
app/views/admin/groups/index.html.haml
View file @
225980db
...
@@ -11,23 +11,7 @@
...
@@ -11,23 +11,7 @@
.search-field-holder
.search-field-holder
=
search_field_tag
:name
,
project_name
,
class:
"form-control search-text-input js-search-input"
,
autofocus:
true
,
spellcheck:
false
,
placeholder:
'Search by name'
=
search_field_tag
:name
,
project_name
,
class:
"form-control search-text-input js-search-input"
,
autofocus:
true
,
spellcheck:
false
,
placeholder:
'Search by name'
=
icon
(
"search"
,
class:
"search-icon"
)
=
icon
(
"search"
,
class:
"search-icon"
)
.dropdown
=
render
"shared/groups/dropdown"
,
options_hash:
admin_groups_sort_options_hash
-
toggle_text
=
@sort
.
present?
?
sort_options_hash
[
@sort
]
:
sort_title_recently_created
=
dropdown_toggle
(
toggle_text
,
{
toggle:
'dropdown'
})
%ul
.dropdown-menu.dropdown-menu-align-right
%li
.dropdown-header
Sort by
%li
=
link_to
admin_groups_path
(
sort:
sort_value_recently_created
,
name:
project_name
)
do
=
sort_title_recently_created
=
link_to
admin_groups_path
(
sort:
sort_value_oldest_created
,
name:
project_name
)
do
=
sort_title_oldest_created
=
link_to
admin_groups_path
(
sort:
sort_value_recently_updated
,
name:
project_name
)
do
=
sort_title_recently_updated
=
link_to
admin_groups_path
(
sort:
sort_value_oldest_updated
,
name:
project_name
)
do
=
sort_title_oldest_updated
=
link_to
admin_groups_path
(
sort:
sort_value_largest_group
,
name:
project_name
)
do
=
sort_title_largest_group
=
link_to
new_admin_group_path
,
class:
"btn btn-new"
do
=
link_to
new_admin_group_path
,
class:
"btn btn-new"
do
New group
New group
%ul
.content-list
%ul
.content-list
...
...
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