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
Boxiang Sun
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
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
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
No files found.
app/assets/stylesheets/framework/common.scss
View file @
c9a8f2a0
...
@@ -305,7 +305,7 @@ table {
...
@@ -305,7 +305,7 @@ table {
}
}
.btn-sign-in
{
.btn-sign-in
{
margin-top
:
8
px
;
margin-top
:
10
px
;
text-shadow
:
none
;
text-shadow
:
none
;
}
}
...
...
app/assets/stylesheets/pages/search.scss
View file @
c9a8f2a0
.search-results
{
.search-results
{
.search-result-row
{
.search-result-row
{
border-bottom
:
1px
solid
#DDD
;
border-bottom
:
1px
solid
$border-color
;
padding-bottom
:
15px
;
padding-bottom
:
$gl-padding
;
margin-bottom
:
15px
;
margin-bottom
:
$gl-padding
;
&
:last-child
{
border-bottom
:
none
;
}
}
}
}
}
...
...
app/controllers/search_controller.rb
View file @
c9a8f2a0
class
SearchController
<
ApplicationController
class
SearchController
<
ApplicationController
skip_before_action
:authenticate_user!
,
:reject_blocked
include
SearchHelper
include
SearchHelper
layout
'search'
layout
'search'
...
...
app/views/layouts/header/_public.html.haml
View file @
c9a8f2a0
...
@@ -5,6 +5,16 @@
...
@@ -5,6 +5,16 @@
.pull-right
.pull-right
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-success'
=
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
%h1
.title
=
title
=
render
'shared/outdated_browser'
=
render
'shared/outdated_browser'
app/views/search/_form.html.haml
View file @
c9a8f2a0
...
@@ -11,4 +11,4 @@
...
@@ -11,4 +11,4 @@
=
button_tag
'Search'
,
class:
"btn btn-primary"
=
button_tag
'Search'
,
class:
"btn btn-primary"
-
unless
params
[
:snippets
].
eql?
'true'
-
unless
params
[
:snippets
].
eql?
'true'
%br
%br
=
render
'filter'
=
render
'filter'
if
current_user
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