diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
commit | 073818f8bc46580e118a7550f1faaa55b3be13d9 (patch) | |
tree | 6ea9ab7a218ecdac7f4fba61f339e17d0459f04d /app/views/search | |
parent | 1907c31138d065aea93f53b8e7565e06a44e49f8 (diff) | |
download | redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.tar.gz redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.zip |
Ability to search all projects or the projects the user belongs to (#791).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1435 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/index.rhtml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml index 29c604a21..0be97a504 100644 --- a/app/views/search/index.rhtml +++ b/app/views/search/index.rhtml @@ -4,23 +4,25 @@ <% form_tag({}, :method => :get) do %>
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
<%= javascript_tag "Field.focus('search-input')" %>
-
+<%= project_select_tag %>
+<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
+<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
+</p>
+<p>
<% @object_types.each do |t| %>
<label><%= check_box_tag t, 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label>
<% end %>
-<br />
-<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
-<label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
</p>
-<%= submit_tag l(:button_submit), :name => 'submit' %>
+
+<p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
<% end %>
</div>
<% if @results %>
<h3><%= l(:label_result_plural) %></h3>
- <ul>
+ <ul id="search-results">
<% @results.each do |e| %>
- <li><p><%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %><br />
+ <li><p><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %><br />
<%= highlight_tokens(e.event_description, @tokens) %><br />
<span class="author"><%= format_time(e.event_datetime) %></span></p></li>
<% end %>
|