From 7cd48a402bc72a7e4ac8539bae8b6621b623298f Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Tue, 25 Sep 2007 16:49:39 +0000 Subject: [PATCH] ActionItem70: adding placeholder for view action in category_controller --- app/controllers/public/category_controller.rb | 8 ++++---- app/views/category/view.rhtml | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 app/views/category/view.rhtml diff --git a/app/controllers/public/category_controller.rb b/app/controllers/public/category_controller.rb index 564e6c5..f891e30 100644 --- a/app/controllers/public/category_controller.rb +++ b/app/controllers/public/category_controller.rb @@ -4,14 +4,14 @@ class CategoryController < ApplicationController def load_category path = params[:path].join('/') @category = environment.categories.find_by_path(path) - end - - # list categories - def index + if @category.nil? + render :text => ('No such category (%s).' % path), :status => 404 + end end # view the summary of one category def view + # TODO: load articles, documents, etc so the view can list them. end end diff --git a/app/views/category/view.rhtml b/app/views/category/view.rhtml new file mode 100644 index 0000000..f3497a9 --- /dev/null +++ b/app/views/category/view.rhtml @@ -0,0 +1,8 @@ +

<%= _('Category: %s') % @category.full_name %>

+ +<%# FIXME %> +

+This page will list everything (articles, documents, photos, etc) that is +related to <%= @category.full_name %>. Actually generating this content is not +implement yet, though. +

-- libgit2 0.21.2