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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ff396e0a
Commit
ff396e0a
authored
Oct 11, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract search field into a partial
parent
0e0c5c53
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
app/views/layouts/_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+1
-11
app/views/layouts/_search.html.haml
app/views/layouts/_search.html.haml
+11
-0
No files found.
app/views/layouts/_head_panel.html.haml
View file @
ff396e0a
...
...
@@ -8,9 +8,7 @@
GITLAB
%span
.separator
%h1
.project_name
=
title
.search
=
form_tag
search_path
,
method: :get
do
|
f
|
=
text_field_tag
"search"
,
nil
,
placeholder:
"Search"
,
class:
"search-input"
=
render
"layouts/search"
.fbtn
-
if
current_user
.
is_admin?
=
link_to
admin_root_path
,
class:
"btn small"
,
title:
"Admin area"
do
...
...
@@ -29,11 +27,3 @@
=
link_to
'Logout'
,
destroy_user_session_path
,
class:
"logout"
,
method: :delete
=
render
"layouts/init_auto_complete"
:javascript
$
(
function
(){
$
(
"
#search
"
).
autocomplete
({
source
:
#{
raw
search_autocomplete_source
}
,
select
:
function
(
event
,
ui
)
{
location
.
href
=
ui
.
item
.
url
}
});
});
app/views/layouts/_search.html.haml
0 → 100644
View file @
ff396e0a
.search
=
form_tag
search_path
,
method: :get
do
|
f
|
=
text_field_tag
"search"
,
nil
,
placeholder:
"Search"
,
class:
"search-input"
:javascript
$
(
function
(){
$
(
"
#search
"
).
autocomplete
({
source
:
#{
raw
search_autocomplete_source
}
,
select
:
function
(
event
,
ui
)
{
location
.
href
=
ui
.
item
.
url
}
});
});
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