diff options
| author | hukl <contact@smyck.org> | 2009-12-01 23:02:09 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-12-01 23:03:47 +0100 |
| commit | 4d3d971452086f375eed953f66f25cfe6e622281 (patch) | |
| tree | 1a3d2c25dfe51823e7420768029450736a5369ae /app/views | |
| parent | 7e46b0ce0f2216d4a53cf9e633fcfed3cd421c7c (diff) | |
reduced instanciated AR objects for search
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/search/_search_result.html.erb | 4 | ||||
| -rw-r--r-- | app/views/search/index.html.erb | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/views/search/_search_result.html.erb b/app/views/search/_search_result.html.erb new file mode 100644 index 0000000..b480f89 --- /dev/null +++ b/app/views/search/_search_result.html.erb | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | <div class="article_partial"> | ||
| 2 | <h2 class="headline"><%= link_to node.head.title, content_path(node.unique_path) %></h2> | ||
| 3 | <p class="excerpt"><%= node.head.abstract %></p> | ||
| 4 | </div> \ No newline at end of file | ||
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb index 4c609a3..9824b8f 100644 --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb | |||
| @@ -1,13 +1,11 @@ | |||
| 1 | <h2>Suche</h2> | ||
| 2 | |||
| 3 | <% if params[:search_term] %> | 1 | <% if params[:search_term] %> |
| 4 | <h3>Suchergebnisse für Suchbegriff: <%=h params[:search_term] %></h3> | 2 | <h2>Suchergebnisse für Suchbegriff: <%=h params[:search_term] %></h2> |
| 5 | <% end %> | 3 | <% end %> |
| 6 | 4 | ||
| 7 | <%= | 5 | <%= |
| 8 | render( | 6 | render( |
| 9 | :partial => 'custom/partials/article', | 7 | :partial => 'search_result', |
| 10 | :collection => @results, | 8 | :collection => @results, |
| 11 | :as => :page | 9 | :as => :node |
| 12 | ) | 10 | ) |
| 13 | %> \ No newline at end of file | 11 | %> \ No newline at end of file |
