Commit e6aac9aea3c4f4843dde6764a0ecf9c36d12ed18
1 parent
2837298a
Exists in
master
and in
29 other branches
Fix css clearing for all searches
Showing
18 changed files
with
90 additions
and
83 deletions
Show diff stats
app/views/search/_article.rhtml
app/views/search/_blog.rhtml
app/views/search/_display_results.rhtml
1 | 1 | <div id="search-results" class="<%= 'only-one-result-box' if @results.size == 1 %>"> |
2 | 2 | |
3 | -<% @order.each do |name| %> | |
4 | - <% results = @results[name] %> | |
5 | - <% if !results.nil? and !results.empty? %> | |
6 | - <div class="search-results-<%= name %> search-results-box"> | |
7 | - | |
8 | - <% if @results.size > 1 %> | |
9 | - <h3><%= @names[name] %></h3> | |
10 | - <%= link_to(results.respond_to?(:total_entries) ? _('see all (%d)') % results.total_entries : _('see all...'), | |
11 | - params.merge(:action => name), :class => 'see-more' ) %> | |
12 | - <% end %> | |
13 | - | |
14 | - <% partial = partial_for_class(results.first.class.class_name.constantize) %> | |
15 | - <div class="search-results-innerbox search-results-type-<%= partial %> <%= 'common-profile-list-block' if partial == 'profile' %>"> | |
16 | - <div class="search-results-innerbox2"><!-- the innerbox2 is a workarround for MSIE --> | |
17 | - <ul> | |
18 | - <% results.each do |hit| %> | |
19 | - <%= render :partial => partial_for_class(hit.class), :object => hit %> | |
20 | - <% end %> | |
21 | - </ul> | |
3 | + <% @order.each do |name| %> | |
4 | + <% results = @results[name] %> | |
5 | + <% if !results.nil? and !results.empty? %> | |
6 | + <div class="search-results-<%= name %> search-results-box"> | |
7 | + | |
8 | + <% if @results.size > 1 %> | |
9 | + <h3><%= @names[name] %></h3> | |
10 | + <%= link_to(results.respond_to?(:total_entries) ? _('see all (%d)') % results.total_entries : _('see all...'), | |
11 | + params.merge(:action => name), :class => 'see-more' ) %> | |
12 | + <% end %> | |
13 | + | |
14 | + <% partial = partial_for_class(results.first.class.class_name.constantize) %> | |
15 | + <div class="search-results-innerbox search-results-type-<%= partial %> <%= 'common-profile-list-block' if partial == 'profile' %>"> | |
16 | + <div class="search-results-innerbox2"><!-- the innerbox2 is a workarround for MSIE --> | |
17 | + <ul> | |
18 | + <% results.each do |hit| %> | |
19 | + <%= render :partial => partial_for_class(hit.class), :object => hit %> | |
20 | + <% end %> | |
21 | + </ul> | |
22 | + <hr /> | |
23 | + </div><!-- end class="search-results-innerbox2" --> | |
24 | + </div><!-- end class="search-results-innerbox" --> | |
25 | + | |
26 | + </div><!-- end class="search-results-<%= name %>" --> | |
27 | + <% else %> | |
28 | + <div class="search-results-<%= name %> search-results-empty search-results-box"> | |
29 | + <% if @results.size > 1 %> | |
30 | + <h3><%= @names[name] %></h3> | |
31 | + <% end %> | |
32 | + <div class="search-results-innerbox search-results-type-empty"> | |
33 | + <div> <%= _('None') %> </div> | |
22 | 34 | <hr /> |
23 | - </div><!-- end class="search-results-innerbox2" --> | |
24 | - </div><!-- end class="search-results-innerbox" --> | |
25 | - | |
26 | - </div><!-- end class="search-results-<%= name %>" --> | |
27 | - <% else %> | |
28 | - <div class="search-results-<%= name %> search-results-empty search-results-box"> | |
29 | - <% if @results.size > 1 %> | |
30 | - <h3><%= @names[name] %></h3> | |
31 | - <% end %> | |
32 | - <div class="search-results-innerbox search-results-type-empty"> | |
33 | - <div> <%= _('None') %> </div> | |
34 | - <hr /> | |
35 | - </div><!-- end class="search-results-innerbox" --> | |
36 | - </div><!-- end class="search-results-<%= name %>" --> | |
35 | + </div><!-- end class="search-results-innerbox" --> | |
36 | + </div><!-- end class="search-results-<%= name %>" --> | |
37 | + <% end %> | |
37 | 38 | <% end %> |
38 | -<% end %> | |
39 | - | |
40 | -<div style="clear:both"></div> | |
39 | + | |
40 | + <div style="clear:both"></div> | |
41 | 41 | </div><!-- end id="search-results" --> |
42 | 42 | ... | ... |
app/views/search/_event.rhtml
app/views/search/_folder.rhtml
app/views/search/_forum.rhtml
app/views/search/_gallery.rhtml
app/views/search/_google_maps.rhtml
app/views/search/_search_form.rhtml
1 | 1 | <div class='search-form'> |
2 | 2 | |
3 | -<% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) }, | |
4 | - :method => 'get', :class => 'search_form' ) do %> | |
5 | - | |
6 | - <%= hidden_field_tag :display, params[:display] %> | |
7 | - | |
8 | - <div class="search-field"> | |
9 | - <span class="formfield"> | |
10 | - <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %> | |
11 | - <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %> | |
12 | - <%= javascript_tag "jQuery('.search_form').submit(function() { | |
13 | - if (jQuery('#search-input').val().length < 3) { | |
14 | - jQuery('#search-empty-query-error').slideDown(200).delay(2500).slideUp(200); | |
15 | - return false; | |
16 | - } | |
17 | - });" %> | |
18 | - </span> | |
19 | - | |
20 | - <%= submit_button(:search, _('Search')) %> | |
21 | - | |
22 | - <div id="search-empty-query-error"> | |
23 | - <%= _("Type more than 2 characters to start a search") %> | |
3 | + <% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) }, | |
4 | + :method => 'get', :class => 'search_form' ) do %> | |
5 | + | |
6 | + <%= hidden_field_tag :display, params[:display] %> | |
7 | + | |
8 | + <div class="search-field"> | |
9 | + <span class="formfield"> | |
10 | + <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %> | |
11 | + <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %> | |
12 | + <%= javascript_tag "jQuery('.search_form').submit(function() { | |
13 | + if (jQuery('#search-input').val().length < 3) { | |
14 | + jQuery('#search-empty-query-error').slideDown(200).delay(2500).slideUp(200); | |
15 | + return false; | |
16 | + } | |
17 | + });" %> | |
18 | + </span> | |
19 | + | |
20 | + <%= submit_button(:search, _('Search')) %> | |
21 | + | |
22 | + <div id="search-empty-query-error"> | |
23 | + <%= _("Type more than 2 characters to start a search") %> | |
24 | + </div> | |
24 | 25 | </div> |
25 | - </div> | |
26 | - | |
27 | - <% if @empty_query %> | |
28 | - <% hint = environment.search_hints[@asset] %> | |
29 | - <% if hint and !hint.blank? %> | |
30 | - <span class="search-hint"><%= hint %></span> | |
26 | + | |
27 | + <% if @empty_query %> | |
28 | + <% hint = environment.search_hints[@asset] %> | |
29 | + <% if hint and !hint.blank? %> | |
30 | + <span class="search-hint"><%= hint %></span> | |
31 | + <% end %> | |
31 | 32 | <% end %> |
33 | + | |
32 | 34 | <% end %> |
33 | 35 | |
34 | 36 | <div style="clear: both"></div> |
35 | - | |
36 | -<% end %> | |
37 | - | |
38 | -</div> <!-- id="search-form" --> | |
37 | +</div> | ... | ... |
app/views/search/_text_article.rhtml
app/views/search/_uploaded_file.rhtml
... | ... | @@ -32,5 +32,6 @@ |
32 | 32 | <%= render :partial => 'article_categories', :object => uploaded_file.categories %> |
33 | 33 | <%= render :partial => 'article_last_change', :object => uploaded_file %> |
34 | 34 | </div> |
35 | - <br style="clear: both"/> | |
35 | + | |
36 | + <div style="clear:both"></div> | |
36 | 37 | </li> | ... | ... |
app/views/search/articles.rhtml
app/views/search/communities.rhtml
app/views/search/enterprises.rhtml
app/views/search/index.rhtml
app/views/search/people.rhtml
app/views/search/products.rhtml