Sha256: 69c9b81e538b783b70168894088453200954f056f16be897157bdd235ff09d86
Contents?: true
Size: 989 Bytes
Versions: 2
Compression:
Stored size: 989 Bytes
Contents
# = Simple Articles part. # #-- # code: # George Moschovitis <gm@navel.gr> # # (c) 2004 Navel, all rights reserved. # $Id: part.rb 87 2004-10-19 17:27:45Z gmosx $ #++ require "articles/lc-en" require "articles/entities" require "articles/methods" module P class Articles < N::Part extend P::ArticlesMethods # # def initialize @name = "articles" @title = "Articles" @body = "Simple articles management" @version = "$Id: part.rb 87 2004-10-19 17:27:45Z gmosx $" @path = "" super end # Updates the sitemap by attaching site specific nodes. # def sitemap n1 = N::SitePage.new "#@path/index.sx", "Articles" n2 = N::SitePage.new "#@path/add-article.sx", "Add", n1 n2 = N::SitePage.new "#@path/view-article.sx", "View", n1 end # # def rewrites $rewrites["articles"] = { /\/articles\/(.*?)\/index.sx/ => '/view-article.sx?oid=\1' } end # # def roles $roles.concat %w{articles.moderator} end end end # module a = P::Articles.instance
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.1.2 | examples/simple/lib/articles/part.rb |
nitro-0.2.0 | examples/simple/lib/articles/part.rb |