summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/framework/dropdowns.scss7
-rw-r--r--app/assets/stylesheets/pages/groups.scss1
-rw-r--r--app/helpers/sorting_helper.rb11
-rw-r--r--app/views/groups/show.html.haml4
-rw-r--r--app/views/shared/groups/_dropdown.html.haml13
5 files changed, 17 insertions, 19 deletions
diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss
index b998292c26e..c0d8e6c328c 100644
--- a/app/assets/stylesheets/framework/dropdowns.scss
+++ b/app/assets/stylesheets/framework/dropdowns.scss
@@ -220,13 +220,6 @@
margin-right: 5px;
}
- &.dropdown-menu-noanimate {
- visibility: visible;
- opacity: 1;
- transform: translateY(0);
- display: none;
- }
-
ul {
margin: 0;
padding: 0;
diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss
index 573cc03ad5f..9b7dda9b648 100644
--- a/app/assets/stylesheets/pages/groups.scss
+++ b/app/assets/stylesheets/pages/groups.scss
@@ -88,7 +88,6 @@
}
.description {
- padding-left: 30px;
font-size: 14px;
strong {
diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb
index 7f4be54330a..60dd8b05aec 100644
--- a/app/helpers/sorting_helper.rb
+++ b/app/helpers/sorting_helper.rb
@@ -42,6 +42,17 @@ module SortingHelper
options
end
+ def groups_sort_options_hash
+ options = {
+ sort_value_recently_created => sort_title_recently_created,
+ sort_value_oldest_created => sort_title_oldest_created,
+ sort_value_recently_updated => sort_title_recently_updated,
+ sort_value_oldest_updated => sort_title_oldest_updated
+ }
+
+ options
+ end
+
def member_sort_options_hash
{
sort_value_access_level_asc => sort_title_access_level_asc,
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 3846a36c675..c6e5e16e239 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -14,11 +14,11 @@
- if can? current_user, :create_projects, @group
- new_project_label = _("New project")
- new_subgroup_label = _("New subgroup")
- .btn-group.new-project-subgroup.js-new-project-subgroup{ data: { project_path: new_project_path(namespace_id: @group.id), subgroup_path: new_group_path(parent_id: @group.id) } }
+ .btn-group.new-project-subgroup.droplab-dropdown.js-new-project-subgroup{ data: { project_path: new_project_path(namespace_id: @group.id), subgroup_path: new_group_path(parent_id: @group.id) } }
%input.btn.btn-success.dropdown-primary.js-new-group-child{ type: "button", value: new_project_label, data: { action: "new-project" } }
%button.btn.btn-success.dropdown-toggle.js-dropdown-toggle{ type: "button", data: { "dropdown-trigger" => "#new-project-or-subgroup-dropdown" } }
= icon("caret-down", class: "dropdown-btn-icon")
- %ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-noanimate.dropdown-menu-align-right{ data: { dropdown: true } }
+ %ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-align-right{ data: { dropdown: true } }
%li.droplab-item-selected{ role: "button", data: { value: "new-project", text: new_project_label } }
.menu-item
.icon-container
diff --git a/app/views/shared/groups/_dropdown.html.haml b/app/views/shared/groups/_dropdown.html.haml
index c66641d390b..355b03e4d9e 100644
--- a/app/views/shared/groups/_dropdown.html.haml
+++ b/app/views/shared/groups/_dropdown.html.haml
@@ -15,12 +15,7 @@
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
%li.dropdown-header
= _("Sort by")
- %li
- = link_to filter_groups_path(sort: sort_value_recently_created), class: "#{ 'is-active' if default_sort_by == sort_value_recently_created }" do
- = sort_title_recently_created
- = link_to filter_groups_path(sort: sort_value_oldest_created), class: "#{ 'is-active' if default_sort_by == sort_value_oldest_created }" do
- = sort_title_oldest_created
- = link_to filter_groups_path(sort: sort_value_recently_updated), class: "#{ 'is-active' if default_sort_by == sort_value_recently_updated }" do
- = sort_title_recently_updated
- = link_to filter_groups_path(sort: sort_value_oldest_updated), class: "#{ 'is-active' if default_sort_by == sort_value_oldest_updated }" do
- = sort_title_oldest_updated
+ - groups_sort_options_hash.each do |value, title|
+ %li
+ = link_to filter_groups_path(sort: value), class: "#{ 'is-active' if default_sort_by == value }" do
+ = title