diff options
| author | hukl <contact@smyck.org> | 2009-03-02 20:29:25 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-03 19:47:18 +0100 |
| commit | 82f16e71d49350c1ad4aa48773db5d0f45a55c6c (patch) | |
| tree | 72a341b68e2b1f35772e11add0bef7208e9b90b6 /app/views/custom | |
| parent | c9183349c2fbacf24fca5cd7767190d069ce8873 (diff) | |
introducing page templates - need to add edit capabilities
renamed the custom template folder
forgot one fix for the new custom template path
page templates refined
renamed page attribute template to template_name as i suspected it to be a reserved word. it still didn't work until i discovered that simon defined the accessible attributes! That costed me 40 minutes of lifetime. But he apologized ;)
tests for public and custom page templates
Diffstat (limited to 'app/views/custom')
3 files changed, 16 insertions, 0 deletions
diff --git a/app/views/custom/page_templates/public/no_date_and_author.html.erb b/app/views/custom/page_templates/public/no_date_and_author.html.erb new file mode 100644 index 0000000..4eda744 --- /dev/null +++ b/app/views/custom/page_templates/public/no_date_and_author.html.erb | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <div class="article"> | ||
| 2 | <h2><%= @page.title %></h2> | ||
| 3 | <hr class="subtitle" /> | ||
| 4 | <p><em><%= @page.abstract %></em></p> | ||
| 5 | <%= aggregate?(@page.body) %> | ||
| 6 | </div> \ No newline at end of file | ||
diff --git a/app/views/custom/page_templates/public/render_page.html.erb b/app/views/custom/page_templates/public/render_page.html.erb new file mode 100644 index 0000000..4c21667 --- /dev/null +++ b/app/views/custom/page_templates/public/render_page.html.erb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <div class="article"> | ||
| 2 | <h2><%= @page.title %></h2> | ||
| 3 | <h3><%= date_for_page @page %>, <%= @page.user.try(:login) %></h3> | ||
| 4 | <hr class="subtitle" /> | ||
| 5 | <p><em><%= @page.abstract %></em></p> | ||
| 6 | <%= aggregate?(@page.body) %> | ||
| 7 | </div> \ No newline at end of file | ||
diff --git a/app/views/custom/partials/_sidebar_title_only.html.erb b/app/views/custom/partials/_sidebar_title_only.html.erb new file mode 100644 index 0000000..819d9ae --- /dev/null +++ b/app/views/custom/partials/_sidebar_title_only.html.erb | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | <h2 class="sidebar_headline"> | ||
| 2 | <%= page.title %> | ||
| 3 | </h2> \ No newline at end of file | ||
