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
c9a8f2a0
Commit
c9a8f2a0
authored
Mar 01, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable search for logged-out users
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b2f0b3f1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
6 deletions
+22
-6
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+1
-1
app/assets/stylesheets/pages/search.scss
app/assets/stylesheets/pages/search.scss
+7
-3
app/controllers/search_controller.rb
app/controllers/search_controller.rb
+2
-0
app/views/layouts/header/_public.html.haml
app/views/layouts/header/_public.html.haml
+10
-0
app/views/search/_form.html.haml
app/views/search/_form.html.haml
+1
-1
app/views/search/_results.html.haml
app/views/search/_results.html.haml
+1
-1
No files found.
app/assets/stylesheets/framework/common.scss
View file @
c9a8f2a0
...
...
@@ -305,7 +305,7 @@ table {
}
.btn-sign-in
{
margin-top
:
8
px
;
margin-top
:
10
px
;
text-shadow
:
none
;
}
...
...
app/assets/stylesheets/pages/search.scss
View file @
c9a8f2a0
.search-results
{
.search-result-row
{
border-bottom
:
1px
solid
#DDD
;
padding-bottom
:
15px
;
margin-bottom
:
15px
;
border-bottom
:
1px
solid
$border-color
;
padding-bottom
:
$gl-padding
;
margin-bottom
:
$gl-padding
;
&
:last-child
{
border-bottom
:
none
;
}
}
}
...
...
app/controllers/search_controller.rb
View file @
c9a8f2a0
class
SearchController
<
ApplicationController
skip_before_action
:authenticate_user!
,
:reject_blocked
include
SearchHelper
layout
'search'
...
...
app/views/layouts/header/_public.html.haml
View file @
c9a8f2a0
...
...
@@ -5,6 +5,16 @@
.pull-right
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-success'
.navbar-collapse.collapse
%ul
.nav.navbar-nav.pull-right
-
unless
@disable_search_panel
%li
.hidden-sm.hidden-xs
=
render
'layouts/search'
%li
.visible-sm.visible-xs
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'search'
)
%h1
.title
=
title
=
render
'shared/outdated_browser'
app/views/search/_form.html.haml
View file @
c9a8f2a0
...
...
@@ -11,4 +11,4 @@
=
button_tag
'Search'
,
class:
"btn btn-primary"
-
unless
params
[
:snippets
].
eql?
'true'
%br
=
render
'filter'
=
render
'filter'
if
current_user
app/views/search/_results.html.haml
View file @
c9a8f2a0
...
...
@@ -18,7 +18,7 @@
=
render
'shared/projects/list'
,
projects:
@objects
-
else
=
render
partial:
"search/results/
#{
@scope
.
singularize
}
"
,
collection:
@objects
=
paginate
@objects
,
theme:
'gitlab'
=
paginate
@objects
,
theme:
'gitlab'
:javascript
$
(
"
.search-results .term
"
).
highlight
(
"
#{
escape_javascript
(
params
[
:search
])
}
"
);
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