Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 762 Bytes
1 | module ContentState |
2 | class Published < Base |
3 | include Singleton |
4 | |
5 | def published?(content) |
6 | true |
7 | end |
8 | |
9 | def enter_hook(content) |
10 | super |
11 | content[:published] = true |
12 | content[:published_at] ||= Time.now |
13 | end |
14 | |
15 | def change_published_state(content, boolean) |
16 | if ! boolean |
17 | content[:published] = false |
18 | content[:published_at] = nil |
19 | content.state = Factory.new(:just_withdrawn) |
20 | end |
21 | end |
22 | |
23 | def withdraw(content) |
24 | content.state = Factory.new(:just_withdrawn) |
25 | end |
26 | |
27 | def set_published_at(content, new_time) |
28 | content[:published_at] = new_time |
29 | return if new_time.nil? |
30 | if new_time > Time.now |
31 | content.state = PublicationPending.instance |
32 | end |
33 | end |
34 | end |
35 | end |