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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1c8008c1
Commit
1c8008c1
authored
Jun 27, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Informative search results page
parent
385ca60a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
47 deletions
+58
-47
app/views/search/show.html.haml
app/views/search/show.html.haml
+58
-47
No files found.
app/views/search/show.html.haml
View file @
1c8008c1
...
@@ -7,55 +7,66 @@
...
@@ -7,55 +7,66 @@
=
submit_tag
'Search'
,
:class
=>
"btn btn-primary"
=
submit_tag
'Search'
,
:class
=>
"btn btn-primary"
-
if
params
[
:search
].
present?
-
if
params
[
:search
].
present?
%br
%br
%h3
Search results
%h3
Search results
%small
(
#{
@projects
.
count
+
@merge_requests
.
count
+
@issues
.
count
}
)
%hr
%hr
.search_results
.search_results
-
if
@projects
.
empty?
&&
@merge_requests
.
empty?
.row
%h3
.span6
%small
Nothing here
%table
.admin-table
-
else
%tr
-
if
@projects
.
any?
%th
Projects
%h4
Projects
%tbody
.padded
-
@projects
.
each
do
|
project
|
-
@projects
.
each
do
|
project
|
%tr
%td
=
link_to
project
do
=
link_to
project
do
%h4
%strong
.term
=
project
.
name
%span
.ico.project
%small
.cgray
=
project
.
name
%small
last activity at
last activity at
=
project
.
last_activity_date
.
stamp
(
"Aug 25, 2011"
)
=
project
.
last_activity_date
.
stamp
(
"Aug 25, 2011"
)
-
if
@merge_requests
.
any?
-
if
@projects
.
blank?
%h4
Merge Requests
%tr
.padded
%td
%h4
.nothing_here_message
No Projects
%br
%table
.admin-table
%tr
%th
Merge Requests
%tbody
-
@merge_requests
.
each
do
|
merge_request
|
-
@merge_requests
.
each
do
|
merge_request
|
%tr
%td
=
link_to
[
merge_request
.
project
,
merge_request
]
do
=
link_to
[
merge_request
.
project
,
merge_request
]
do
%h5
%span
.badge.badge-info
##{merge_request.id}
Merge Request
#
=
merge_request
.
id
–
–
=
truncate
merge_request
.
title
,
:length
=>
50
%strong
.term
=
truncate
merge_request
.
title
,
:length
=>
50
%small
%strong
.right
updated at
=
merge_request
.
updated_at
.
stamp
(
"Aug 25, 2011"
)
%strong
%span
.label
=
merge_request
.
project
.
name
%span
.label
=
merge_request
.
project
.
name
-
if
@issues
.
any?
-
if
@merge_requests
.
blank?
%h4
Issues
%tr
.padded
%td
%h4
.nothing_here_message
No Merge Requests
.span6
%table
.admin-table
%tr
%th
Issues
%tbody
-
@issues
.
each
do
|
issue
|
-
@issues
.
each
do
|
issue
|
%tr
%td
=
link_to
[
issue
.
project
,
issue
]
do
=
link_to
[
issue
.
project
,
issue
]
do
%h5
%span
.badge.badge-info
##{issue.id}
Issue
#
=
issue
.
id
–
–
=
truncate
issue
.
title
,
:length
=>
50
%strong
.term
=
truncate
issue
.
title
,
:length
=>
40
%small
%strong
.right
updated at
=
issue
.
updated_at
.
stamp
(
"Aug 25, 2011"
)
%strong
%span
.label
=
issue
.
project
.
name
%span
.label
=
issue
.
project
.
name
-
if
@issues
.
blank?
%tr
%td
%h4
.nothing_here_message
No Issues
:javascript
:javascript
$
(
function
()
{
$
(
function
()
{
$
(
"
.search_results
"
).
highlight
(
"
#{
params
[
:search
]
}
"
);
$
(
"
.search_results
.term
"
).
highlight
(
"
#{
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