Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 4
- Log:
Initial import of Radiant 0.50 sources from a downloaded Tarball.
Radiant is a Ruby On Rails based lightweight content management
system.
- Author:
- adh
- Date:
- Sat Jul 22 16:47:40 +0100 2006
- Size:
- 1279 Bytes
1 | module ArchiveIndexBehaviorTagsAndMethods |
2 | def self.included(base) |
3 | base.module_eval do |
4 | define_tags do |
5 | url = request.request_uri unless request.nil? |
6 | |
7 | tag "archive" do |tag| |
8 | tag.expand |
9 | end |
10 | |
11 | year, month, day = $1, $2, $3 if url =~ %r{/(\d{4})(?:/(\d{2})(?:/(\d{2}))?)?/?$} |
12 | |
13 | tag "title" do |tag| |
14 | page = tag.locals.page |
15 | if year |
16 | Date.new((year || 1).to_i, (month || 1).to_i, (day || 1).to_i).strftime(page.title) |
17 | else |
18 | page.title |
19 | end |
20 | end |
21 | |
22 | tag "archive:year" do |tag| |
23 | year unless year.nil? |
24 | end |
25 | |
26 | tag "archive:month" do |tag| |
27 | Date.new(year.to_i, month.to_i, 1).strftime('%B') rescue '' |
28 | end |
29 | |
30 | tag "archive:day" do |tag| |
31 | day.to_i unless day.nil? |
32 | end |
33 | |
34 | tag "archive:day_of_week" do |tag| |
35 | Date.new(year.to_i, month.to_i, day.to_i).strftime('%A') rescue '' |
36 | end |
37 | |
38 | tag("archive:children:first") { "unimplemented" } |
39 | tag("archive:children:last" ) { "unimplemented" } |
40 | tag("archive:children:count") { "unimplemented" } |
41 | end |
42 | |
43 | def page_virtual? |
44 | true |
45 | end |
46 | end |
47 | end |
48 | end |