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
Léo-Paul Géneau
gitlab-ce
Commits
120dca0f
Commit
120dca0f
authored
Feb 08, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MR feedback
parent
8b4e9720
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
12 deletions
+9
-12
app/assets/javascripts/projects_list.js.coffee
app/assets/javascripts/projects_list.js.coffee
+2
-5
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+2
-2
app/controllers/explore/projects_controller.rb
app/controllers/explore/projects_controller.rb
+3
-3
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+1
-1
No files found.
app/assets/javascripts/projects_list.js.coffee
View file @
120dca0f
class
@
ProjectsList
constructor
:
->
$
(
"#project-filter-form-field"
).
off
(
'keyup'
)
$
(
".projects-list .js-expand"
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
list
=
$
(
this
).
closest
(
'.projects-list'
)
$
(
"#filter_projects"
).
on
'keyup'
,
->
ProjectsList
.
filter_results
(
$
(
"#filter_projects"
))
$
(
"#project-filter-form-field"
).
on
'keyup'
,
->
ProjectsList
.
filter_results
(
$
(
"#project-filter-form-field"
))
@
filter_results
:
(
$element
)
->
terms
=
$element
.
val
()
filterSelector
=
$element
.
data
(
'filter-selector'
)
||
'span.filter-title'
if
not
terms
$
(
"
ul
.projects-list li"
).
show
()
$
(
".projects-list li"
).
show
()
$
(
'.gl-pagination'
).
show
()
else
$
(
"
ul
.projects-list li"
).
each
(
index
)
->
$
(
".projects-list li"
).
each
(
index
)
->
$this
=
$
(
this
)
name
=
$this
.
find
(
filterSelector
).
text
()
...
...
app/controllers/dashboard/projects_controller.rb
View file @
120dca0f
...
...
@@ -12,7 +12,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
@projects
.
search
(
terms
)
end
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
terms
.
present
?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
terms
.
blank
?
@last_push
=
current_user
.
recent_push
respond_to
do
|
format
|
...
...
@@ -41,7 +41,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
@projects
.
search
(
terms
)
end
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
terms
.
present
?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
terms
.
blank
?
@last_push
=
current_user
.
recent_push
@groups
=
[]
...
...
app/controllers/explore/projects_controller.rb
View file @
120dca0f
...
...
@@ -8,7 +8,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
search
(
params
[
:filter_projects
])
if
params
[
:filter_projects
].
present?
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
params
[
:filter_projects
].
present
?
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank
?
respond_to
do
|
format
|
format
.
html
...
...
@@ -24,7 +24,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@projects
=
TrendingProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
@projects
.
non_archived
@projects
=
@projects
.
search
(
params
[
:filter_projects
])
if
params
[
:filter_projects
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
params
[
:filter_projects
].
present
?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank
?
respond_to
do
|
format
|
format
.
html
...
...
@@ -40,7 +40,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@projects
=
ProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
@projects
.
search
(
params
[
:filter_projects
])
if
params
[
:filter_projects
].
present?
@projects
=
@projects
.
reorder
(
'star_count DESC'
)
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
params
[
:filter_projects
].
present
?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank
?
respond_to
do
|
format
|
format
.
html
...
...
app/controllers/groups_controller.rb
View file @
120dca0f
...
...
@@ -42,7 +42,7 @@ class GroupsController < Groups::ApplicationController
@last_push
=
current_user
.
recent_push
if
current_user
@projects
=
@projects
.
includes
(
:namespace
)
@projects
=
@projects
.
search
(
params
[
:filter_projects
])
if
params
[
:filter_projects
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
!
params
[
:filter_projects
].
present
?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank
?
respond_to
do
|
format
|
format
.
html
...
...
app/views/groups/show.html.haml
View file @
120dca0f
...
...
@@ -47,7 +47,7 @@
=
render
'shared/event_filter'
.content_list
{
:"data-href"
=>
events_group_path
}
.content_list
{
data:
{
href:
events_group_path
}
}
=
spinner
.tab-pane
#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