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
73bd729e
Commit
73bd729e
authored
Feb 03, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sort dropdown to dashboard projects page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d506b3f9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
38 deletions
+40
-38
CHANGELOG
CHANGELOG
+1
-0
app/assets/stylesheets/pages/explore.scss
app/assets/stylesheets/pages/explore.scss
+0
-8
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+1
-0
app/helpers/explore_helper.rb
app/helpers/explore_helper.rb
+12
-1
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+2
-1
app/views/explore/projects/_dropdown.html.haml
app/views/explore/projects/_dropdown.html.haml
+3
-9
app/views/explore/projects/_filter.html.haml
app/views/explore/projects/_filter.html.haml
+1
-1
app/views/explore/projects/_nav.html.haml
app/views/explore/projects/_nav.html.haml
+10
-0
app/views/explore/projects/index.html.haml
app/views/explore/projects/index.html.haml
+5
-1
app/views/explore/projects/starred.html.haml
app/views/explore/projects/starred.html.haml
+3
-9
app/views/explore/projects/trending.html.haml
app/views/explore/projects/trending.html.haml
+2
-8
No files found.
CHANGELOG
View file @
73bd729e
...
...
@@ -27,6 +27,7 @@ v 8.5.0 (unreleased)
- Mark inline difference between old and new paths when a file is renamed
- Support Akismet spam checking for creation of issues via API (Stan Hu)
- Improve UI consistency between projects and groups lists
- Add sort dropdown to dashboard projects page
v 8.4.3
- Increase lfs_objects size column to 8-byte integer to allow files larger
...
...
app/assets/stylesheets/pages/explore.scss
View file @
73bd729e
...
...
@@ -6,11 +6,3 @@
font-size
:
30px
;
}
}
.explore-trending-block
{
.lead
{
line-height
:
32px
;
font-size
:
18px
;
margin-top
:
10px
;
}
}
app/controllers/dashboard/projects_controller.rb
View file @
73bd729e
...
...
@@ -3,6 +3,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
def
index
@projects
=
current_user
.
authorized_projects
.
sorted_by_activity
.
non_archived
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
)
@last_push
=
current_user
.
recent_push
...
...
app/helpers/explore_helper.rb
View file @
73bd729e
...
...
@@ -10,8 +10,19 @@ module ExploreHelper
options
=
exist_opts
.
merge
(
options
)
path
=
explore_projects_path
path
=
if
explore_controller?
explore_projects_path
elsif
current_action?
(
:starred
)
starred_dashboard_projects_path
else
dashboard_projects_path
end
path
<<
"?
#{
options
.
to_param
}
"
path
end
def
explore_controller?
controller
.
class
.
name
.
split
(
"::"
).
first
==
"Explore"
end
end
app/views/dashboard/_projects_head.html.haml
View file @
73bd729e
...
...
@@ -13,7 +13,8 @@
Explore Projects
.nav-controls
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control hidden-xs'
,
spellcheck:
false
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control hidden-xs input-short'
,
spellcheck:
false
=
render
'explore/projects/dropdown'
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
class:
'btn btn-new'
do
=
icon
(
'plus'
)
...
...
app/views/explore/projects/_dropdown.html.haml
View file @
73bd729e
...
...
@@ -3,19 +3,13 @@
%span
.light
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
elsif
current_page?
(
trending_explore_projects_path
)
||
current_page?
(
explore_root_path
)
Trending projects
-
elsif
current_page?
(
starred_explore_projects_path
)
Most stars
-
else
=
sort_title_recently_
cre
ated
=
sort_title_recently_
upd
ated
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
trending_explore_projects_path
do
Trending projects
=
link_to
starred_explore_projects_path
do
Most stars
=
link_to
explore_projects_filter_path
(
sort:
sort_value_name
)
do
=
sort_title_name
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_created
)
do
...
...
app/views/explore/projects/_filter.html.haml
View file @
73bd729e
...
...
@@ -2,6 +2,7 @@
=
form_tag
explore_projects_filter_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
.form-group
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Filter by name"
,
class:
"form-control search-text-input"
,
id:
"projects_search"
,
spellcheck:
false
=
hidden_field_tag
:sort
,
@sort
.form-group
=
button_tag
'Search'
,
class:
"btn"
...
...
@@ -46,4 +47,3 @@
=
link_to
explore_projects_filter_path
(
tag:
tag
.
name
)
do
%i
.fa.fa-tag
=
tag
.
name
=
render
'explore/projects/dropdown'
app/views/explore/projects/_nav.html.haml
0 → 100644
View file @
73bd729e
%ul
.nav-links
=
nav_link
(
page:
[
trending_explore_projects_path
,
explore_root_path
])
do
=
link_to
trending_explore_projects_path
do
Trending
=
nav_link
(
page:
starred_explore_projects_path
)
do
=
link_to
starred_explore_projects_path
do
Most stars
=
nav_link
(
page:
explore_projects_path
)
do
=
link_to
explore_projects_path
do
All
app/views/explore/projects/index.html.haml
View file @
73bd729e
...
...
@@ -6,7 +6,11 @@
-
else
=
render
'explore/head'
.gray-content-block.clearfix.second-block
.top-area
=
render
'explore/projects/nav'
.gray-content-block.second-block.clearfix
=
render
'filter'
=
render
'projects'
,
projects:
@projects
=
paginate
@projects
,
theme:
"gitlab"
app/views/explore/projects/starred.html.haml
View file @
73bd729e
...
...
@@ -6,12 +6,6 @@
-
else
=
render
'explore/head'
.explore-trending-block
.gray-content-block.second-block
.pull-right
=
render
'explore/projects/dropdown'
.oneline
%i
.fa.fa-star
See most starred projects
=
render
'projects'
,
projects:
@starred_projects
=
paginate
@starred_projects
,
theme:
'gitlab'
=
render
'explore/projects/nav'
=
render
'projects'
,
projects:
@starred_projects
=
paginate
@starred_projects
,
theme:
'gitlab'
app/views/explore/projects/trending.html.haml
View file @
73bd729e
...
...
@@ -6,11 +6,5 @@
-
else
=
render
'explore/head'
.explore-trending-block
.gray-content-block.second-block
.pull-right
=
render
'explore/projects/dropdown'
.oneline
%i
.fa.fa-comments-o
See most discussed projects for last month
=
render
'projects'
,
projects:
@trending_projects
=
render
'explore/projects/nav'
=
render
'projects'
,
projects:
@trending_projects
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