2007-02-28 00:03:15 +03:00
|
|
|
<h2><%= l(:label_search) %></h2>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<% form_tag({:action => 'search', :id => @project}, :method => :get) do %>
|
2007-03-10 16:32:04 +03:00
|
|
|
<p><%= text_field_tag 'q', @question, :size => 30 %>
|
2007-02-28 00:03:15 +03:00
|
|
|
<%= check_box_tag 'scope[]', 'issues', (@scope.include? 'issues') %> <label><%= l(:label_issue_plural) %></label>
|
|
|
|
<%= check_box_tag 'scope[]', 'news', (@scope.include? 'news') %> <label><%= l(:label_news_plural) %></label>
|
2007-03-10 16:32:04 +03:00
|
|
|
<%= check_box_tag 'scope[]', 'documents', (@scope.include? 'documents') %> <label><%= l(:label_document_plural) %></label><br />
|
|
|
|
<%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></p>
|
2007-02-28 00:03:15 +03:00
|
|
|
<%= submit_tag l(:button_submit), :name => 'submit' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if @results %>
|
|
|
|
<h3><%= lwr(:label_result, @results.length) %></h3>
|
|
|
|
<ul>
|
|
|
|
<% @results.each do |e| %>
|
|
|
|
<li><p>
|
|
|
|
<% if e.is_a? Issue %>
|
2007-03-10 16:32:04 +03:00
|
|
|
<%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %>: <%= highlight_tokens(h(e.subject), @tokens) %><br />
|
|
|
|
<%= highlight_tokens(e.description, @tokens) %><br />
|
2007-03-01 01:35:22 +03:00
|
|
|
<i><%= e.author.name %>, <%= format_time(e.created_on) %></i>
|
2007-02-28 00:03:15 +03:00
|
|
|
<% elsif e.is_a? News %>
|
2007-03-10 16:32:04 +03:00
|
|
|
<%=l(:label_news)%>: <%= link_to highlight_tokens(h(e.title), @tokens), :controller => 'news', :action => 'show', :id => e %><br />
|
|
|
|
<%= highlight_tokens(e.description, @tokens) %><br />
|
2007-03-01 01:35:22 +03:00
|
|
|
<i><%= e.author.name %>, <%= format_time(e.created_on) %></i>
|
2007-02-28 00:03:15 +03:00
|
|
|
<% elsif e.is_a? Document %>
|
2007-03-10 16:32:04 +03:00
|
|
|
<%=l(:label_document)%>: <%= link_to highlight_tokens(h(e.title), @tokens), :controller => 'documents', :action => 'show', :id => e %><br />
|
|
|
|
<%= highlight_tokens(e.description, @tokens) %><br />
|
2007-03-01 01:35:22 +03:00
|
|
|
<i><%= format_time(e.created_on) %></i>
|
2007-02-28 00:03:15 +03:00
|
|
|
<% end %>
|
|
|
|
</p></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|