Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1492 Bytes
1 | class Admin::PagesController < Admin::ResourceController |
2 | before_filter :initialize_meta_rows_and_buttons, :only => [:new, :edit, :create, :update] |
3 | before_filter :count_deleted_pages, :only => [:destroy] |
4 | |
5 | responses do |r| |
6 | r.plural.js do |
7 | @level = params[:level].to_i |
8 | @template_name = 'index' |
9 | response.headers['Content-Type'] = 'text/html;charset=utf-8' |
10 | render :action => 'children.html.haml', :layout => false |
11 | end |
12 | end |
13 | |
14 | def index |
15 | @homepage = Page.find_by_parent_id(nil) |
16 | response_for :plural |
17 | end |
18 | |
19 | def new |
20 | self.model = model_class.new_with_defaults(config) |
21 | if params[:page_id].blank? |
22 | self.model.slug = '/' |
23 | end |
24 | response_for :singular |
25 | end |
26 | |
27 | private |
28 | def model_class |
29 | if params[:page_id] |
30 | Page.find(params[:page_id]).children |
31 | else |
32 | Page |
33 | end |
34 | end |
35 | |
36 | def count_deleted_pages |
37 | @count = model.children.count + 1 |
38 | end |
39 | |
40 | def initialize_meta_rows_and_buttons |
41 | @buttons_partials ||= [] |
42 | @meta ||= [] |
43 | @meta << {:field => "slug", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 100}]} |
44 | @meta << {:field => "breadcrumb", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 160}]} |
45 | @meta << {:field => "description", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 200}]} |
46 | @meta << {:field => "keywords", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 200}]} |
47 | end |
48 | end |