annotate .svn/pristine/d2/d290eee74cbe20f80a2e1db7f27a9b1e012b2872.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
rev   line source
Chris@1295 1 <h2><%= l(:label_search) %></h2>
Chris@1295 2
Chris@1295 3 <div class="box">
Chris@1295 4 <%= form_tag({}, :method => :get) do %>
Chris@1295 5 <%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
Chris@1295 6 <p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
Chris@1295 7 <%= javascript_tag "$('#search-input').focus()" %>
Chris@1295 8 <%= project_select_tag %>
Chris@1295 9 <%= hidden_field_tag 'all_words', '', :id => nil %>
Chris@1295 10 <label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
Chris@1295 11 <%= hidden_field_tag 'titles_only', '', :id => nil %>
Chris@1295 12 <label><%= check_box_tag 'titles_only', 1, @titles_only %> <%= l(:label_search_titles_only) %></label>
Chris@1295 13 </p>
Chris@1295 14 <p>
Chris@1295 15 <% @object_types.each do |t| %>
Chris@1295 16 <label><%= check_box_tag t, 1, @scope.include?(t) %> <%= type_label(t) %></label>
Chris@1295 17 <% end %>
Chris@1295 18 </p>
Chris@1295 19
Chris@1295 20 <p><%= submit_tag l(:button_submit), :name => 'submit' %></p>
Chris@1295 21 <% end %>
Chris@1295 22 </div>
Chris@1295 23
Chris@1295 24 <% if @results %>
Chris@1295 25 <div id="search-results-counts">
Chris@1295 26 <%= render_results_by_type(@results_by_type) unless @scope.size == 1 %>
Chris@1295 27 </div>
Chris@1295 28
Chris@1295 29 <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
Chris@1295 30 <dl id="search-results">
Chris@1295 31 <% @results.each do |e| %>
Chris@1295 32 <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>
Chris@1295 33 <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
Chris@1295 34 <span class="author"><%= format_time(e.event_datetime) %></span></dd>
Chris@1295 35 <% end %>
Chris@1295 36 </dl>
Chris@1295 37 <% end %>
Chris@1295 38
Chris@1295 39 <p><center>
Chris@1295 40 <% if @pagination_previous_date %>
Chris@1295 41 <%= link_to_content_update("\xc2\xab " + l(:label_previous),
Chris@1295 42 params.merge(:previous => 1,
Chris@1295 43 :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>&nbsp;
Chris@1295 44 <% end %>
Chris@1295 45 <% if @pagination_next_date %>
Chris@1295 46 <%= link_to_content_update(l(:label_next) + " \xc2\xbb",
Chris@1295 47 params.merge(:previous => nil,
Chris@1295 48 :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
Chris@1295 49 <% end %>
Chris@1295 50 </center></p>
Chris@1295 51
Chris@1295 52 <% html_title(l(:label_search)) -%>