alchemy_cms 2.3.2 → 2.4.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -2
- data/.travis.yml +1 -5
- data/Gemfile +4 -4
- data/README.md +22 -15
- data/alchemy_cms.gemspec +38 -38
- data/app/assets/javascripts/alchemy/alchemy.base.js +2 -2
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +31 -0
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +24 -15
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +9 -3
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +2 -2
- data/app/assets/javascripts/alchemy/alchemy.js +1 -0
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +4 -12
- data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +32 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js +4 -4
- data/app/assets/stylesheets/alchemy/_defaults.scss +0 -1
- data/app/assets/stylesheets/alchemy/alchemy.css +2 -1
- data/app/assets/stylesheets/alchemy/base.css.scss +2 -54
- data/app/assets/stylesheets/alchemy/elements.css.scss +8 -5
- data/app/assets/stylesheets/alchemy/errors.css.scss +51 -0
- data/app/assets/stylesheets/alchemy/flash.css.scss +0 -2
- data/app/assets/stylesheets/alchemy/form_elements.css.scss +31 -75
- data/app/assets/stylesheets/alchemy/icons.css.scss +5 -5
- data/app/assets/stylesheets/alchemy/menubar.css.scss +0 -2
- data/app/assets/stylesheets/alchemy/sitemap.css.scss +0 -1
- data/app/assets/stylesheets/alchemy/tables.css.scss +3 -1
- data/app/controllers/alchemy/admin/base_controller.rb +19 -12
- data/app/controllers/alchemy/admin/elements_controller.rb +52 -24
- data/app/controllers/alchemy/admin/pages_controller.rb +11 -5
- data/app/controllers/alchemy/admin/resources_controller.rb +3 -4
- data/app/controllers/alchemy/admin/users_controller.rb +1 -0
- data/app/controllers/alchemy/base_controller.rb +34 -8
- data/app/controllers/alchemy/pictures_controller.rb +16 -1
- data/app/controllers/alchemy/user_sessions_controller.rb +6 -1
- data/app/helpers/alchemy/base_helper.rb +14 -0
- data/app/helpers/alchemy/elements_helper.rb +10 -5
- data/app/helpers/alchemy/pages_helper.rb +1 -2
- data/app/helpers/alchemy/url_helper.rb +43 -24
- data/app/models/alchemy/element.rb +23 -16
- data/app/models/alchemy/page.rb +25 -14
- data/app/models/alchemy/picture.rb +24 -0
- data/app/views/alchemy/admin/contents/create.js.erb +1 -1
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -1
- data/app/views/alchemy/admin/elements/create.js.erb +11 -3
- data/app/views/alchemy/admin/elements/fold.js.erb +1 -1
- data/app/views/alchemy/admin/elements/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/update.js.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
- data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/configure.html.erb +10 -6
- data/app/views/alchemy/admin/pages/configure_external.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +1 -2
- data/app/views/alchemy/admin/pages/new.html.erb +2 -2
- data/app/views/alchemy/admin/pages/update.js.erb +10 -2
- data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +5 -5
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +2 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +2 -1
- data/app/views/alchemy/admin/pictures/show_in_window.html.erb +3 -2
- data/app/views/alchemy/admin/resources/_form.html.erb +1 -1
- data/app/views/alchemy/admin/users/_table.html.erb +4 -4
- data/app/views/alchemy/admin/users/edit.html.erb +1 -1
- data/app/views/alchemy/admin/users/new.html.erb +1 -1
- data/app/views/alchemy/base/error_notice.js.erb +1 -1
- data/app/views/alchemy/base/remote_errors.js.erb +2 -3
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +10 -7
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +24 -21
- data/app/views/layouts/alchemy/admin.html.erb +9 -31
- data/bin/alchemy +20 -24
- data/config/alchemy/config.yml +6 -0
- data/config/alchemy/page_layouts.yml +2 -0
- data/config/authorization_rules.rb +1 -1
- data/config/locales/alchemy.de.yml +3 -0
- data/config/locales/alchemy.en.yml +4 -1
- data/db/migrate/20121026100815_alchemy_two_point_three.rb +312 -0
- data/lib/alchemy/mount_point.rb +9 -3
- data/lib/alchemy/page_layout.rb +89 -73
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb +45 -12
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +3 -1
- data/lib/rails/generators/alchemy/essence/essence_generator.rb +51 -0
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +18 -0
- data/lib/rails/generators/alchemy/essence/templates/view.html.erb +2 -0
- data/lib/rails/templates/alchemy.rb +1 -1
- data/lib/tasks/install.rake +57 -2
- data/spec/controllers/admin/elements_controller_spec.rb +170 -22
- data/spec/controllers/admin/trash_controller_spec.rb +1 -1
- data/spec/controllers/admin/users_controller_spec.rb +36 -0
- data/spec/controllers/base_controller_spec.rb +12 -1
- data/spec/controllers/elements_controller_spec.rb +17 -13
- data/spec/controllers/pictures_controller_spec.rb +4 -4
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/db/migrate/20121026100815_alchemy_two_point_three.rb +312 -0
- data/spec/dummy/db/migrate/20121026104128_create_events.rb +19 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/factories.rb +0 -1
- data/spec/helpers/base_helper_spec.rb +48 -0
- data/spec/helpers/elements_helper_spec.rb +14 -3
- data/spec/helpers/url_helper_spec.rb +8 -3
- data/spec/integration/picture_security_spec.rb +35 -0
- data/spec/integration/translation_integration_spec.rb +6 -5
- data/spec/models/element_spec.rb +5 -5
- data/spec/models/page_layout_spec.rb +10 -16
- data/spec/models/page_spec.rb +25 -2
- data/spec/models/picture_spec.rb +24 -2
- data/spec/routing_spec.rb +115 -115
- data/spec/support/alchemy/specs_helpers.rb +4 -4
- data/{app/assets/images/alchemy → vendor/assets/images}/Jcrop.gif +0 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +19 -243
- data/vendor/assets/javascripts/jquery_plugins/jquery.selectboxit.min.js +1 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +6 -6
- data/vendor/assets/stylesheets/jquery.Jcrop.min.css +28 -0
- metadata +48 -82
- data/app/assets/javascripts/alchemy/alchemy.buttons.js +0 -50
- data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +0 -54
- data/app/helpers/alchemy/pictures_helper.rb +0 -19
- data/db/migrate/20100607143125_create_pages.rb +0 -34
- data/db/migrate/20100607144254_create_elements.rb +0 -20
- data/db/migrate/20100607145256_create_contents.rb +0 -18
- data/db/migrate/20100607145719_create_users.rb +0 -32
- data/db/migrate/20100607150611_create_pictures.rb +0 -16
- data/db/migrate/20100607150812_create_attachments.rb +0 -16
- data/db/migrate/20100607153647_create_folded_pages.rb +0 -13
- data/db/migrate/20100607161345_create_essence_texts.rb +0 -19
- data/db/migrate/20100607162339_create_elements_pages.rb +0 -12
- data/db/migrate/20100607193638_create_essence_pictures.rb +0 -23
- data/db/migrate/20100607193646_create_essence_richtexts.rb +0 -16
- data/db/migrate/20100607193653_create_essence_htmls.rb +0 -13
- data/db/migrate/20100609111653_create_essence_dates.rb +0 -13
- data/db/migrate/20100609111809_create_essence_files.rb +0 -15
- data/db/migrate/20100609111821_create_essence_flashes.rb +0 -16
- data/db/migrate/20100609111837_create_essence_videos.rb +0 -18
- data/db/migrate/20100616150753_create_essence_audios.rb +0 -17
- data/db/migrate/20100812085225_add_crop_from_and_crop_size_to_essence_pictures.rb +0 -11
- data/db/migrate/20100909140701_change_essence_htmls_source_column_type.rb +0 -9
- data/db/migrate/20101109150312_alter_pages_visible_column_default.rb +0 -9
- data/db/migrate/20101109151812_create_languages.rb +0 -19
- data/db/migrate/20101216151419_add_language_id_to_pages.rb +0 -27
- data/db/migrate/20101216155216_add_index_to_languages.rb +0 -9
- data/db/migrate/20101216173323_add_default_to_languages.rb +0 -9
- data/db/migrate/20101218130049_add_urlname_index_to_pages.rb +0 -9
- data/db/migrate/20110115123343_remove_css_class_default_from_essence_pictures.rb +0 -11
- data/db/migrate/20110224105120_change_pages_visible_default.rb +0 -11
- data/db/migrate/20110228182659_remove_default_page_layout_from_pages.rb +0 -11
- data/db/migrate/20110414163140_remove_display_name_from_elements.rb +0 -11
- data/db/migrate/20110511100516_rename_essence_texts_title_to_link_title.rb +0 -9
- data/db/migrate/20110529130429_create_cells.rb +0 -14
- data/db/migrate/20110529130500_add_cell_id_to_elements.rb +0 -11
- data/db/migrate/20110530102804_change_pages_page_layout_column.rb +0 -11
- data/db/migrate/20110707190728_add_render_size_to_essence_pictures.rb +0 -9
- data/db/migrate/20110711142057_change_open_link_in_new_window_to_link_target.rb +0 -19
- data/db/migrate/20110919110451_add_default_role_to_users.rb +0 -9
- data/db/migrate/20111116125112_namespace_alchemy_models.rb +0 -23
- data/db/migrate/20120216135355_add_country_code_to_languages.rb +0 -9
- data/db/migrate/20120608085509_create_alchemy_essence_selects.rb +0 -11
- data/db/migrate/20120611221734_create_alchemy_essence_booleans.rb +0 -11
- data/db/migrate/20120704181529_add_upload_hash_to_alchemy_picture.rb +0 -5
- data/db/migrate/20120705214247_acts_as_taggable_on_migration.rb +0 -28
- data/db/migrate/20120728185830_add_cached_tag_list_to_alchemy_pictures.rb +0 -5
- data/db/migrate/20120831135441_set_alchemy_languages_country_code_default_to_empty_string.rb +0 -9
- data/spec/helpers/pictures_helper_spec.rb +0 -14
- data/vendor/assets/javascripts/jquery_plugins/jquery.selectBoxIt.js +0 -1909
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Alchemy::Admin::UsersController do
|
4
|
+
|
5
|
+
describe "POST update" do
|
6
|
+
|
7
|
+
let!(:user) { FactoryGirl.create(:admin_user) }
|
8
|
+
|
9
|
+
before do
|
10
|
+
activate_authlogic
|
11
|
+
Alchemy::UserSession.create user
|
12
|
+
end
|
13
|
+
|
14
|
+
it "assigns user to @user" do
|
15
|
+
post :update, :id => user.id, :user => {}, :format => :js
|
16
|
+
assigns(:user).should eq(user)
|
17
|
+
end
|
18
|
+
|
19
|
+
context "if user is permitted to update roles" do
|
20
|
+
it "updates the user including role" do
|
21
|
+
controller.stub(:permitted_to?).with(:update_role).and_return { true }
|
22
|
+
Alchemy::User.any_instance.should_receive(:update_attributes).with({'role' => 'Administrator'})
|
23
|
+
post :update, :id => user.id, :user => {:role => 'Administrator'}, :format => :js
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "if the user is not permitted to update roles" do
|
28
|
+
it "updates user without role" do
|
29
|
+
controller.stub(:permitted_to?).with(:update_role).and_return { false }
|
30
|
+
Alchemy::User.any_instance.should_receive(:update_attributes).with({})
|
31
|
+
post :update, :id => user.id, :user => {'role' => 'Administrator'}, :format => :js
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -51,13 +51,24 @@ module Alchemy
|
|
51
51
|
|
52
52
|
context "for language that does not exist" do
|
53
53
|
|
54
|
-
|
54
|
+
before do
|
55
55
|
controller.stub!(:params).and_return({:lang => 'fo'})
|
56
56
|
controller.send :set_language
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should set the language to default" do
|
57
60
|
controller.session[:language_id].should == default_language.id
|
58
61
|
controller.session[:language_code].should == default_language.code
|
59
62
|
end
|
60
63
|
|
64
|
+
it "should set the rails locale to default language code" do
|
65
|
+
::I18n.locale.should == default_language.code.to_sym
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should not set the rails locale to requested locale" do
|
69
|
+
::I18n.locale.should_not == :fo
|
70
|
+
end
|
71
|
+
|
61
72
|
end
|
62
73
|
|
63
74
|
end
|
@@ -6,22 +6,26 @@ module Alchemy
|
|
6
6
|
let(:page) { FactoryGirl.create(:public_page, :restricted => true) }
|
7
7
|
let(:element) { FactoryGirl.create(:element, :page => page, :name => 'download') }
|
8
8
|
|
9
|
-
|
10
|
-
get :show, :id => element.id
|
11
|
-
response.status.should == 302
|
12
|
-
response.should redirect_to(login_path)
|
13
|
-
end
|
14
|
-
|
15
|
-
context "as a registered user" do
|
9
|
+
describe '#show' do
|
16
10
|
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
it "should not return restricted elements" do
|
12
|
+
get :show, :id => element.id
|
13
|
+
response.status.should == 302
|
14
|
+
response.should redirect_to(login_path)
|
20
15
|
end
|
21
16
|
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
context "for registered user" do
|
18
|
+
|
19
|
+
before do
|
20
|
+
activate_authlogic
|
21
|
+
UserSession.create(FactoryGirl.create(:registered_user))
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should render restricted elements" do
|
25
|
+
get :show, :id => element.id
|
26
|
+
response.status.should == 200
|
27
|
+
end
|
28
|
+
|
25
29
|
end
|
26
30
|
|
27
31
|
end
|
@@ -16,7 +16,7 @@ module Alchemy
|
|
16
16
|
|
17
17
|
context "Requesting a picture that is not assigned with any page" do
|
18
18
|
it "should render the picture" do
|
19
|
-
get :show, :id => picture.id, :format => :png
|
19
|
+
get :show, :id => picture.id, :format => :png, :sh => picture.security_token
|
20
20
|
response.status.should == 200
|
21
21
|
end
|
22
22
|
end
|
@@ -35,7 +35,7 @@ module Alchemy
|
|
35
35
|
|
36
36
|
context "as guest user" do
|
37
37
|
it "should render the picture" do
|
38
|
-
get :show, :id => picture.id, :format => :png
|
38
|
+
get :show, :id => picture.id, :format => :png, :sh => picture.security_token
|
39
39
|
response.status.should == 200
|
40
40
|
end
|
41
41
|
end
|
@@ -53,7 +53,7 @@ module Alchemy
|
|
53
53
|
context "as guest user" do
|
54
54
|
|
55
55
|
it "should not render the picture, but redirect to login path" do
|
56
|
-
get :show, :id => picture.id
|
56
|
+
get :show, :id => picture.id, :sh => picture.security_token
|
57
57
|
response.status.should == 302
|
58
58
|
response.should redirect_to(login_path)
|
59
59
|
end
|
@@ -68,7 +68,7 @@ module Alchemy
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should render the picture" do
|
71
|
-
get :show, :id => picture.id, :format => :png
|
71
|
+
get :show, :id => picture.id, :format => :png, :sh => picture.security_token
|
72
72
|
response.status.should == 200
|
73
73
|
end
|
74
74
|
|
@@ -37,7 +37,7 @@ module Dummy
|
|
37
37
|
|
38
38
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
39
39
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
40
|
-
config.i18n.default_locale = :
|
40
|
+
# config.i18n.default_locale = :de
|
41
41
|
|
42
42
|
# Configure the default encoding used in templates for Ruby 1.9.
|
43
43
|
config.encoding = "utf-8"
|
@@ -0,0 +1,312 @@
|
|
1
|
+
# This is a compressed migration for creating all Alchemy 2.3 tables at once.
|
2
|
+
#
|
3
|
+
# === Notice
|
4
|
+
#
|
5
|
+
# In order to upgrade from an old version of Alchemy, you have to run all migrations from
|
6
|
+
# each version you missed up to the version you want to upgrade to, before running this migration.
|
7
|
+
#
|
8
|
+
class AlchemyTwoPointThree < ActiveRecord::Migration
|
9
|
+
def up
|
10
|
+
# Do not run if Alchemy tables are already present
|
11
|
+
return if table_exists?(:alchemy_pages)
|
12
|
+
|
13
|
+
create_table "alchemy_attachments", :force => true do |t|
|
14
|
+
t.string "name"
|
15
|
+
t.string "filename"
|
16
|
+
t.string "content_type"
|
17
|
+
t.integer "size"
|
18
|
+
t.integer "creator_id"
|
19
|
+
t.integer "updater_id"
|
20
|
+
t.datetime "created_at", :null => false
|
21
|
+
t.datetime "updated_at", :null => false
|
22
|
+
end
|
23
|
+
|
24
|
+
create_table "alchemy_cells", :force => true do |t|
|
25
|
+
t.integer "page_id"
|
26
|
+
t.string "name"
|
27
|
+
t.datetime "created_at", :null => false
|
28
|
+
t.datetime "updated_at", :null => false
|
29
|
+
end
|
30
|
+
|
31
|
+
create_table "alchemy_contents", :force => true do |t|
|
32
|
+
t.string "name"
|
33
|
+
t.string "essence_type"
|
34
|
+
t.integer "essence_id"
|
35
|
+
t.integer "element_id"
|
36
|
+
t.integer "position"
|
37
|
+
t.datetime "created_at", :null => false
|
38
|
+
t.datetime "updated_at", :null => false
|
39
|
+
t.integer "creator_id"
|
40
|
+
t.integer "updater_id"
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index "alchemy_contents", ["element_id", "position"], :name => "index_contents_on_element_id_and_position"
|
44
|
+
|
45
|
+
create_table "alchemy_elements", :force => true do |t|
|
46
|
+
t.string "name"
|
47
|
+
t.integer "position"
|
48
|
+
t.integer "page_id"
|
49
|
+
t.boolean "public", :default => true
|
50
|
+
t.boolean "folded", :default => false
|
51
|
+
t.boolean "unique", :default => false
|
52
|
+
t.datetime "created_at", :null => false
|
53
|
+
t.datetime "updated_at", :null => false
|
54
|
+
t.integer "creator_id"
|
55
|
+
t.integer "updater_id"
|
56
|
+
t.integer "cell_id"
|
57
|
+
end
|
58
|
+
|
59
|
+
add_index "alchemy_elements", ["page_id", "position"], :name => "index_elements_on_page_id_and_position"
|
60
|
+
|
61
|
+
create_table "alchemy_elements_alchemy_pages", :id => false, :force => true do |t|
|
62
|
+
t.integer "element_id"
|
63
|
+
t.integer "page_id"
|
64
|
+
end
|
65
|
+
|
66
|
+
create_table "alchemy_essence_audios", :force => true do |t|
|
67
|
+
t.integer "attachment_id"
|
68
|
+
t.integer "width", :default => 400
|
69
|
+
t.integer "height", :default => 300
|
70
|
+
t.boolean "show_eq", :default => true
|
71
|
+
t.boolean "show_navigation", :default => true
|
72
|
+
t.integer "creator_id"
|
73
|
+
t.integer "updater_id"
|
74
|
+
t.datetime "created_at", :null => false
|
75
|
+
t.datetime "updated_at", :null => false
|
76
|
+
end
|
77
|
+
|
78
|
+
create_table "alchemy_essence_booleans", :force => true do |t|
|
79
|
+
t.boolean "value"
|
80
|
+
t.datetime "created_at", :null => false
|
81
|
+
t.datetime "updated_at", :null => false
|
82
|
+
t.integer "creator_id"
|
83
|
+
t.integer "updater_id"
|
84
|
+
end
|
85
|
+
|
86
|
+
add_index "alchemy_essence_booleans", ["value"], :name => "index_alchemy_essence_booleans_on_value"
|
87
|
+
|
88
|
+
create_table "alchemy_essence_dates", :force => true do |t|
|
89
|
+
t.datetime "date"
|
90
|
+
t.integer "creator_id"
|
91
|
+
t.integer "updater_id"
|
92
|
+
t.datetime "created_at", :null => false
|
93
|
+
t.datetime "updated_at", :null => false
|
94
|
+
end
|
95
|
+
|
96
|
+
create_table "alchemy_essence_files", :force => true do |t|
|
97
|
+
t.integer "attachment_id"
|
98
|
+
t.string "title"
|
99
|
+
t.string "css_class"
|
100
|
+
t.integer "creator_id"
|
101
|
+
t.integer "updater_id"
|
102
|
+
t.datetime "created_at", :null => false
|
103
|
+
t.datetime "updated_at", :null => false
|
104
|
+
end
|
105
|
+
|
106
|
+
create_table "alchemy_essence_flashes", :force => true do |t|
|
107
|
+
t.integer "attachment_id"
|
108
|
+
t.integer "width", :default => 400
|
109
|
+
t.integer "height", :default => 300
|
110
|
+
t.string "player_version", :default => "9.0.28"
|
111
|
+
t.integer "creator_id"
|
112
|
+
t.integer "updater_id"
|
113
|
+
t.datetime "created_at", :null => false
|
114
|
+
t.datetime "updated_at", :null => false
|
115
|
+
end
|
116
|
+
|
117
|
+
create_table "alchemy_essence_htmls", :force => true do |t|
|
118
|
+
t.text "source"
|
119
|
+
t.integer "creator_id"
|
120
|
+
t.integer "updater_id"
|
121
|
+
t.datetime "created_at", :null => false
|
122
|
+
t.datetime "updated_at", :null => false
|
123
|
+
end
|
124
|
+
|
125
|
+
create_table "alchemy_essence_pictures", :force => true do |t|
|
126
|
+
t.integer "picture_id"
|
127
|
+
t.string "caption"
|
128
|
+
t.string "title"
|
129
|
+
t.string "alt_tag"
|
130
|
+
t.string "link"
|
131
|
+
t.string "link_class_name"
|
132
|
+
t.string "link_title"
|
133
|
+
t.string "css_class"
|
134
|
+
t.string "link_target"
|
135
|
+
t.integer "creator_id"
|
136
|
+
t.integer "updater_id"
|
137
|
+
t.datetime "created_at", :null => false
|
138
|
+
t.datetime "updated_at", :null => false
|
139
|
+
t.string "crop_from"
|
140
|
+
t.string "crop_size"
|
141
|
+
t.string "render_size"
|
142
|
+
end
|
143
|
+
|
144
|
+
create_table "alchemy_essence_richtexts", :force => true do |t|
|
145
|
+
t.text "body"
|
146
|
+
t.text "stripped_body"
|
147
|
+
t.boolean "do_not_index", :default => false
|
148
|
+
t.boolean "public"
|
149
|
+
t.integer "creator_id"
|
150
|
+
t.integer "updater_id"
|
151
|
+
t.datetime "created_at", :null => false
|
152
|
+
t.datetime "updated_at", :null => false
|
153
|
+
end
|
154
|
+
|
155
|
+
create_table "alchemy_essence_selects", :force => true do |t|
|
156
|
+
t.string "value"
|
157
|
+
t.datetime "created_at", :null => false
|
158
|
+
t.datetime "updated_at", :null => false
|
159
|
+
t.integer "creator_id"
|
160
|
+
t.integer "updater_id"
|
161
|
+
end
|
162
|
+
|
163
|
+
add_index "alchemy_essence_selects", ["value"], :name => "index_alchemy_essence_selects_on_value"
|
164
|
+
|
165
|
+
create_table "alchemy_essence_texts", :force => true do |t|
|
166
|
+
t.text "body"
|
167
|
+
t.string "link"
|
168
|
+
t.string "link_title"
|
169
|
+
t.string "link_class_name"
|
170
|
+
t.boolean "public", :default => false
|
171
|
+
t.boolean "do_not_index", :default => false
|
172
|
+
t.string "link_target"
|
173
|
+
t.integer "creator_id"
|
174
|
+
t.integer "updater_id"
|
175
|
+
t.datetime "created_at", :null => false
|
176
|
+
t.datetime "updated_at", :null => false
|
177
|
+
end
|
178
|
+
|
179
|
+
create_table "alchemy_essence_videos", :force => true do |t|
|
180
|
+
t.integer "attachment_id"
|
181
|
+
t.integer "width"
|
182
|
+
t.integer "height"
|
183
|
+
t.boolean "allow_fullscreen", :default => true
|
184
|
+
t.boolean "auto_play", :default => false
|
185
|
+
t.boolean "show_navigation", :default => true
|
186
|
+
t.integer "creator_id"
|
187
|
+
t.integer "updater_id"
|
188
|
+
t.datetime "created_at", :null => false
|
189
|
+
t.datetime "updated_at", :null => false
|
190
|
+
end
|
191
|
+
|
192
|
+
create_table "alchemy_folded_pages", :force => true do |t|
|
193
|
+
t.integer "page_id"
|
194
|
+
t.integer "user_id"
|
195
|
+
t.boolean "folded", :default => false
|
196
|
+
end
|
197
|
+
|
198
|
+
create_table "alchemy_languages", :force => true do |t|
|
199
|
+
t.string "name"
|
200
|
+
t.string "language_code"
|
201
|
+
t.string "frontpage_name"
|
202
|
+
t.string "page_layout", :default => "intro"
|
203
|
+
t.boolean "public", :default => false
|
204
|
+
t.datetime "created_at", :null => false
|
205
|
+
t.datetime "updated_at", :null => false
|
206
|
+
t.integer "creator_id"
|
207
|
+
t.integer "updater_id"
|
208
|
+
t.boolean "default", :default => false
|
209
|
+
t.string "country_code", :default => "", :null => false
|
210
|
+
end
|
211
|
+
|
212
|
+
add_index "alchemy_languages", ["language_code", "country_code"], :name => "index_alchemy_languages_on_language_code_and_country_code"
|
213
|
+
add_index "alchemy_languages", ["language_code"], :name => "index_alchemy_languages_on_language_code"
|
214
|
+
|
215
|
+
create_table "alchemy_pages", :force => true do |t|
|
216
|
+
t.string "name"
|
217
|
+
t.string "urlname"
|
218
|
+
t.string "title"
|
219
|
+
t.string "language_code"
|
220
|
+
t.boolean "language_root"
|
221
|
+
t.string "page_layout"
|
222
|
+
t.text "meta_keywords"
|
223
|
+
t.text "meta_description"
|
224
|
+
t.integer "lft"
|
225
|
+
t.integer "rgt"
|
226
|
+
t.integer "parent_id"
|
227
|
+
t.integer "depth"
|
228
|
+
t.boolean "visible", :default => false
|
229
|
+
t.boolean "public", :default => false
|
230
|
+
t.boolean "locked", :default => false
|
231
|
+
t.integer "locked_by"
|
232
|
+
t.boolean "restricted", :default => false
|
233
|
+
t.boolean "robot_index", :default => true
|
234
|
+
t.boolean "robot_follow", :default => true
|
235
|
+
t.boolean "sitemap", :default => true
|
236
|
+
t.boolean "layoutpage", :default => false
|
237
|
+
t.datetime "created_at", :null => false
|
238
|
+
t.datetime "updated_at", :null => false
|
239
|
+
t.integer "creator_id"
|
240
|
+
t.integer "updater_id"
|
241
|
+
t.integer "language_id"
|
242
|
+
end
|
243
|
+
|
244
|
+
add_index "alchemy_pages", ["language_id"], :name => "index_pages_on_language_id"
|
245
|
+
add_index "alchemy_pages", ["parent_id", "lft"], :name => "index_pages_on_parent_id_and_lft"
|
246
|
+
add_index "alchemy_pages", ["urlname"], :name => "index_pages_on_urlname"
|
247
|
+
|
248
|
+
create_table "alchemy_pictures", :force => true do |t|
|
249
|
+
t.string "name"
|
250
|
+
t.string "image_filename"
|
251
|
+
t.integer "image_width"
|
252
|
+
t.integer "image_height"
|
253
|
+
t.datetime "created_at", :null => false
|
254
|
+
t.datetime "updated_at", :null => false
|
255
|
+
t.integer "creator_id"
|
256
|
+
t.integer "updater_id"
|
257
|
+
t.string "upload_hash"
|
258
|
+
t.string "cached_tag_list"
|
259
|
+
end
|
260
|
+
|
261
|
+
create_table "alchemy_users", :force => true do |t|
|
262
|
+
t.string "firstname"
|
263
|
+
t.string "lastname"
|
264
|
+
t.string "login"
|
265
|
+
t.string "email"
|
266
|
+
t.string "gender"
|
267
|
+
t.string "role", :default => "registered"
|
268
|
+
t.string "language"
|
269
|
+
t.string "crypted_password", :limit => 128, :default => "", :null => false
|
270
|
+
t.string "password_salt", :limit => 128, :default => "", :null => false
|
271
|
+
t.integer "login_count", :default => 0, :null => false
|
272
|
+
t.integer "failed_login_count", :default => 0, :null => false
|
273
|
+
t.datetime "last_request_at"
|
274
|
+
t.datetime "current_login_at"
|
275
|
+
t.datetime "last_login_at"
|
276
|
+
t.string "current_login_ip"
|
277
|
+
t.string "last_login_ip"
|
278
|
+
t.string "persistence_token", :null => false
|
279
|
+
t.string "single_access_token", :null => false
|
280
|
+
t.string "perishable_token", :null => false
|
281
|
+
t.datetime "created_at", :null => false
|
282
|
+
t.datetime "updated_at", :null => false
|
283
|
+
t.integer "creator_id"
|
284
|
+
t.integer "updater_id"
|
285
|
+
end
|
286
|
+
|
287
|
+
add_index "alchemy_users", ["perishable_token"], :name => "index_users_on_perishable_token"
|
288
|
+
|
289
|
+
# Skip migrations for acts-as-taggable-on, if the tables are already present
|
290
|
+
unless table_exists?(:taggings)
|
291
|
+
create_table "taggings", :force => true do |t|
|
292
|
+
t.integer "tag_id"
|
293
|
+
t.integer "taggable_id"
|
294
|
+
t.string "taggable_type"
|
295
|
+
t.integer "tagger_id"
|
296
|
+
t.string "tagger_type"
|
297
|
+
t.string "context"
|
298
|
+
t.datetime "created_at"
|
299
|
+
end
|
300
|
+
|
301
|
+
add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
|
302
|
+
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
303
|
+
end
|
304
|
+
|
305
|
+
unless table_exists?(:tags)
|
306
|
+
create_table "tags", :force => true do |t|
|
307
|
+
t.string "name"
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
end
|
312
|
+
end
|