Mercurial > hg > soundsoftware-site
comparison app/views/search/.svn/text-base/index.rhtml.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:513646585e45 |
---|---|
1 <h2><%= l(:label_search) %></h2> | |
2 | |
3 <div class="box"> | |
4 <% form_tag({}, :method => :get) do %> | |
5 <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %> | |
6 <%= javascript_tag "Field.focus('search-input')" %> | |
7 <%= project_select_tag %> | |
8 <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label> | |
9 <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label> | |
10 </p> | |
11 <p> | |
12 <% @object_types.each do |t| %> | |
13 <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label> | |
14 <% end %> | |
15 </p> | |
16 | |
17 <p><%= submit_tag l(:button_submit), :name => 'submit' %></p> | |
18 <% end %> | |
19 </div> | |
20 | |
21 <% if @results %> | |
22 <div id="search-results-counts"> | |
23 <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %> | |
24 </div> | |
25 | |
26 <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3> | |
27 <dl id="search-results"> | |
28 <% @results.each do |e| %> | |
29 <dt class="<%= e.event_type %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, :length => 255), @tokens), e.event_url %></dt> | |
30 <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span> | |
31 <span class="author"><%= format_time(e.event_datetime) %></span></dd> | |
32 <% end %> | |
33 </dl> | |
34 <% end %> | |
35 | |
36 <p><center> | |
37 <% if @pagination_previous_date %> | |
38 <%= link_to_remote ('« ' + l(:label_previous)), | |
39 {:update => :content, | |
40 :url => params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S")) | |
41 }, :href => url_for(params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %> | |
42 <% end %> | |
43 <% if @pagination_next_date %> | |
44 <%= link_to_remote (l(:label_next) + ' »'), | |
45 {:update => :content, | |
46 :url => params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S")) | |
47 }, :href => url_for(params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %> | |
48 <% end %> | |
49 </center></p> | |
50 | |
51 <% html_title(l(:label_search)) -%> |