In general, we always use relative URLs (using `_path`), but sometimes we were accidentally using absolute URLs (using `_url`). It's been reported i might cause some isuses if accepting both HTTP and HTTPS connections, although we've never seen the case. In any case, this change makes the code more consistent and makes the generated HTML cleaner.
34 lines
1007 B
Plaintext
34 lines
1007 B
Plaintext
<div class="small-12 column">
|
|
<% if @search_terms && @resources.any? %>
|
|
<div class="callout warning">
|
|
<p>
|
|
<strong>
|
|
<%= t("shared.suggest.#{resource_name}.found",
|
|
count: @resources.count,
|
|
query: @search_terms) %>
|
|
</strong>
|
|
</p>
|
|
|
|
<ul>
|
|
<% @resources.limit(@limit).each do |resource| %>
|
|
<li><%= link_to resource.title, @resource_path_method.present? ? send(@resource_path_method, resource) : resource %></li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<% if @resources.count > @limit %>
|
|
<p>
|
|
<strong>
|
|
<%= t("shared.suggest.#{resource_name}.message",
|
|
count: @resources.count,
|
|
query: @search_terms,
|
|
limit: @limit) %>
|
|
</strong>
|
|
<%= link_to t("shared.suggest.#{resource_name}.see_all"),
|
|
polymorphic_path(resource_model, search: @search_terms) %>
|
|
</p>
|
|
<% end %>
|
|
|
|
</div>
|
|
<% end %>
|
|
</div>
|