From 82f16e71d49350c1ad4aa48773db5d0f45a55c6c Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 2 Mar 2009 20:29:25 +0100 Subject: 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 --- app/views/custom/page_templates/public/no_date_and_author.html.erb | 6 ++++++ app/views/custom/page_templates/public/render_page.html.erb | 7 +++++++ app/views/custom/partials/_sidebar_title_only.html.erb | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 app/views/custom/page_templates/public/no_date_and_author.html.erb create mode 100644 app/views/custom/page_templates/public/render_page.html.erb create mode 100644 app/views/custom/partials/_sidebar_title_only.html.erb (limited to 'app/views/custom') 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 @@ +
+

<%= @page.title %>

+
+

<%= @page.abstract %>

+ <%= aggregate?(@page.body) %> +
\ 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 @@ +
+

<%= @page.title %>

+

<%= date_for_page @page %>, <%= @page.user.try(:login) %>

+
+

<%= @page.abstract %>

+ <%= aggregate?(@page.body) %> +
\ 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 @@ + \ No newline at end of file -- cgit v1.3