2012-03-16 00:14:39 +01:00
|
|
|
= form_tag search_path, :method => :get do |f|
|
|
|
|
.padded
|
2012-06-04 00:37:27 +02:00
|
|
|
= label_tag :search do
|
2012-04-14 10:20:45 +02:00
|
|
|
%strong Looking for
|
2012-03-16 00:14:39 +01:00
|
|
|
.input
|
2012-06-16 11:50:14 +02:00
|
|
|
= text_field_tag :search, params[:search], :placeholder => "issue 143", :class => "input-xxlarge", :id => "dashboard_search"
|
2012-04-10 07:51:08 +02:00
|
|
|
= submit_tag 'Search', :class => "btn btn-primary"
|
2012-03-16 00:14:39 +01:00
|
|
|
- if params[:search].present?
|
|
|
|
%br
|
|
|
|
%h3 Search results
|
|
|
|
%hr
|
|
|
|
.search_results
|
|
|
|
- if @projects.empty? && @merge_requests.empty?
|
|
|
|
%h3
|
|
|
|
%small Nothing here
|
2012-06-04 00:37:27 +02:00
|
|
|
- else
|
2012-03-16 00:14:39 +01:00
|
|
|
- if @projects.any?
|
2012-04-14 10:16:11 +02:00
|
|
|
%h4 Projects
|
|
|
|
.padded
|
|
|
|
- @projects.each do |project|
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to project do
|
2012-04-14 10:16:11 +02:00
|
|
|
%h4
|
|
|
|
%span.ico.project
|
|
|
|
= project.name
|
|
|
|
%small
|
2012-06-04 00:37:27 +02:00
|
|
|
last activity at
|
2012-04-14 10:16:11 +02:00
|
|
|
= project.last_activity_date.stamp("Aug 25, 2011")
|
2012-03-16 00:14:39 +01:00
|
|
|
- if @merge_requests.any?
|
2012-04-14 10:16:11 +02:00
|
|
|
%h4 Merge Requests
|
|
|
|
.padded
|
|
|
|
- @merge_requests.each do |merge_request|
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to [merge_request.project, merge_request] do
|
2012-04-14 10:16:11 +02:00
|
|
|
%h5
|
|
|
|
Merge Request #
|
|
|
|
= merge_request.id
|
|
|
|
–
|
|
|
|
= truncate merge_request.title, :length => 50
|
|
|
|
%small
|
2012-06-04 00:37:27 +02:00
|
|
|
updated at
|
2012-04-14 10:16:11 +02:00
|
|
|
= merge_request.updated_at.stamp("Aug 25, 2011")
|
|
|
|
%strong
|
|
|
|
%span.label= merge_request.project.name
|
|
|
|
- if @issues.any?
|
|
|
|
%h4 Issues
|
|
|
|
.padded
|
|
|
|
- @issues.each do |issue|
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to [issue.project, issue] do
|
2012-04-14 10:16:11 +02:00
|
|
|
%h5
|
|
|
|
Issue #
|
|
|
|
= issue.id
|
|
|
|
–
|
|
|
|
= truncate issue.title, :length => 50
|
|
|
|
%small
|
2012-06-04 00:37:27 +02:00
|
|
|
updated at
|
2012-04-14 10:16:11 +02:00
|
|
|
= issue.updated_at.stamp("Aug 25, 2011")
|
|
|
|
%strong
|
|
|
|
%span.label= issue.project.name
|
2012-03-16 00:14:39 +01:00
|
|
|
:javascript
|
|
|
|
$(function() {
|
|
|
|
$(".search_results").highlight("#{params[:search]}");
|
|
|
|
})
|