Commit 7cd48a402bc72a7e4ac8539bae8b6621b623298f
1 parent
745e4178
Exists in
master
and in
29 other branches
ActionItem70: adding placeholder for view action in category_controller
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@535 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
12 additions
and
4 deletions
Show diff stats
app/controllers/public/category_controller.rb
@@ -4,14 +4,14 @@ class CategoryController < ApplicationController | @@ -4,14 +4,14 @@ class CategoryController < ApplicationController | ||
4 | def load_category | 4 | def load_category |
5 | path = params[:path].join('/') | 5 | path = params[:path].join('/') |
6 | @category = environment.categories.find_by_path(path) | 6 | @category = environment.categories.find_by_path(path) |
7 | - end | ||
8 | - | ||
9 | - # list categories | ||
10 | - def index | 7 | + if @category.nil? |
8 | + render :text => ('No such category (%s).' % path), :status => 404 | ||
9 | + end | ||
11 | end | 10 | end |
12 | 11 | ||
13 | # view the summary of one category | 12 | # view the summary of one category |
14 | def view | 13 | def view |
14 | + # TODO: load articles, documents, etc so the view can list them. | ||
15 | end | 15 | end |
16 | 16 | ||
17 | end | 17 | end |
@@ -0,0 +1,8 @@ | @@ -0,0 +1,8 @@ | ||
1 | +<h2><%= _('Category: %s') % @category.full_name %></h2> | ||
2 | + | ||
3 | +<%# FIXME %> | ||
4 | +<p> | ||
5 | +This page will list everything (articles, documents, photos, etc) that is | ||
6 | +related to <%= @category.full_name %>. Actually generating this content is not | ||
7 | +implement yet, though. | ||
8 | +</p> |