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:
- 752 Bytes
1 | module ContentState |
2 | class New < Base |
3 | include Singleton |
4 | |
5 | def enter_hook(content) |
6 | super |
7 | content[:published] = false |
8 | content[:published_at] = nil |
9 | end |
10 | |
11 | def before_save(content) |
12 | super |
13 | content.state = Draft.instance |
14 | end |
15 | |
16 | def change_published_state(content, boolean) |
17 | content[:published] = boolean |
18 | if boolean |
19 | content.state = JustPublished.instance |
20 | end |
21 | end |
22 | |
23 | def set_published_at(content, new_time) |
24 | content[:published_at] = new_time |
25 | return if new_time.nil? |
26 | if new_time <= Time.now |
27 | content.state = JustPublished.instance |
28 | else |
29 | content.state = PublicationPending.instance |
30 | end |
31 | end |
32 | |
33 | def draft? |
34 | true |
35 | end |
36 | end |
37 | end |