alchemy_cms 2.5.0.rc3 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/README.md +22 -29
- data/alchemy_cms.gemspec +3 -2
- data/app/assets/javascripts/alchemy/alchemy.base.js +7 -0
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +3 -2
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +5 -2
- data/app/assets/javascripts/alchemy/alchemy.js +8 -1
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +4 -1
- data/app/assets/stylesheets/alchemy/archive.scss +1 -6
- data/app/assets/stylesheets/alchemy/base.scss +37 -17
- data/app/assets/stylesheets/alchemy/dashboard.scss +41 -24
- data/app/assets/stylesheets/alchemy/form_elements.scss +1 -1
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +3 -2
- data/app/assets/stylesheets/alchemy/login.scss +1 -1
- data/app/assets/stylesheets/alchemy/menubar.css.scss +3 -1
- data/app/assets/stylesheets/alchemy/mixins.scss +9 -0
- data/app/assets/stylesheets/alchemy/notices.scss +1 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
- data/app/controllers/alchemy/admin/dashboard_controller.rb +46 -3
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +3 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +7 -7
- data/app/controllers/alchemy/attachments_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +5 -1
- data/app/helpers/alchemy/admin/essences_helper.rb +21 -0
- data/app/models/alchemy/attachment.rb +3 -1
- data/app/models/alchemy/page.rb +11 -8
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +38 -0
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +22 -0
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +13 -0
- data/app/views/alchemy/admin/dashboard/_users.html.erb +19 -0
- data/app/views/alchemy/admin/dashboard/index.html.erb +35 -101
- data/app/views/alchemy/admin/dashboard/info.html.erb +57 -0
- data/app/views/alchemy/admin/elements/create.js.erb +4 -1
- data/app/views/alchemy/admin/elements/update.js.erb +1 -0
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +38 -41
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +2 -4
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +1 -18
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +1 -1
- data/app/views/layouts/alchemy/admin.html.erb +1 -0
- data/config/authorization_rules.rb +1 -0
- data/config/locales/alchemy.de.yml +5 -1
- data/config/locales/alchemy.en.yml +1 -0
- data/config/routes.rb +5 -1
- data/lib/alchemy/errors.rb +7 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/lib/tasks/ferret.rake +0 -3
- data/spec/models/attachment_spec.rb +27 -0
- data/spec/models/page_spec.rb +7 -0
- metadata +33 -7
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,10 @@
|
|
1
|
-
Alchemy CMS
|
2
|
-
===========
|
1
|
+
![Alchemy CMS](http://alchemy-cms.com/assets/alchemy_logo.png)
|
3
2
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/magiclabs/alchemy_cms.png?branch=master)](http://travis-ci.org/magiclabs/alchemy_cms)
|
5
|
-
[![Maintenance Status](http://stillmaintained.com/magiclabs/alchemy_cms.png)](http://stillmaintained.com/magiclabs/alchemy_cms)
|
6
|
-
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/magiclabs/alchemy_cms)
|
3
|
+
[![Build Status](https://secure.travis-ci.org/magiclabs/alchemy_cms.png?branch=master)](http://travis-ci.org/magiclabs/alchemy_cms) [![Maintenance Status](http://stillmaintained.com/magiclabs/alchemy_cms.png)](http://stillmaintained.com/magiclabs/alchemy_cms) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/magiclabs/alchemy_cms)
|
7
4
|
|
8
5
|
About
|
9
6
|
-----
|
10
7
|
|
11
|
-
**This branch is a beta development branch. For productive environments use the current rubygems version, or the [latest stable branch (2.4-stable)](https://github.com/magiclabs/alchemy_cms/tree/2.4-stable).**
|
12
|
-
|
13
8
|
Alchemy is a powerful, userfriendly and flexible Rails 3 CMS.
|
14
9
|
|
15
10
|
Read more on the [website](http://alchemy-cms.com) and in the [guidelines](http://guides.alchemy-cms.com).
|
@@ -20,7 +15,8 @@ Features
|
|
20
15
|
- Highly flexible Templating
|
21
16
|
- Gorgious End-User centric interface
|
22
17
|
- Multilingual
|
23
|
-
-
|
18
|
+
- Multidomain
|
19
|
+
- SEO friendly
|
24
20
|
- Access Control
|
25
21
|
- Fulltext Search
|
26
22
|
- RSS Feeds
|
@@ -28,15 +24,15 @@ Features
|
|
28
24
|
- Attachments and downloads
|
29
25
|
- Powerful image rendering
|
30
26
|
- Extendable
|
31
|
-
- Integrates in
|
27
|
+
- Integrates in existing Rails Apps
|
32
28
|
- Caching
|
33
29
|
- BSD License
|
34
|
-
- Hostable on any Server that supports
|
30
|
+
- Hostable on any Server that supports Ruby on Rails, a SQL Database and ImageMagick
|
35
31
|
|
36
32
|
Rails Version
|
37
33
|
-------------
|
38
34
|
|
39
|
-
This version of Alchemy runs with Rails 3.2.
|
35
|
+
This version of Alchemy runs with Rails 3.2.11+.
|
40
36
|
|
41
37
|
If you are looking for a Rails 3.1 compatible version check the [2.1-stable branch](https://github.com/magiclabs/alchemy_cms/tree/2.1-stable).
|
42
38
|
|
@@ -47,7 +43,7 @@ If you are looking for a Rails 2.3 compatible version check the [1.6-stable bran
|
|
47
43
|
Ruby Version
|
48
44
|
------------
|
49
45
|
|
50
|
-
Alchemy runs with Ruby 1.9.2 and Ruby 1.9.3.
|
46
|
+
Alchemy runs with Ruby 1.9.2 and Ruby 1.9.3 only.
|
51
47
|
|
52
48
|
For a Ruby 1.8.7 compatible version use the [2.3-stable branch](https://github.com/magiclabs/alchemy_cms/tree/2.3-stable).
|
53
49
|
|
@@ -56,8 +52,9 @@ Installation
|
|
56
52
|
|
57
53
|
Use the installer (recommended):
|
58
54
|
|
59
|
-
gem install alchemy_cms
|
55
|
+
gem install alchemy_cms
|
60
56
|
alchemy new my_magicpage
|
57
|
+
cd my_magicpage
|
61
58
|
|
62
59
|
Start the local server:
|
63
60
|
|
@@ -70,18 +67,21 @@ Add to existing Rails project
|
|
70
67
|
|
71
68
|
In your Gemfile:
|
72
69
|
|
73
|
-
gem 'alchemy_cms', :
|
70
|
+
gem 'alchemy_cms', '~> 2.5.0', github: 'magiclabs/alchemy_cms', branch: '2.5-stable'
|
74
71
|
|
75
72
|
Run in terminal:
|
76
73
|
|
77
|
-
bundle
|
78
|
-
rake alchemy:install
|
74
|
+
bundle install
|
75
|
+
bundle exec rake alchemy:install
|
79
76
|
|
80
|
-
Note:
|
77
|
+
### Note:
|
78
|
+
If you did not mounted Alchemy on the root route `'/'`, then you have to add Alchemy's view helpers manually to your app.
|
81
79
|
|
82
80
|
Just paste this in your `app/controllers/application_controller.rb`
|
83
81
|
|
84
|
-
|
82
|
+
```
|
83
|
+
helper Alchemy::PagesHelper
|
84
|
+
```
|
85
85
|
|
86
86
|
Upgrading
|
87
87
|
---------
|
@@ -90,23 +90,16 @@ After updating Alchemy you should run the upgrader.
|
|
90
90
|
|
91
91
|
Run in terminal:
|
92
92
|
|
93
|
-
rake alchemy:upgrade
|
93
|
+
bundle exec rake alchemy:upgrade
|
94
94
|
|
95
95
|
|
96
96
|
Tipps
|
97
97
|
-----
|
98
98
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
2. If you use the ferret full text search (enabled by default), then please add a job to your crontab that reindexes the ferret index.
|
104
|
-
|
105
|
-
cd /path/to/your/alchemy && RAILS_ENV=production rake ferret:rebuild_index > /dev/null
|
106
|
-
|
107
|
-
3. You can easily create your element files (for view and editor) depending on the `elements.yml` with this generator:
|
99
|
+
- Read the guidelines: http://guides.alchemy-cms.com.
|
100
|
+
- Read the documentation: http://rubydoc.info/github/magiclabs/alchemy_cms
|
101
|
+
- Ask the community: http://groups.google.com/group/alchemy-cms
|
108
102
|
|
109
|
-
rails generate alchemy:elements --skip
|
110
103
|
|
111
104
|
Resources
|
112
105
|
---------
|
data/alchemy_cms.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ["Thomas von Deyen", "Robin Boening", "Marc Schettke", "Hendrik Mans", "Carsten Fregin"]
|
10
10
|
s.email = ["alchemy@magiclabs.de"]
|
11
11
|
s.homepage = "http://alchemy-cms.com"
|
12
|
-
s.summary = %q{
|
13
|
-
s.description = %q{Alchemy is a
|
12
|
+
s.summary = %q{A powerful, userfriendly and flexible CMS for Rails 3}
|
13
|
+
s.description = %q{Alchemy is a powerful, userfriendly and flexible Rails 3 CMS.}
|
14
14
|
s.requirements << 'ImageMagick (libmagick), v6.6 or greater.'
|
15
15
|
s.required_ruby_version = '~> 1.9.2'
|
16
16
|
s.license = 'BSD New'
|
@@ -45,6 +45,7 @@ POST_INSTALL
|
|
45
45
|
s.add_runtime_dependency %q<magiclabs-userstamp>, ["~> 2.0.2"]
|
46
46
|
s.add_runtime_dependency %q<dynamic_form>, ["~> 1.1"]
|
47
47
|
s.add_runtime_dependency %q<jquery-rails>, ["~> 2.1.3"]
|
48
|
+
s.add_runtime_dependency %q<jquery-ui-rails>, ["~> 3.0.1"]
|
48
49
|
s.add_runtime_dependency %q<attachment_magic>, ["~> 0.2.1"]
|
49
50
|
s.add_runtime_dependency %q<sass-rails>, ['~> 3.2.3']
|
50
51
|
s.add_runtime_dependency %q<coffee-rails>, ['~> 3.2.1']
|
@@ -130,6 +130,13 @@ if (typeof(Alchemy) === 'undefined') {
|
|
130
130
|
$('#cells').tabs('select', 'cell_' + cell_name);
|
131
131
|
},
|
132
132
|
|
133
|
+
buildTabbedCells: function(label) {
|
134
|
+
var $cells = $('<div id="cells"/>');
|
135
|
+
$('#cell_for_other_elements').wrap($cells);
|
136
|
+
$('#cells').prepend('<ul><li><a href="#cell_for_other_elements">'+label+'</a></li></ul>');
|
137
|
+
$('#cells').tabs().tabs('paging', { follow: true, followOnSelect: true } );
|
138
|
+
},
|
139
|
+
|
133
140
|
debug: function(e) {
|
134
141
|
if (window['console']) {
|
135
142
|
console.debug(e);
|
@@ -7,7 +7,7 @@ if (typeof(Alchemy) === 'undefined') {
|
|
7
7
|
$.extend(Alchemy, {
|
8
8
|
|
9
9
|
Datepicker: function(selector) {
|
10
|
-
var browserHasDatepicker = Alchemy.isiOS
|
10
|
+
var browserHasDatepicker = Alchemy.isiOS;
|
11
11
|
var datepicker_options = {
|
12
12
|
dateFormat: 'yy-mm-dd',
|
13
13
|
changeMonth: true,
|
@@ -37,7 +37,8 @@ if (typeof(Alchemy) === 'undefined') {
|
|
37
37
|
});
|
38
38
|
}
|
39
39
|
if (!browserHasDatepicker) {
|
40
|
-
|
40
|
+
// Disables the browsers default Datepicker.
|
41
|
+
$(selector).datepicker(datepicker_options).prop('type','text');
|
41
42
|
}
|
42
43
|
}
|
43
44
|
|
@@ -10,7 +10,7 @@ if (typeof(Alchemy) === 'undefined') {
|
|
10
10
|
|
11
11
|
Alchemy.ImageCropper = {
|
12
12
|
|
13
|
-
init: function(box, size_x, size_y, default_box, ratio) {
|
13
|
+
init: function(box, size_x, size_y, default_box, ratio, true_size) {
|
14
14
|
var crop_from_field = $('#essence_picture_crop_from');
|
15
15
|
var crop_size_field = $('#essence_picture_crop_size');
|
16
16
|
var options = {
|
@@ -20,7 +20,10 @@ if (typeof(Alchemy) === 'undefined') {
|
|
20
20
|
},
|
21
21
|
setSelect: box,
|
22
22
|
aspectRatio: ratio ? ratio : undefined,
|
23
|
-
minSize: [size_x, size_y]
|
23
|
+
minSize: [size_x, size_y],
|
24
|
+
boxWidth: 800,
|
25
|
+
boxHeight: 600,
|
26
|
+
trueSize: true_size
|
24
27
|
};
|
25
28
|
Alchemy.ImageCropper.box = box;
|
26
29
|
Alchemy.ImageCropper.default_box = default_box;
|
@@ -1,8 +1,15 @@
|
|
1
1
|
// Alchemy CMS Sprockets Manifest
|
2
2
|
// ------------------------------
|
3
3
|
//= require jquery
|
4
|
-
//= require jquery-ui
|
5
4
|
//= require jquery_ujs
|
5
|
+
//= require jquery.ui.autocomplete
|
6
|
+
//= require jquery.ui.datepicker
|
7
|
+
//= require jquery.ui.dialog
|
8
|
+
//= require jquery.ui.effect-drop
|
9
|
+
//= require jquery.ui.effect-fade
|
10
|
+
//= require jquery.ui.resizable
|
11
|
+
//= require jquery.ui.sortable
|
12
|
+
//= require jquery.ui.tabs
|
6
13
|
//= require autocomplete-rails
|
7
14
|
//= require tiny_mce/tiny_mce
|
8
15
|
//= require_tree ../../../../vendor/assets/javascripts/jquery_plugins/
|
@@ -20,7 +20,10 @@ Alchemy.loadAlchemyMenuBar = function(options) {
|
|
20
20
|
build: function() {
|
21
21
|
var self = Alchemy.Menubar;
|
22
22
|
var bar = self._$('<div id="alchemy_menubar"/>').append('<ul/>');
|
23
|
-
bar.find('ul')
|
23
|
+
bar.find('ul')
|
24
|
+
.append('<li><a href="' + options.route + '/admin">' + Alchemy.Menubar.t("to_alchemy") + '</a></li>')
|
25
|
+
.append('<li><a href="' + options.route + '/admin/pages/' + options.page_id + '/edit">' + Alchemy.Menubar.t("edit_page") + '</a></li>')
|
26
|
+
.append('<li><form action="' + options.route + '/admin/logout" method="post"><input type="hidden" name="_method" value="delete"><button>' + Alchemy.Menubar.t("logout") + '</button></form></li>');
|
24
27
|
return bar;
|
25
28
|
},
|
26
29
|
|
@@ -26,14 +26,9 @@ div#image_assign_filter_and_image_sizing {
|
|
26
26
|
@include rounded-corner;
|
27
27
|
|
28
28
|
.thumbnail_background {
|
29
|
-
|
29
|
+
@include thumbnail-background;
|
30
30
|
width: 160px;
|
31
31
|
height: 120px;
|
32
|
-
background-color: $dark-gray;
|
33
|
-
text-align: center;
|
34
|
-
vertical-align: middle;
|
35
|
-
padding: 0;
|
36
|
-
line-height: 0;
|
37
32
|
}
|
38
33
|
|
39
34
|
.picture_name {
|
@@ -95,6 +95,8 @@ ul {
|
|
95
95
|
float: left;
|
96
96
|
}
|
97
97
|
|
98
|
+
.center { text-align: center }
|
99
|
+
|
98
100
|
span.updated_at {
|
99
101
|
float: right;
|
100
102
|
}
|
@@ -150,15 +152,6 @@ div#page {
|
|
150
152
|
background-position: right;
|
151
153
|
}
|
152
154
|
|
153
|
-
div.tip {
|
154
|
-
background-color: #eff8d0;
|
155
|
-
border: 1px solid #cce21c;
|
156
|
-
padding: 2*$default-padding;
|
157
|
-
margin: 8px 0;
|
158
|
-
@include rounded-corner;
|
159
|
-
width: 450px;
|
160
|
-
}
|
161
|
-
|
162
155
|
#back_to_site {
|
163
156
|
float: right;
|
164
157
|
margin-right: 8px;
|
@@ -467,15 +460,42 @@ p.foot_note {
|
|
467
460
|
margin-left: 22px;
|
468
461
|
}
|
469
462
|
|
470
|
-
div#jscropper {
|
471
|
-
padding: 2
|
472
|
-
@include inline-block;
|
473
|
-
}
|
463
|
+
#alchemy .ui-dialog div#jscropper {
|
464
|
+
padding: 2 * $default-padding;
|
474
465
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
466
|
+
.thumbnail_background {
|
467
|
+
@include thumbnail-background;
|
468
|
+
width: 800px;
|
469
|
+
height: 600px;
|
470
|
+
position: relative;
|
471
|
+
}
|
472
|
+
|
473
|
+
.picture_content_spinner {
|
474
|
+
left: 400px;
|
475
|
+
top: 300px;
|
476
|
+
margin-top: -16px;
|
477
|
+
margin-left: -16px;
|
478
|
+
width: 32px;
|
479
|
+
height: 32px;
|
480
|
+
}
|
481
|
+
|
482
|
+
.jcrop-holder { @include inline-block }
|
483
|
+
|
484
|
+
img {
|
485
|
+
width: auto;
|
486
|
+
max-height: 600px;
|
487
|
+
}
|
488
|
+
|
489
|
+
form {
|
490
|
+
padding: 0;
|
491
|
+
text-align: right;
|
492
|
+
position: absolute;
|
493
|
+
width: 800px;
|
494
|
+
bottom: 2 * $default-padding;
|
495
|
+
left: 2 * $default-padding;
|
496
|
+
|
497
|
+
.button.with_icon { float: left }
|
498
|
+
}
|
479
499
|
}
|
480
500
|
|
481
501
|
textarea#essence_picture_caption {
|
@@ -1,30 +1,37 @@
|
|
1
1
|
#dashboard {
|
2
2
|
overflow: auto;
|
3
|
-
float: left;
|
4
3
|
padding: 4 * $default-padding;
|
5
|
-
width:
|
4
|
+
width: 100%;
|
6
5
|
position: relative;
|
6
|
+
@include box-sizing(border-box);
|
7
|
+
* { @include box-sizing(border-box) }
|
7
8
|
|
8
9
|
h1 {
|
9
10
|
font-size: 2em;
|
10
|
-
margin-bottom:
|
11
|
-
text-shadow: #fff 1px 1px 2px;
|
11
|
+
margin-bottom: 8px;
|
12
12
|
}
|
13
13
|
|
14
14
|
h2 {
|
15
15
|
padding: 0;
|
16
|
-
margin-bottom:
|
16
|
+
margin-bottom: 16px;
|
17
|
+
}
|
18
|
+
|
19
|
+
div.column {
|
20
|
+
width: 50%;
|
21
|
+
float: left;
|
22
|
+
padding-right: 16px;
|
17
23
|
}
|
18
24
|
|
19
25
|
div.widget {
|
20
|
-
|
21
|
-
margin: 16px
|
26
|
+
width: 100%;
|
27
|
+
margin-bottom: 16px;
|
22
28
|
background-color: $medium-gray;
|
23
29
|
border: $default-border;
|
24
|
-
@include rounded-
|
30
|
+
@include top-rounded-border;
|
31
|
+
float: left;
|
25
32
|
|
26
33
|
h2 {
|
27
|
-
padding
|
34
|
+
padding: 2 * $default-padding;
|
28
35
|
margin-bottom: 0;
|
29
36
|
}
|
30
37
|
|
@@ -32,32 +39,29 @@
|
|
32
39
|
margin: 4px 0;
|
33
40
|
}
|
34
41
|
|
35
|
-
|
42
|
+
table {
|
43
|
+
width: 100%;
|
36
44
|
padding: 0;
|
37
|
-
|
38
|
-
@include rounded-corner;
|
39
|
-
margin-right: -9px;
|
40
|
-
margin-left: -9px;
|
41
|
-
margin-bottom: -9px;
|
42
|
-
border: $default-border;
|
45
|
+
border-spacing: 0;
|
43
46
|
|
44
|
-
|
45
|
-
padding: 2
|
47
|
+
td {
|
48
|
+
padding: 2 * $default-padding;
|
46
49
|
margin-bottom: 0;
|
47
50
|
position: relative;
|
51
|
+
color: #aaa;
|
48
52
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
right: 2*$default-padding;
|
53
|
-
}
|
53
|
+
&:first-child { width: 40% }
|
54
|
+
form { float: right }
|
55
|
+
span { color: #333 }
|
54
56
|
}
|
55
57
|
}
|
56
58
|
}
|
57
59
|
}
|
58
60
|
|
59
61
|
div#sideboard {
|
60
|
-
|
62
|
+
right: 16px;
|
63
|
+
top: 82px;
|
64
|
+
position: absolute;
|
61
65
|
width: 240px;
|
62
66
|
padding: 16px;
|
63
67
|
|
@@ -72,3 +76,16 @@ div#license {
|
|
72
76
|
height: 24em;
|
73
77
|
background-color: white;
|
74
78
|
}
|
79
|
+
|
80
|
+
#update_check {
|
81
|
+
height: 16px;
|
82
|
+
|
83
|
+
img#load_info {
|
84
|
+
width: 16px;
|
85
|
+
height: 16px;
|
86
|
+
display: none;
|
87
|
+
}
|
88
|
+
|
89
|
+
& > span { display: none }
|
90
|
+
span.icon { vertical-align: top }
|
91
|
+
}
|
@@ -1318,10 +1318,11 @@
|
|
1318
1318
|
}
|
1319
1319
|
|
1320
1320
|
#alchemy .ui-menu .ui-menu-item a.ui-state-hover,
|
1321
|
-
#alchemy .ui-menu .ui-menu-item a.ui-state-active
|
1321
|
+
#alchemy .ui-menu .ui-menu-item a.ui-state-active,
|
1322
|
+
#alchemy .ui-menu .ui-menu-item a.ui-state-focus {
|
1322
1323
|
font-weight: normal;
|
1323
1324
|
cursor: pointer;
|
1324
|
-
background-color:
|
1325
|
+
background-color: $button-hover-bg-color;
|
1325
1326
|
color: $text-color;
|
1326
1327
|
}
|
1327
1328
|
|