constructor-cms 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 571fd74b1bd89337a17d2e1e70aa967c5ee28eec
4
- data.tar.gz: b859c56db058feae39e675daa6ba39e93629bccb
3
+ metadata.gz: da8c809a6dddeccc02e5e7abb488cbc025b84e67
4
+ data.tar.gz: 44ac8ca7e862722fabc023250046b747ca3ec6e9
5
5
  SHA512:
6
- metadata.gz: 951dbce4a3f981c4b3fb1b87af9940a1a85f11315ac7715d459fc4bd0743d97c7ddb69ea896f80292f12405da469501de92135d5ad8a08f581c1ca99271dd41e
7
- data.tar.gz: 0735abb8f95a3c2edebcbe6cedbcabb5489f16cbd4b9fd7f5048d04e09e0aa9ba857163fa00867eb84daf07a6a1fff222627becf5d1be169fec98b6042a446d6
6
+ metadata.gz: 86e279a27b10a7f6595d61e938e0388af39b62e1a9d541724646c06f467aaa6ffab87d319cc9c3de304b772efe94cbeb7893b39cb6f5d3fdca826e246ee0f9ad
7
+ data.tar.gz: eff1f1deaf4b171f78088c37b6c73bb3e822fd3af00a37caf484f38b6822d356820ad654f288790a2714ab4a6254127ce28251921da43f21229e508bfae97058
data/README.md CHANGED
@@ -12,7 +12,7 @@ Constructor – an open source Ruby on Rails content management system for Rails
12
12
 
13
13
  ### Add to Gemfile
14
14
 
15
- gem 'constructor-cms', '~> 0.8.4'
15
+ gem 'constructor-cms', '~> 0.8.5'
16
16
 
17
17
  ### Install
18
18
 
@@ -0,0 +1,93 @@
1
+ = form_for @page, html: {multipart: @page.multipart?} do |f|
2
+ - if @page.errors.any?
3
+ .row-fluid
4
+ .alert.alert-error.fade.in.span12
5
+ = link_to '×', '#', class: 'close', 'data-dismiss' => 'alert'
6
+ - @page.errors.full_messages.each do |m|
7
+ = m
8
+ This page show edit with template
9
+ .form-horizontal
10
+ .control-group
11
+ = f.label :active, class: 'control-label'
12
+ .controls= f.check_box :active, class: 'span6'
13
+
14
+ .control-group
15
+ = f.label :name, class: 'control-label'
16
+ .controls= f.text_field :name, class: 'span4'
17
+
18
+ .control-group.auto_url
19
+ = f.label :auto_url, class: 'control-label'
20
+ .controls
21
+ = f.check_box :auto_url, class: 'span9'
22
+
23
+ .control-group.url
24
+ = f.label :url, class: 'control-label'
25
+ .controls
26
+ .full_url
27
+ %span.path>= @page.parent.full_url if @page.parent
28
+ \/
29
+ %span.address>= @page.url
30
+ = f.text_field :url, class: 'span3'
31
+ %i.address_icon.icon-pencil
32
+
33
+ = render partial: 'field', collection: @page.fields
34
+
35
+ .accordion
36
+ .accordion-group
37
+ .accordion-heading.text-center
38
+ = link_to t(:settings), '#collapse', class: 'accordion-toggle', 'data-toggle' => 'collapse'
39
+ .accordion-body.in.collapse#collapse
40
+ .accordion-inner
41
+ .control-group
42
+ = f.label :parent_id, class: 'control-label'
43
+ .controls
44
+ = f.select :parent_id, options_for_select(for_select(@pages, true), selected: @parent_id), disabled: @page.self_and_descendants.map(&:id), include_blank: t(:no)
45
+
46
+ .control-group
47
+ = f.label :template_id, :class => 'control-label'
48
+ .controls
49
+ = f.select :template_id, options_for_select(templates, selected: @template_id)
50
+ .control-group
51
+ = f.label :link, class: 'control-label'
52
+ .controls
53
+ = f.text_field :link, class: 'span9'
54
+ .control-group
55
+ %label.control-label=t :display_in
56
+ .controls
57
+ %label.checkbox.inline.span2{for: 'in_menu'}
58
+ = f.check_box :in_menu
59
+ =t :menu
60
+
61
+ %label.checkbox.inline.span2{for: 'in_map'}
62
+ = f.check_box :in_map
63
+ =t :sitemap
64
+
65
+ %label.checkbox.inline.span2{for: 'in_nav'}
66
+ = f.check_box :in_nav
67
+ =t :breadcrumbs
68
+
69
+ .accordion
70
+ .accordion-group
71
+ .accordion-heading.text-center
72
+ = link_to t(:seo), '#collapse-three', class: 'accordion-toggle', 'data-toggle' => 'collapse'
73
+ .accordion-body.in.collapse#collapse-three
74
+ .accordion-inner
75
+ .control-group
76
+ = f.label :title, class: 'control-label'
77
+ .controls
78
+ = f.text_field :title, class: 'span9'
79
+ .control-group
80
+ = f.label :keywords, class: 'control-label'
81
+ .controls
82
+ = f.text_field :keywords, class: 'span9'
83
+ .control-group
84
+ = f.label :description, class: 'control-label'
85
+ .controls
86
+ = f.text_area :description, class: 'span9', rows: 8
87
+
88
+ .row-fluid
89
+ .span12
90
+ .form-actions
91
+ = f.submit class: 'btn btn-primary'
92
+ = link_to t(:cancel), pages_url, class: 'btn'
93
+ = link_to t(:delete_page), @page, method: :delete, data: {confirm: t(:are_you_sure?)}, class: 'btn btn-danger pull-right' unless @page.new_record?
@@ -9,17 +9,17 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20130609103268) do
14
+ ActiveRecord::Schema.define(version: 20130707103916) do
15
15
 
16
- create_table "constructor_core_users", :force => true do |t|
17
- t.string "email", :default => "", :null => false
18
- t.string "encrypted_password", :default => "", :null => false
16
+ create_table "constructor_core_users", force: true do |t|
17
+ t.string "email", default: "", null: false
18
+ t.string "encrypted_password", default: "", null: false
19
19
  t.string "reset_password_token"
20
20
  t.datetime "reset_password_sent_at"
21
21
  t.datetime "remember_created_at"
22
- t.integer "sign_in_count", :default => 0
22
+ t.integer "sign_in_count", default: 0
23
23
  t.datetime "current_sign_in_at"
24
24
  t.datetime "last_sign_in_at"
25
25
  t.string "current_sign_in_ip"
@@ -27,114 +27,115 @@ ActiveRecord::Schema.define(:version => 20130609103268) do
27
27
  t.string "authentication_token"
28
28
  end
29
29
 
30
- add_index "constructor_core_users", ["email"], :name => "index_constructor_core_users_on_email", :unique => true
31
- add_index "constructor_core_users", ["reset_password_token"], :name => "index_constructor_core_users_on_reset_password_token", :unique => true
30
+ add_index "constructor_core_users", ["email"], name: "index_constructor_core_users_on_email", unique: true
31
+ add_index "constructor_core_users", ["reset_password_token"], name: "index_constructor_core_users_on_reset_password_token", unique: true
32
32
 
33
- create_table "constructor_pages_boolean_types", :force => true do |t|
34
- t.boolean "value", :default => false
33
+ create_table "constructor_pages_boolean_types", force: true do |t|
34
+ t.boolean "value", default: false
35
35
  t.integer "field_id"
36
36
  t.integer "page_id"
37
- t.datetime "created_at", :null => false
38
- t.datetime "updated_at", :null => false
37
+ t.datetime "created_at"
38
+ t.datetime "updated_at"
39
39
  end
40
40
 
41
- create_table "constructor_pages_date_types", :force => true do |t|
42
- t.date "value", :default => '2013-06-09'
41
+ create_table "constructor_pages_date_types", force: true do |t|
42
+ t.date "value", default: '2013-07-07'
43
43
  t.integer "field_id"
44
44
  t.integer "page_id"
45
- t.datetime "created_at", :null => false
46
- t.datetime "updated_at", :null => false
45
+ t.datetime "created_at"
46
+ t.datetime "updated_at"
47
47
  end
48
48
 
49
- create_table "constructor_pages_fields", :force => true do |t|
49
+ create_table "constructor_pages_fields", force: true do |t|
50
50
  t.string "name"
51
51
  t.string "code_name"
52
52
  t.string "type_value"
53
53
  t.integer "position"
54
54
  t.integer "template_id"
55
- t.datetime "created_at", :null => false
56
- t.datetime "updated_at", :null => false
55
+ t.datetime "created_at"
56
+ t.datetime "updated_at"
57
57
  end
58
58
 
59
- create_table "constructor_pages_float_types", :force => true do |t|
60
- t.float "value", :default => 0.0
59
+ create_table "constructor_pages_float_types", force: true do |t|
60
+ t.float "value", default: 0.0
61
61
  t.integer "field_id"
62
62
  t.integer "page_id"
63
- t.datetime "created_at", :null => false
64
- t.datetime "updated_at", :null => false
63
+ t.datetime "created_at"
64
+ t.datetime "updated_at"
65
65
  end
66
66
 
67
- create_table "constructor_pages_html_types", :force => true do |t|
68
- t.text "value", :limit => 4294967295, :default => ""
67
+ create_table "constructor_pages_html_types", force: true do |t|
68
+ t.text "value", limit: 4294967295, default: ""
69
69
  t.integer "field_id"
70
70
  t.integer "page_id"
71
- t.datetime "created_at", :null => false
72
- t.datetime "updated_at", :null => false
71
+ t.datetime "created_at"
72
+ t.datetime "updated_at"
73
73
  end
74
74
 
75
- create_table "constructor_pages_image_types", :force => true do |t|
75
+ create_table "constructor_pages_image_types", force: true do |t|
76
76
  t.string "value_uid"
77
77
  t.string "value_name"
78
78
  t.integer "field_id"
79
79
  t.integer "page_id"
80
- t.datetime "created_at", :null => false
81
- t.datetime "updated_at", :null => false
80
+ t.datetime "created_at"
81
+ t.datetime "updated_at"
82
82
  end
83
83
 
84
- create_table "constructor_pages_integer_types", :force => true do |t|
85
- t.integer "value", :default => 0
84
+ create_table "constructor_pages_integer_types", force: true do |t|
85
+ t.integer "value", default: 0
86
86
  t.integer "field_id"
87
87
  t.integer "page_id"
88
- t.datetime "created_at", :null => false
89
- t.datetime "updated_at", :null => false
88
+ t.datetime "created_at"
89
+ t.datetime "updated_at"
90
90
  end
91
91
 
92
- create_table "constructor_pages_pages", :force => true do |t|
93
- t.boolean "active", :default => true
94
- t.string "name", :default => ""
95
- t.boolean "auto_url", :default => true
96
- t.string "full_url", :default => ""
97
- t.string "url", :default => ""
98
- t.string "link", :default => ""
99
- t.string "title", :default => ""
100
- t.string "keywords", :default => ""
101
- t.text "description", :limit => 4294967295, :default => ""
102
- t.boolean "in_menu", :default => true
103
- t.boolean "in_nav", :default => true
104
- t.boolean "in_map", :default => true
92
+ create_table "constructor_pages_pages", force: true do |t|
93
+ t.boolean "active", default: true
94
+ t.string "name", default: ""
95
+ t.boolean "auto_url", default: true
96
+ t.string "full_url", default: ""
97
+ t.string "url", default: ""
98
+ t.string "link", default: ""
99
+ t.string "title", default: ""
100
+ t.string "keywords", default: ""
101
+ t.text "description", limit: 4294967295, default: ""
102
+ t.boolean "in_menu", default: true
103
+ t.boolean "in_nav", default: true
104
+ t.boolean "in_map", default: true
105
105
  t.integer "parent_id"
106
106
  t.integer "lft"
107
107
  t.integer "rgt"
108
108
  t.integer "template_id"
109
- t.datetime "created_at", :null => false
110
- t.datetime "updated_at", :null => false
109
+ t.datetime "created_at"
110
+ t.datetime "updated_at"
111
+ t.boolean "in_url", default: true
111
112
  end
112
113
 
113
- create_table "constructor_pages_string_types", :force => true do |t|
114
- t.string "value", :default => ""
114
+ create_table "constructor_pages_string_types", force: true do |t|
115
+ t.string "value", default: ""
115
116
  t.integer "field_id"
116
117
  t.integer "page_id"
117
- t.datetime "created_at", :null => false
118
- t.datetime "updated_at", :null => false
118
+ t.datetime "created_at"
119
+ t.datetime "updated_at"
119
120
  end
120
121
 
121
- create_table "constructor_pages_templates", :force => true do |t|
122
+ create_table "constructor_pages_templates", force: true do |t|
122
123
  t.string "name"
123
124
  t.string "code_name"
124
125
  t.integer "parent_id"
125
126
  t.integer "child_id"
126
127
  t.integer "lft"
127
128
  t.integer "rgt"
128
- t.datetime "created_at", :null => false
129
- t.datetime "updated_at", :null => false
129
+ t.datetime "created_at"
130
+ t.datetime "updated_at"
130
131
  end
131
132
 
132
- create_table "constructor_pages_text_types", :force => true do |t|
133
- t.text "value", :limit => 4294967295, :default => ""
133
+ create_table "constructor_pages_text_types", force: true do |t|
134
+ t.text "value", limit: 4294967295, default: ""
134
135
  t.integer "field_id"
135
136
  t.integer "page_id"
136
- t.datetime "created_at", :null => false
137
- t.datetime "updated_at", :null => false
137
+ t.datetime "created_at"
138
+ t.datetime "updated_at"
138
139
  end
139
140
 
140
141
  end
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,9 @@ ENV["RAILS_ENV"] ||= 'test'
2
2
 
3
3
  require 'simplecov'
4
4
  require 'coveralls'
5
+ require 'factory_girl_rails'
6
+
7
+ #FactoryGirl.definition_file_paths << File.expand_path("../../../pages/spec")
5
8
 
6
9
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
10
  SimpleCov::Formatter::HTMLFormatter,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constructor-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-01 00:00:00.000000000 Z
11
+ date: 2013-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: constructor-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.4
19
+ version: 0.8.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.4
26
+ version: 0.8.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: constructor-pages
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.8.4
33
+ version: 0.8.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.8.4
40
+ version: 0.8.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: factory_girl_rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Constructor – content management system
98
112
  email: ivanzotov@gmail.com
99
113
  executables: []
@@ -114,10 +128,10 @@ files:
114
128
  - spec/dummy/app/helpers/application_helper.rb
115
129
  - spec/dummy/app/mailers/.gitkeep
116
130
  - spec/dummy/app/models/.gitkeep
131
+ - spec/dummy/app/views/home_pages/show.haml
117
132
  - spec/dummy/app/views/layouts/application.haml
118
- - spec/dummy/app/views/templates/.keep
119
- - spec/dummy/app/views/templates/home_page.haml
120
- - spec/dummy/app/views/templates/page.haml
133
+ - spec/dummy/app/views/pages/edit.haml
134
+ - spec/dummy/app/views/pages/show.haml
121
135
  - spec/dummy/bin/bundle
122
136
  - spec/dummy/bin/rails
123
137
  - spec/dummy/bin/rake
@@ -181,10 +195,10 @@ test_files:
181
195
  - spec/dummy/app/helpers/application_helper.rb
182
196
  - spec/dummy/app/mailers/.gitkeep
183
197
  - spec/dummy/app/models/.gitkeep
198
+ - spec/dummy/app/views/home_pages/show.haml
184
199
  - spec/dummy/app/views/layouts/application.haml
185
- - spec/dummy/app/views/templates/.keep
186
- - spec/dummy/app/views/templates/home_page.haml
187
- - spec/dummy/app/views/templates/page.haml
200
+ - spec/dummy/app/views/pages/edit.haml
201
+ - spec/dummy/app/views/pages/show.haml
188
202
  - spec/dummy/bin/bundle
189
203
  - spec/dummy/bin/rails
190
204
  - spec/dummy/bin/rake
File without changes