fullstack-cms 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -3,4 +3,5 @@ class PagePart < ActiveRecord::Base
3
3
  field :content, :text
4
4
  belongs_to :page
5
5
  index [:name, :page_id], :unique => true
6
+ has_many :settings, :as => :settable
6
7
  end
@@ -2,7 +2,7 @@
2
2
  <%= t.pane t('fullstack.admin.info', :default => "Info") do %>
3
3
  <%= admin_form_for [:"admin", current_resource], :html => { :multipart => true, :'data-type' => :script }, :remote => true do |f| -%>
4
4
 
5
- <%= form_errors(f) %>
5
+ <%= f.errors %>
6
6
 
7
7
  <%= f.inputs do %>
8
8
  <%= f.input :label %>
@@ -13,7 +13,7 @@
13
13
 
14
14
  <% end -%>
15
15
 
16
- <%= form_actions do %>
16
+ <%= f.actions do %>
17
17
  <%= button (current_resource.persisted? ? t('fullstack.admin.update', :default => "Update") : t('fullstack.admin.create', :default => "Create")), :type => :primary, :size => :large %>
18
18
  <% end %>
19
19
 
@@ -70,7 +70,7 @@
70
70
 
71
71
  <% end -%>
72
72
 
73
- <%= form_actions do %>
73
+ <%= f.actions do %>
74
74
  <%= button t('fullstack.admin.add_link', :default => "Add Link"), :type => :primary %>
75
75
  <% end %>
76
76
 
@@ -11,7 +11,7 @@
11
11
  <%= f.input :uid %>
12
12
  <% end -%>
13
13
 
14
- <%= form_actions do %>
14
+ <%= f.actions do %>
15
15
  <%= button (current_resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
16
16
  <% end %>
17
17
 
@@ -9,7 +9,7 @@
9
9
  <%= f.input :content, :label => false, :input_html => { :class => "markup-ckeditor", :id => "page_part_#{part.id}_content" } %>
10
10
  <% end -%>
11
11
 
12
- <%= form_actions do %>
12
+ <%= f.actions do %>
13
13
  <%= button (current_resource.persisted? ? _("Update") : _("Create")),
14
14
  :type => :primary, :size => :large %>
15
15
  <%= link_to _("Delete"), [:admin, page, part], :data => {:method => "delete", :remote => true, :confirm => _("Are you sure?") }, :class => "btn btn-large btn-danger" %>
@@ -19,8 +19,8 @@
19
19
  <% end %>
20
20
 
21
21
 
22
- <%= form_actions do %>
23
- <%= resource_submit(current_resource) %>
22
+ <%= f.actions do %>
23
+ <%= f.resource_submit(current_resource) %>
24
24
  <% end %>
25
25
 
26
26
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fullstack-cms"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-08-14"
12
+ s.date = "2012-08-15"
13
13
  s.description = "CMS system built on fullstack"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
25
25
  "app/controllers/admin/menus_controller.rb",
26
26
  "app/controllers/admin/page_parts_controller.rb",
27
27
  "app/controllers/admin/pages_controller.rb",
28
- "app/controllers/admin/posts_controller.rb",
29
28
  "app/controllers/admin/settings_controller.rb",
30
29
  "app/controllers/admin/tags_controller.rb",
31
30
  "app/controllers/admin/users_controller.rb",
@@ -62,6 +61,7 @@ Gem::Specification.new do |s|
62
61
  "fullstack-cms.gemspec",
63
62
  "lib/fullstack-cms.rb",
64
63
  "lib/fullstack/cms.rb",
64
+ "lib/fullstack/cms/configuration.rb",
65
65
  "lib/fullstack/cms/engine.rb",
66
66
  "lib/generators/fullstack/cms/install_generator.rb",
67
67
  "lib/generators/fullstack/cms/locale_generator.rb",
@@ -35,6 +35,7 @@ require "sitemap"
35
35
  require "whenever"
36
36
 
37
37
  require 'fullstack/cms/engine'
38
+ require 'fullstack/cms/configuration'
38
39
 
39
40
  module Fullstack
40
41
  module Cms
@@ -0,0 +1,21 @@
1
+ require 'ostruct'
2
+
3
+ module Fullstack
4
+ module Cms
5
+
6
+ def config
7
+ @config ||= OpenStruct.new
8
+ @config.resources ||= []
9
+ @config.linkables ||= []
10
+ @config
11
+ end
12
+ module_function :config
13
+
14
+ def configure
15
+ yield(config)
16
+ config
17
+ end
18
+ module_function :configure
19
+
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullstack-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fullstack
@@ -203,7 +203,6 @@ files:
203
203
  - app/controllers/admin/menus_controller.rb
204
204
  - app/controllers/admin/page_parts_controller.rb
205
205
  - app/controllers/admin/pages_controller.rb
206
- - app/controllers/admin/posts_controller.rb
207
206
  - app/controllers/admin/settings_controller.rb
208
207
  - app/controllers/admin/tags_controller.rb
209
208
  - app/controllers/admin/users_controller.rb
@@ -240,6 +239,7 @@ files:
240
239
  - fullstack-cms.gemspec
241
240
  - lib/fullstack-cms.rb
242
241
  - lib/fullstack/cms.rb
242
+ - lib/fullstack/cms/configuration.rb
243
243
  - lib/fullstack/cms/engine.rb
244
244
  - lib/generators/fullstack/cms/install_generator.rb
245
245
  - lib/generators/fullstack/cms/locale_generator.rb
@@ -297,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
297
  version: '0'
298
298
  segments:
299
299
  - 0
300
- hash: 4559489889634268604
300
+ hash: 2444520615843304750
301
301
  required_rubygems_version: !ruby/object:Gem::Requirement
302
302
  none: false
303
303
  requirements:
@@ -1,39 +0,0 @@
1
- class Admin::PostsController < Admin::BaseController
2
- respond_to :html, :js
3
-
4
- def index
5
- @search = Post.search(params[:search])
6
- @posts = @search.page(params[:page] || 1)
7
- end
8
-
9
- def new
10
- @post = Post.new
11
- end
12
-
13
- def edit
14
- end
15
-
16
- def create
17
- @post = Post.new(params[:post])
18
-
19
- if @post.respond_to?(:author)
20
- @post.author ||= current_user
21
- end
22
-
23
- @post.save
24
- respond_with(@post)
25
- end
26
-
27
- def update
28
- @post.attributes = params[:post]
29
- @post.save
30
- respond_with(@post)
31
- end
32
-
33
- def destroy
34
- @post.destroy
35
- respond_with(@post)
36
- end
37
- end
38
-
39
-