diff options
| author | hukl <contact@smyck.org> | 2009-11-15 14:31:52 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-11-15 14:31:52 +0100 |
| commit | 1de97a5ac6f4621f8013d6f73c6c9edfae445b70 (patch) | |
| tree | ee500916af41898ff2ecaf5c8567acf7cfd0f867 /app/views | |
| parent | 713f8f76e2ae1635bb938de6d8c74587d842790f (diff) | |
removed date and author from the standard template and introduced a dedicated update template which will get auto assigned if a node is created under updates/<year>/<slug>
Added tests and convenient method
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/custom/page_templates/public/standard_template.html.erb | 1 | ||||
| -rw-r--r-- | app/views/custom/page_templates/public/update.html.erb | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/views/custom/page_templates/public/standard_template.html.erb b/app/views/custom/page_templates/public/standard_template.html.erb index 5ea277a..8000af5 100644 --- a/app/views/custom/page_templates/public/standard_template.html.erb +++ b/app/views/custom/page_templates/public/standard_template.html.erb | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | <div class="article"> | 1 | <div class="article"> |
| 2 | <h2 class="headline"><%= @page.title %></h2> | 2 | <h2 class="headline"><%= @page.title %></h2> |
| 3 | <div class="author_and_date"><%= date_for_page @page %>, <%= @page.user.try(:login) %></div> | ||
| 4 | <div class="abstract"><p><%= sanitize( @page.abstract )%></p></div> | 3 | <div class="abstract"><p><%= sanitize( @page.abstract )%></p></div> |
| 5 | <div id="headline_image"><%= headline_image %></div> | 4 | <div id="headline_image"><%= headline_image %></div> |
| 6 | <div class="body"><%= aggregate?(@page.body) %></div> | 5 | <div class="body"><%= aggregate?(@page.body) %></div> |
diff --git a/app/views/custom/page_templates/public/update.html.erb b/app/views/custom/page_templates/public/update.html.erb new file mode 100644 index 0000000..5ea277a --- /dev/null +++ b/app/views/custom/page_templates/public/update.html.erb | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <div class="article"> | ||
| 2 | <h2 class="headline"><%= @page.title %></h2> | ||
| 3 | <div class="author_and_date"><%= date_for_page @page %>, <%= @page.user.try(:login) %></div> | ||
| 4 | <div class="abstract"><p><%= sanitize( @page.abstract )%></p></div> | ||
| 5 | <div id="headline_image"><%= headline_image %></div> | ||
| 6 | <div class="body"><%= aggregate?(@page.body) %></div> | ||
| 7 | </div> | ||
| 8 | |||
| 9 | <%= will_paginate(@content_collection) if @content_collection %> \ No newline at end of file | ||
