Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 13
- Log:
Initial import of Typo 2.6.0 sources from a downloaded Tarball.
Typo is a Ruby On Rails based blog engine.
- Author:
- adh
- Date:
- Sat Jul 22 22:25:02 +0100 2006
- Size:
- 863 Bytes
1 | require_dependency 'sidebars/sidebar_controller' |
2 | |
3 | class Sidebar < ActiveRecord::Base |
4 | # acts_as_list |
5 | serialize :active_config |
6 | serialize :staged_config |
7 | |
8 | def self.find_all_visible |
9 | find :all, :conditions => 'active_position is not null', :order => 'active_position' |
10 | end |
11 | |
12 | def self.find_all_staged |
13 | find :all, :conditions => 'staged_position is not null', :order => 'staged_position' |
14 | end |
15 | |
16 | def self.purge |
17 | delete_all('active_position is null and staged_position is null') |
18 | end |
19 | |
20 | def publish |
21 | self.active_config=self.staged_config |
22 | self.active_position=self.staged_position |
23 | end |
24 | |
25 | def sidebar_controller |
26 | @sidebar_controller||=Sidebars::SidebarController.available_sidebars.find { |s| s.short_name == self.controller } |
27 | end |
28 | |
29 | def active_config |
30 | self[:active_config]||{} |
31 | end |
32 | |
33 | def html_id |
34 | controller+'-'+id.to_s |
35 | end |
36 | end |