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
Kazuhiko Shiozaki
gitlab-ce
Commits
15eeae5f
Commit
15eeae5f
authored
Sep 11, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 500 when search for gitlab projects
parent
2b683807
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
12 deletions
+7
-12
app/assets/javascripts/ci/pager.js.coffee
app/assets/javascripts/ci/pager.js.coffee
+3
-3
app/controllers/ci/projects_controller.rb
app/controllers/ci/projects_controller.rb
+1
-1
app/views/ci/projects/index.html.haml
app/views/ci/projects/index.html.haml
+2
-7
app/views/layouts/ci/application.html.haml
app/views/layouts/ci/application.html.haml
+1
-1
No files found.
app/assets/javascripts/ci/pager.js.coffee
View file @
15eeae5f
...
...
@@ -16,7 +16,7 @@
complete
:
=>
$
(
".loading"
).
hide
()
success
:
(
data
)
=>
Pager
.
append
(
data
.
count
,
data
.
html
)
Ci
Pager
.
append
(
data
.
count
,
data
.
html
)
dataType
:
"json"
append
:
(
count
,
html
)
->
...
...
@@ -34,9 +34,9 @@
fireDelay
:
1000
fireOnce
:
true
ceaseFire
:
->
Pager
.
disable
Ci
Pager
.
disable
callback
:
(
i
)
=>
unless
$
(
".loading"
).
is
(
':visible'
)
$
(
".loading"
).
show
()
Pager
.
getItems
()
Ci
Pager
.
getItems
()
app/controllers/ci/projects_controller.rb
View file @
15eeae5f
...
...
@@ -22,7 +22,7 @@ module Ci
@page
=
@offset
==
0
?
1
:
(
@offset
/
@limit
+
1
)
@gl_projects
=
current_user
.
authorized_projects
@gl_projects
=
@gl_projects
.
where
(
"name LIKE
%?%"
,
params
[
:search
]
)
if
params
[
:search
]
@gl_projects
=
@gl_projects
.
where
(
"name LIKE
?"
,
"%
#{
params
[
:search
]
}
%"
)
if
params
[
:search
]
@gl_projects
=
@gl_projects
.
page
(
@page
).
per
(
@limit
)
@projects
=
Ci
::
Project
.
where
(
gitlab_id:
@gl_projects
.
map
(
&
:id
)).
ordered_by_last_commit_date
...
...
app/views/ci/projects/index.html.haml
View file @
15eeae5f
-
if
current_user
=
content_for
:title
do
%h3
.project-title
Dashboard
.pull-right
=
render
"search"
=
render
"search"
.projects
%p
.fetch-status.light
%i
.fa.fa-refresh.fa-spin
...
...
@@ -12,6 +7,6 @@
$.get '
#{
gitlab_ci_projects_path
}
', (data) ->
$(".projects").html data.html
CiPager.init "
#{
gitlab_ci_projects_path
}
",
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
-
else
=
render
'public'
app/views/layouts/ci/application.html.haml
View file @
15eeae5f
...
...
@@ -2,7 +2,7 @@
%html
{
lang:
"en"
}
=
render
'layouts/head'
%body
{
class:
"ci-body #{user_application_theme}"
,
'data-page'
=>
body_data_page
}
-
header_title
=
"Projects"
-
header_title
=
"
CI
Projects"
-
if
current_user
=
render
"layouts/header/default"
,
title:
header_title
-
else
...
...
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