BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c5feabde
Commit
c5feabde
authored
May 13, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add simple search to projects in public area
parent
50d44202
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
projects_controller.rb
app/controllers/public/projects_controller.rb
+1
-0
index.html.haml
app/views/public/projects/index.html.haml
+13
-3
No files found.
app/controllers/public/projects_controller.rb
View file @
c5feabde
...
...
@@ -7,6 +7,7 @@ class Public::ProjectsController < ApplicationController
def
index
@projects
=
Project
.
public_only
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
20
)
end
end
app/views/public/projects/index.html.haml
View file @
c5feabde
%h3
.page_title
Projects (
#{
@projects
.
total_count
}
)
%small
with read-only access
.row
.span6
%h3
.page_title
Projects (
#{
@projects
.
total_count
}
)
%small
with read-only access
.span6
.pull-right
=
form_tag
public_projects_path
,
method: :get
,
class:
'form-inline'
do
|
f
|
.search-holder
.input
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"gitlab-ci"
,
class:
"span3 search-text-input"
,
id:
"projects_search"
=
submit_tag
'Search'
,
class:
"btn btn-primary wide"
%hr
.public-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