fullstack-cms 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/page_part.rb +1 -0
- data/app/views/admin/links/_form.html.erb +2 -2
- data/app/views/admin/links/_links.html.erb +1 -1
- data/app/views/admin/menus/_form.html.erb +1 -1
- data/app/views/admin/page_parts/_tabs.html.erb +1 -1
- data/app/views/admin/settings/_form.html.erb +2 -2
- data/fullstack-cms.gemspec +3 -3
- data/lib/fullstack/cms.rb +1 -0
- data/lib/fullstack/cms/configuration.rb +21 -0
- metadata +4 -4
- data/app/controllers/admin/posts_controller.rb +0 -39
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/app/models/page_part.rb
CHANGED
@@ -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
|
-
<%=
|
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
|
-
<%=
|
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
|
|
@@ -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
|
-
<%=
|
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" %>
|
data/fullstack-cms.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "fullstack-cms"
|
8
|
-
s.version = "0.1.
|
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-
|
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",
|
data/lib/fullstack/cms.rb
CHANGED
@@ -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.
|
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-
|
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:
|
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
|
-
|