Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 377
- Log:
Various files are in the gem, but apparently not in the source distribution
on GitHub. These have been copied in from the working gem.
- Author:
- rool
- Date:
- Mon Mar 21 13:46:18 +0000 2011
- Size:
- 986 Bytes
- Properties:
- Property svn:executable is set to *
1 | class ArchivePage < Page |
2 | |
3 | description %{ |
4 | An archive page provides behavior similar to a blog archive or a news |
5 | archive. Child page URLs are altered to be in %Y/%m/%d format |
6 | (2004/05/06). |
7 | |
8 | An archive page can be used in conjunction with the "Archive Year Index", |
9 | "Archive Month Index", and "Archive Day Index" page types to create year, |
10 | month, and day indexes. |
11 | } |
12 | |
13 | def child_url(child) |
14 | date = child.published_at || Time.now |
15 | clean_url "#{ url }/#{ date.strftime '%Y/%m/%d' }/#{ child.slug }" |
16 | end |
17 | |
18 | def find_by_url(url, live = true, clean = false) |
19 | url = clean_url(url) if clean |
20 | if url =~ %r{^#{ self.url }(\d{4})(?:/(\d{2})(?:/(\d{2}))?)?/?$} |
21 | year, month, day = $1, $2, $3 |
22 | children.find_by_class_name( |
23 | case |
24 | when day |
25 | 'ArchiveDayIndexPage' |
26 | when month |
27 | 'ArchiveMonthIndexPage' |
28 | else |
29 | 'ArchiveYearIndexPage' |
30 | end |
31 | ) |
32 | else |
33 | super |
34 | end |
35 | end |
36 | end |