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
@@ -1,50 +0,0 @@
|
|
1
|
-
if (typeof(Alchemy) === 'undefined') {
|
2
|
-
var Alchemy = {};
|
3
|
-
}
|
4
|
-
|
5
|
-
(function($) {
|
6
|
-
|
7
|
-
$.extend(Alchemy, {
|
8
|
-
|
9
|
-
ButtonObserver: function(selector) {
|
10
|
-
$(selector).not('.no-spinner').click(function(event) {
|
11
|
-
Alchemy.disableButton(this);
|
12
|
-
});
|
13
|
-
},
|
14
|
-
|
15
|
-
disableButton: function(button) {
|
16
|
-
var $button = $(button),
|
17
|
-
$clone = $button.clone(),
|
18
|
-
width = Alchemy.getButtonWidth($button),
|
19
|
-
height = Alchemy.getButtonHeight($button),
|
20
|
-
spinner = '<img src="/assets/alchemy/ajax_loader.gif" style="width: 16px; height: 16px">';
|
21
|
-
$button.hide().addClass('disabled');
|
22
|
-
$button.parent().append($clone);
|
23
|
-
$clone.attr({
|
24
|
-
disabled: true,
|
25
|
-
href: 'javascript:void(0)'
|
26
|
-
}).addClass('cloned-button').css({
|
27
|
-
width: width,
|
28
|
-
'line-height': height + 'px'
|
29
|
-
}).html(spinner).show();
|
30
|
-
return true;
|
31
|
-
},
|
32
|
-
|
33
|
-
enableButton: function(button) {
|
34
|
-
var $button = $(button).not('.no-spinner');
|
35
|
-
$button.show().removeClass('disabled');
|
36
|
-
$button.parent().find('.cloned-button').remove();
|
37
|
-
return true;
|
38
|
-
},
|
39
|
-
|
40
|
-
getButtonWidth: function($button) {
|
41
|
-
return $button.outerWidth() - (parseInt($button.css('border-left-width'), 10) + parseInt($button.css('border-right-width'), 10));
|
42
|
-
},
|
43
|
-
|
44
|
-
getButtonHeight: function($button) {
|
45
|
-
return $button.outerHeight() - (parseInt($button.css('border-top-width'), 10) + parseInt($button.css('border-bottom-width'), 10));
|
46
|
-
}
|
47
|
-
|
48
|
-
});
|
49
|
-
|
50
|
-
})(jQuery);
|
@@ -1,54 +0,0 @@
|
|
1
|
-
@import "alchemy/defaults";
|
2
|
-
|
3
|
-
/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */
|
4
|
-
.jcrop-holder {
|
5
|
-
text-align: left;
|
6
|
-
}
|
7
|
-
|
8
|
-
.jcrop-vline, .jcrop-hline {
|
9
|
-
font-size: 0px;
|
10
|
-
position: absolute;
|
11
|
-
background: white url('Jcrop.gif') top left repeat;
|
12
|
-
}
|
13
|
-
|
14
|
-
.jcrop-vline {
|
15
|
-
height: 100%;
|
16
|
-
width: 1px !important;
|
17
|
-
}
|
18
|
-
|
19
|
-
.jcrop-hline {
|
20
|
-
width: 100%;
|
21
|
-
height: 1px !important;
|
22
|
-
}
|
23
|
-
|
24
|
-
.jcrop-vline.right {
|
25
|
-
right: 0px;
|
26
|
-
}
|
27
|
-
|
28
|
-
.jcrop-hline.bottom {
|
29
|
-
bottom: 0px;
|
30
|
-
}
|
31
|
-
|
32
|
-
.jcrop-handle {
|
33
|
-
font-size: 1px;
|
34
|
-
width: 7px !important;
|
35
|
-
height: 7px !important;
|
36
|
-
border: 1px #eee solid;
|
37
|
-
background-color: #333;
|
38
|
-
}
|
39
|
-
|
40
|
-
.jcrop-tracker {
|
41
|
-
width: 100%;
|
42
|
-
height: 100%;
|
43
|
-
}
|
44
|
-
|
45
|
-
.custom .jcrop-vline,
|
46
|
-
.custom .jcrop-hline {
|
47
|
-
background: yellow;
|
48
|
-
}
|
49
|
-
|
50
|
-
.custom .jcrop-handle {
|
51
|
-
border-color: black;
|
52
|
-
background-color: #C7BB00;
|
53
|
-
@include rounded-corner;
|
54
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Alchemy
|
2
|
-
module PicturesHelper
|
3
|
-
|
4
|
-
# This helper returns a path to picture for use inside a image_tag helper.
|
5
|
-
#
|
6
|
-
# Any additional options are passed to the url_helper, so you can add arguments to your url.
|
7
|
-
#
|
8
|
-
# Example:
|
9
|
-
#
|
10
|
-
# <%= image_tag alchemy_picture_path(picture, :size => '320x200', :format => :png) %>
|
11
|
-
#
|
12
|
-
def alchemy_picture_path(picture, options={})
|
13
|
-
defaults = {:format => Alchemy::Config.get(:image_output_format)}
|
14
|
-
options = defaults.update(options)
|
15
|
-
alchemy.show_picture_path({:id => picture.id, :name => picture.urlname}.merge(options))
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
class CreatePages < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :pages do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :urlname
|
6
|
-
t.string :title
|
7
|
-
t.string :language
|
8
|
-
t.string :language_root_for
|
9
|
-
t.string :page_layout, :default => 'standard'
|
10
|
-
t.text :meta_keywords
|
11
|
-
t.text :meta_description
|
12
|
-
t.integer :lft
|
13
|
-
t.integer :rgt
|
14
|
-
t.integer :parent_id
|
15
|
-
t.integer :depth
|
16
|
-
t.boolean :visible, :default => false
|
17
|
-
t.boolean :public, :default => false
|
18
|
-
t.boolean :locked, :default => false
|
19
|
-
t.integer :locked_by
|
20
|
-
t.boolean :restricted, :default => false
|
21
|
-
t.boolean :robot_index, :default => true
|
22
|
-
t.boolean :robot_follow, :default => true
|
23
|
-
t.boolean :sitemap, :default => true
|
24
|
-
t.boolean :layoutpage, :default => false
|
25
|
-
t.timestamps
|
26
|
-
t.userstamps
|
27
|
-
end
|
28
|
-
add_index :pages, [:parent_id, :lft]
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.down
|
32
|
-
drop_table :pages
|
33
|
-
end
|
34
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class CreateElements < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :elements do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :display_name
|
6
|
-
t.integer :position
|
7
|
-
t.integer :page_id
|
8
|
-
t.boolean :public, :default => true
|
9
|
-
t.boolean :folded, :default => false
|
10
|
-
t.boolean :unique, :default => false
|
11
|
-
t.timestamps
|
12
|
-
t.userstamps
|
13
|
-
end
|
14
|
-
add_index :elements, [:page_id, :position]
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.down
|
18
|
-
drop_table :elements
|
19
|
-
end
|
20
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateContents < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :contents do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :essence_type
|
6
|
-
t.integer :essence_id
|
7
|
-
t.integer :element_id
|
8
|
-
t.integer :position
|
9
|
-
t.timestamps
|
10
|
-
t.userstamps
|
11
|
-
end
|
12
|
-
add_index :contents, [:element_id, :position]
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.down
|
16
|
-
drop_table :contents
|
17
|
-
end
|
18
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
class CreateUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :users do |t|
|
4
|
-
t.string :firstname
|
5
|
-
t.string :lastname
|
6
|
-
t.string :login
|
7
|
-
t.string :email
|
8
|
-
t.string :gender
|
9
|
-
t.string :role
|
10
|
-
t.string :language
|
11
|
-
t.string :crypted_password, :limit => 128, :null => false, :default => ""
|
12
|
-
t.string :password_salt, :limit => 128, :null => false, :default => ""
|
13
|
-
t.integer :login_count, :null => false, :default => 0
|
14
|
-
t.integer :failed_login_count, :null => false, :default => 0
|
15
|
-
t.datetime :last_request_at
|
16
|
-
t.datetime :current_login_at
|
17
|
-
t.datetime :last_login_at
|
18
|
-
t.string :current_login_ip
|
19
|
-
t.string :last_login_ip
|
20
|
-
t.string :persistence_token, :null => false
|
21
|
-
t.string :single_access_token, :null => false
|
22
|
-
t.string :perishable_token, :null => false
|
23
|
-
t.timestamps
|
24
|
-
t.userstamps
|
25
|
-
end
|
26
|
-
add_index :users, :perishable_token
|
27
|
-
end
|
28
|
-
|
29
|
-
def self.down
|
30
|
-
drop_table :users
|
31
|
-
end
|
32
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreatePictures < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :pictures do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :image_filename
|
6
|
-
t.integer :image_width
|
7
|
-
t.integer :image_height
|
8
|
-
t.timestamps
|
9
|
-
t.userstamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :pictures
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateAttachments < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :attachments do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :filename
|
6
|
-
t.string :content_type
|
7
|
-
t.integer :size
|
8
|
-
t.userstamps
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :attachments
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class CreateEssenceTexts < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :essence_texts do |t|
|
4
|
-
t.text :body
|
5
|
-
t.string :link
|
6
|
-
t.string :title
|
7
|
-
t.string :link_class_name
|
8
|
-
t.boolean :public, :default => false
|
9
|
-
t.boolean :do_not_index, :default => false
|
10
|
-
t.boolean :open_link_in_new_window, :default => false
|
11
|
-
t.userstamps
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.down
|
17
|
-
drop_table :essence_texts
|
18
|
-
end
|
19
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
class CreateEssencePictures < ActiveRecord::Migration
|
2
|
-
|
3
|
-
def self.up
|
4
|
-
create_table :essence_pictures do |t|
|
5
|
-
t.integer :picture_id
|
6
|
-
t.string :caption
|
7
|
-
t.string :title
|
8
|
-
t.string :alt_tag
|
9
|
-
t.string :link
|
10
|
-
t.string :link_class_name
|
11
|
-
t.string :link_title
|
12
|
-
t.string :css_class, :default => 'no_float'
|
13
|
-
t.boolean :open_link_in_new_window, :default => false
|
14
|
-
t.userstamps
|
15
|
-
t.timestamps
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.down
|
20
|
-
drop_table :essence_pictures
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateEssenceRichtexts < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :essence_richtexts do |t|
|
4
|
-
t.text :body
|
5
|
-
t.text :stripped_body
|
6
|
-
t.boolean :do_not_index, :default => false
|
7
|
-
t.boolean :public
|
8
|
-
t.userstamps
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :essence_richtexts
|
15
|
-
end
|
16
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateEssenceFiles < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :essence_files do |t|
|
4
|
-
t.integer :attachment_id
|
5
|
-
t.string :title
|
6
|
-
t.string :css_class
|
7
|
-
t.userstamps
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :essence_files
|
14
|
-
end
|
15
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateEssenceFlashes < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :essence_flashes do |t|
|
4
|
-
t.integer :attachment_id
|
5
|
-
t.integer :width, :default => 400
|
6
|
-
t.integer :height, :default => 300
|
7
|
-
t.string :player_version, :default => '9.0.28'
|
8
|
-
t.userstamps
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :essence_flashes
|
15
|
-
end
|
16
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateEssenceVideos < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :essence_videos do |t|
|
4
|
-
t.integer :attachment_id
|
5
|
-
t.integer :width
|
6
|
-
t.integer :height
|
7
|
-
t.boolean :allow_fullscreen, :default => true
|
8
|
-
t.boolean :auto_play, :default => false
|
9
|
-
t.boolean :show_navigation, :default => true
|
10
|
-
t.userstamps
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.down
|
16
|
-
drop_table :essence_videos
|
17
|
-
end
|
18
|
-
end
|