alchemy_cms 2.4.1 → 2.5.0.b2
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 +18 -17
- data/alchemy_cms.gemspec +5 -10
- data/app/assets/images/alchemy/icons.png +0 -0
- data/app/assets/stylesheets/alchemy/archive.scss +27 -0
- data/app/assets/stylesheets/alchemy/base.scss +0 -51
- data/app/assets/stylesheets/alchemy/elements.scss +37 -2
- data/app/assets/stylesheets/alchemy/icons.scss +4 -0
- data/app/assets/stylesheets/alchemy/modules.scss +4 -0
- data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
- data/app/assets/stylesheets/alchemy/tables.scss +1 -1
- data/app/assets/stylesheets/alchemy/variables.scss +1 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +1 -0
- data/app/controllers/alchemy/admin/pictures_controller.rb +22 -8
- data/app/controllers/alchemy/admin/resources_controller.rb +1 -1
- data/app/controllers/alchemy/admin/sites_controller.rb +6 -0
- data/app/controllers/alchemy/base_controller.rb +8 -0
- data/app/controllers/alchemy/elements_controller.rb +33 -3
- data/app/controllers/alchemy/messages_controller.rb +47 -40
- data/app/controllers/alchemy/pages_controller.rb +8 -31
- data/app/controllers/alchemy/pictures_controller.rb +64 -30
- data/app/helpers/alchemy/admin/base_helper.rb +7 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +12 -0
- data/app/helpers/alchemy/elements_helper.rb +2 -0
- data/app/helpers/alchemy/pages_helper.rb +30 -10
- data/app/helpers/alchemy/url_helper.rb +1 -0
- data/app/models/alchemy/content.rb +1 -2
- data/app/models/alchemy/element.rb +47 -2
- data/app/models/alchemy/language.rb +27 -14
- data/app/models/alchemy/page.rb +1 -1
- data/app/models/alchemy/picture.rb +46 -41
- data/app/models/alchemy/site.rb +44 -0
- data/app/views/alchemy/admin/elements/_element_head.html.erb +1 -0
- data/app/views/alchemy/admin/languages/index.html.erb +23 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +27 -1
- data/app/views/alchemy/admin/pages/fold.js.erb +1 -0
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +24 -2
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +5 -4
- data/app/views/alchemy/admin/pictures/create.js.erb +1 -9
- data/app/views/alchemy/admin/pictures/info.html.erb +42 -0
- data/app/views/alchemy/admin/resources/_form.html.erb +0 -2
- data/app/views/alchemy/admin/resources/_resource.html.erb +2 -1
- data/app/views/alchemy/admin/resources/index.html.erb +2 -1
- data/app/views/alchemy/elements/show.html.erb +1 -6
- data/app/views/alchemy/elements/show.js.erb +4 -10
- data/app/views/alchemy/essences/_essence_link_view.html.erb +1 -0
- data/app/views/alchemy/search/_form.html.erb +9 -6
- data/app/views/alchemy/search/_result.html.erb +1 -1
- data/bin/alchemy +13 -120
- data/config/alchemy/config.yml +7 -11
- data/config/alchemy/modules.yml +24 -12
- data/config/authorization_rules.rb +6 -2
- data/config/initializers/dragonfly.rb +20 -0
- data/config/locales/alchemy.de.yml +57 -28
- data/config/locales/alchemy.en.yml +18 -4
- data/config/routes.rb +4 -2
- data/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +21 -0
- data/db/migrate/20121205155004_create_alchemy_sites.rb +14 -0
- data/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +6 -0
- data/lib/alchemy/capistrano.rb +7 -2
- data/lib/alchemy/ferret_search.rb +84 -0
- data/lib/alchemy/picture_attributes.rb +29 -0
- data/lib/alchemy/seeder.rb +10 -16
- data/lib/alchemy/upgrader.rb +59 -8
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +7 -4
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +3 -0
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +5 -1
- data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +1 -0
- data/lib/rails/generators/alchemy/scaffold/files/{pages.html.erb → application.html.erb} +0 -0
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +11 -20
- data/lib/rails/templates/alchemy.rb +1 -7
- data/lib/tasks/{database.rake → alchemy/db.rake} +1 -1
- data/lib/tasks/{install.rake → alchemy/install.rake} +9 -14
- data/lib/tasks/{upgrade.rake → alchemy/upgrade.rake} +1 -1
- data/spec/controllers/elements_controller_spec.rb +24 -9
- data/spec/controllers/pictures_controller_spec.rb +11 -8
- data/{app → spec/dummy/app}/views/alchemy/elements/_article_editor.html.erb +0 -0
- data/{app → spec/dummy/app}/views/alchemy/elements/_article_view.html.erb +0 -0
- data/{app → spec/dummy/app}/views/alchemy/elements/_headline_view.html.erb +0 -0
- data/{app → spec/dummy/app}/views/alchemy/elements/_news_view.html.erb +0 -0
- data/{app → spec/dummy/app}/views/alchemy/elements/_searchresult_view.html.erb +0 -0
- data/{app → spec/dummy/app}/views/alchemy/page_layouts/_standard.html.erb +0 -0
- data/spec/dummy/config/alchemy/elements.yml +86 -0
- data/spec/dummy/config/alchemy/page_layouts.yml +26 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +21 -0
- data/spec/dummy/db/migrate/20121205155004_create_alchemy_sites.rb +14 -0
- data/spec/dummy/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +6 -0
- data/spec/dummy/db/schema.rb +21 -6
- data/spec/factories.rb +6 -2
- data/spec/integration/translation_integration_spec.rb +4 -18
- data/spec/models/element_spec.rb +4 -4
- data/spec/models/picture_spec.rb +37 -20
- data/spec/models/site_spec.rb +69 -0
- data/spec/routing_spec.rb +115 -115
- data/spec/spec_helper.rb +1 -3
- data/spec/support/alchemy/specs_helpers.rb +4 -4
- data/vendor/assets/javascripts/jquery_plugins/jquery.html5uploader.js +1 -1
- metadata +72 -96
- data/app/assets/stylesheets/alchemy/standard_set.css +0 -440
- data/app/views/alchemy/elements/_bild_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_bild_text_editor.html.erb +0 -7
- data/app/views/alchemy/elements/_bild_text_view.html.erb +0 -9
- data/app/views/alchemy/elements/_bild_view.html.erb +0 -9
- data/app/views/alchemy/elements/_claim_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_claim_view.html.erb +0 -1
- data/app/views/alchemy/elements/_contactform_editor.html.erb +0 -4
- data/app/views/alchemy/elements/_contactform_view.html.erb +0 -78
- data/app/views/alchemy/elements/_download_editor.html.erb +0 -4
- data/app/views/alchemy/elements/_download_view.html.erb +0 -7
- data/app/views/alchemy/elements/_footnote_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_footnote_view.html.erb +0 -5
- data/app/views/alchemy/elements/_header_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_header_view.html.erb +0 -1
- data/app/views/alchemy/elements/_headline_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +0 -3
- data/app/views/alchemy/elements/_image_mosaic_view.html.erb +0 -14
- data/app/views/alchemy/elements/_intro_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_intro_image_text_editor.html.erb +0 -3
- data/app/views/alchemy/elements/_intro_image_text_view.html.erb +0 -16
- data/app/views/alchemy/elements/_intro_view.html.erb +0 -3
- data/app/views/alchemy/elements/_news_editor.html.erb +0 -3
- data/app/views/alchemy/elements/_searchresult_editor.html.erb +0 -4
- data/app/views/alchemy/elements/_sitemap_editor.html.erb +0 -3
- data/app/views/alchemy/elements/_sitemap_view.html.erb +0 -38
- data/app/views/alchemy/elements/_sitename_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_sitename_view.html.erb +0 -1
- data/app/views/alchemy/elements/_subheadline_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_subheadline_view.html.erb +0 -5
- data/app/views/alchemy/elements/_text_editor.html.erb +0 -1
- data/app/views/alchemy/elements/_text_view.html.erb +0 -3
- data/app/views/alchemy/page_layouts/_contact.html.erb +0 -14
- data/app/views/alchemy/page_layouts/_external.html.erb +0 -0
- data/app/views/alchemy/page_layouts/_intro.html.erb +0 -14
- data/app/views/alchemy/page_layouts/_layout_footer.html.erb +0 -14
- data/app/views/alchemy/page_layouts/_layout_header.html.erb +0 -14
- data/app/views/alchemy/page_layouts/_news.html.erb +0 -14
- data/app/views/alchemy/page_layouts/_newsletter_layout.html.erb +0 -1
- data/app/views/alchemy/page_layouts/_search.html.erb +0 -14
- data/app/views/alchemy/pictures/show.gif.flexi +0 -19
- data/app/views/alchemy/pictures/show.jpg.flexi +0 -19
- data/app/views/alchemy/pictures/show.png.flexi +0 -19
- data/app/views/alchemy/pictures/thumbnail.png.flexi +0 -13
- data/app/views/alchemy/pictures/zoom.jpg.flexi +0 -3
- data/app/views/alchemy/pictures/zoom.png.flexi +0 -3
- data/app/views/layouts/alchemy/pages.html.erb +0 -51
- data/config/alchemy/elements.yml +0 -274
- data/config/alchemy/page_layouts.yml +0 -75
- data/config/asset_packages.yml +0 -30
- data/config/initializers/localeapp.rb +0 -9
- data/lib/rails/generators/alchemy/plugin/files/translation.pot +0 -3
- data/lib/rails/generators/alchemy/plugin/files/translation_de.po +0 -3
- data/lib/rails/generators/alchemy/plugin/files/translation_en.po +0 -3
- data/lib/rails/generators/alchemy/plugin/plugin_generator.rb +0 -37
- data/lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb +0 -34
- data/lib/rails/generators/alchemy/plugin/templates/config.yml +0 -30
- data/lib/rails/generators/alchemy/plugin/templates/init.rb +0 -1
- data/lib/rails/generators/alchemy/plugin/templates/plugin.rb +0 -0
- data/lib/rails/generators/alchemy/plugin/templates/routes.rb +0 -10
- data/lib/tasks/fleximage.rake +0 -154
- data/spec/dummy/app/views/layouts/.gitkeep +0 -0
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
Alchemy CMS
|
2
2
|
===========
|
3
3
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/magiclabs/alchemy_cms.png?branch=
|
4
|
+
[![Build Status](https://secure.travis-ci.org/magiclabs/alchemy_cms.png?branch=master)](http://travis-ci.org/magiclabs/alchemy_cms)
|
5
5
|
[![Maintenance Status](http://stillmaintained.com/magiclabs/alchemy_cms.png)](http://stillmaintained.com/magiclabs/alchemy_cms)
|
6
6
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/magiclabs/alchemy_cms)
|
7
7
|
|
8
8
|
About
|
9
9
|
-----
|
10
10
|
|
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
|
+
|
11
13
|
Alchemy is a powerful, userfriendly and flexible Rails 3 CMS.
|
12
14
|
|
13
15
|
Read more on the [website](http://alchemy-cms.com) and in the [guidelines](http://guides.alchemy-cms.com).
|
@@ -54,7 +56,7 @@ Installation
|
|
54
56
|
|
55
57
|
Use the installer (recommended):
|
56
58
|
|
57
|
-
gem install alchemy_cms
|
59
|
+
gem install alchemy_cms --pre
|
58
60
|
alchemy new my_magicpage
|
59
61
|
|
60
62
|
Start the local server:
|
@@ -63,22 +65,12 @@ Start the local server:
|
|
63
65
|
|
64
66
|
Then just switch to your browser and open `http://localhost:3000`
|
65
67
|
|
66
|
-
Upgrading
|
67
|
-
------------
|
68
|
-
|
69
|
-
After updating Alchemy you should run the upgrader.
|
70
|
-
|
71
|
-
Run in terminal:
|
72
|
-
|
73
|
-
rake alchemy:upgrade
|
74
|
-
|
75
|
-
|
76
68
|
Add to existing Rails project
|
77
69
|
-----------------------------
|
78
70
|
|
79
71
|
In your Gemfile:
|
80
72
|
|
81
|
-
gem 'alchemy_cms', :github => 'magiclabs/alchemy_cms'
|
73
|
+
gem 'alchemy_cms', :github => 'magiclabs/alchemy_cms'
|
82
74
|
|
83
75
|
Run in terminal:
|
84
76
|
|
@@ -91,6 +83,16 @@ Just paste this in your `app/controllers/application_controller.rb`
|
|
91
83
|
|
92
84
|
`helper Alchemy::PagesHelper`
|
93
85
|
|
86
|
+
Upgrading
|
87
|
+
---------
|
88
|
+
|
89
|
+
After updating Alchemy you should run the upgrader.
|
90
|
+
|
91
|
+
Run in terminal:
|
92
|
+
|
93
|
+
rake alchemy:upgrade
|
94
|
+
|
95
|
+
|
94
96
|
Tipps
|
95
97
|
-----
|
96
98
|
|
@@ -111,10 +113,9 @@ Resources
|
|
111
113
|
|
112
114
|
* Homepage: <http://alchemy-cms.com>
|
113
115
|
* Live-Demo: <http://demo.alchemy-cms.com> (user: demo, password: demo)
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
* Sourcecode: <http://source.alchemy-cms.com>
|
116
|
+
* API Documentation: <http://rubydoc.info/github/magiclabs/alchemy_cms>
|
117
|
+
* Issue-Tracker: <https://github.com/magiclabs/alchemy_cms/issues>
|
118
|
+
* Sourcecode: <https://github.com/magiclabs/alchemy_cms>
|
118
119
|
* User Group: <http://groups.google.com/group/alchemy-cms>
|
119
120
|
* Changelog: <http://revision.io/alchemy_cms>
|
120
121
|
|
data/alchemy_cms.gemspec
CHANGED
@@ -16,9 +16,6 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.license = 'BSD New'
|
17
17
|
s.post_install_message = <<-POST_INSTALL
|
18
18
|
|
19
|
-
_______.-=` Alchemy CMS Post Install Message ´=-._______
|
20
|
-
|
21
|
-
|
22
19
|
If you are installing Alchemy the first time
|
23
20
|
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
24
21
|
$ bundle exec rake alchemy:install
|
@@ -28,9 +25,6 @@ _______.-=` Alchemy CMS Post Install Message ´=-._______
|
|
28
25
|
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
29
26
|
$ bundle exec rake alchemy:upgrade
|
30
27
|
|
31
|
-
|
32
|
-
♥ ♥ ♥ ♥ ♥ ♥ ♥ Thanks for using Alchemy CMS ♥ ♥ ♥ ♥ ♥ ♥ ♥
|
33
|
-
|
34
28
|
POST_INSTALL
|
35
29
|
|
36
30
|
s.files = `git ls-files`.split("\n")
|
@@ -38,15 +32,15 @@ POST_INSTALL
|
|
38
32
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
39
33
|
s.require_paths = ["lib"]
|
40
34
|
|
41
|
-
s.add_runtime_dependency %q<rails>, ["~> 3.2.
|
35
|
+
s.add_runtime_dependency %q<rails>, ["~> 3.2.8"]
|
42
36
|
s.add_runtime_dependency %q<authlogic>, ["~> 3.1.3"]
|
43
37
|
s.add_runtime_dependency %q<awesome_nested_set>, ["~> 2.0"]
|
44
38
|
s.add_runtime_dependency %q<acts-as-taggable-on>, ["~> 2.1"]
|
45
39
|
s.add_runtime_dependency %q<declarative_authorization>, ["= 0.5.5"]
|
46
|
-
s.add_runtime_dependency %q<
|
40
|
+
s.add_runtime_dependency %q<dragonfly>, ["~> 0.9.12"]
|
47
41
|
s.add_runtime_dependency %q<kaminari>, ["~> 0.13.0"]
|
48
42
|
s.add_runtime_dependency %q<acts_as_ferret>, ["~> 0.5"]
|
49
|
-
s.add_runtime_dependency %q<acts_as_list>, ["~> 0.1"]
|
43
|
+
s.add_runtime_dependency %q<acts_as_list>, ["~> 0.1.9"]
|
50
44
|
s.add_runtime_dependency %q<magiclabs-userstamp>, ["~> 2.0.2"]
|
51
45
|
s.add_runtime_dependency %q<dynamic_form>, ["~> 1.1"]
|
52
46
|
s.add_runtime_dependency %q<jquery-rails>, ["~> 2.1.3"]
|
@@ -60,8 +54,9 @@ POST_INSTALL
|
|
60
54
|
s.add_development_dependency %q<bumpy>
|
61
55
|
s.add_development_dependency %q<capybara>
|
62
56
|
s.add_development_dependency %q<factory_girl_rails>
|
63
|
-
s.add_development_dependency %q<rspec-rails
|
57
|
+
s.add_development_dependency %q<rspec-rails>
|
64
58
|
s.add_development_dependency %q<sqlite3>
|
65
59
|
s.add_development_dependency %q<yard>
|
60
|
+
s.add_development_dependency %q<redcarpet>
|
66
61
|
|
67
62
|
end
|
Binary file
|
@@ -224,6 +224,16 @@ div.image_spinner {
|
|
224
224
|
}
|
225
225
|
}
|
226
226
|
|
227
|
+
&.info {
|
228
|
+
top: auto;
|
229
|
+
left: 4px;
|
230
|
+
bottom: 24px;
|
231
|
+
|
232
|
+
a {
|
233
|
+
background: image-url('alchemy/icons.png') no-repeat -64px -168px;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
227
237
|
a {
|
228
238
|
display: block;
|
229
239
|
width: 16px;
|
@@ -284,3 +294,20 @@ div#tag_list {
|
|
284
294
|
}
|
285
295
|
}
|
286
296
|
}
|
297
|
+
|
298
|
+
div#pictures_page_list {
|
299
|
+
|
300
|
+
h2 { margin: 0 8px }
|
301
|
+
h3 { padding: 0 }
|
302
|
+
|
303
|
+
ul.list {
|
304
|
+
height: 100px;
|
305
|
+
overflow: auto;
|
306
|
+
margin: 8px;
|
307
|
+
background-color: $medium-gray;
|
308
|
+
|
309
|
+
ul { padding: 0 4px }
|
310
|
+
}
|
311
|
+
|
312
|
+
li.even, li.odd { padding: 4px }
|
313
|
+
}
|
@@ -95,16 +95,6 @@ ul {
|
|
95
95
|
float: left;
|
96
96
|
}
|
97
97
|
|
98
|
-
/* @group overlay */
|
99
|
-
|
100
|
-
#user_list li.table_row div.table_left span.icon img {
|
101
|
-
width: 16px;
|
102
|
-
height: 16px;
|
103
|
-
position: relative;
|
104
|
-
top: 1px;
|
105
|
-
left: -1px;
|
106
|
-
}
|
107
|
-
|
108
98
|
span.updated_at {
|
109
99
|
float: right;
|
110
100
|
}
|
@@ -311,16 +301,6 @@ li.odd {
|
|
311
301
|
background-color: #eaf3f9;
|
312
302
|
}
|
313
303
|
|
314
|
-
ul.list li.table_row {
|
315
|
-
display: block;
|
316
|
-
margin: 0 0 8px;
|
317
|
-
background-color: #ffffff;
|
318
|
-
position: relative;
|
319
|
-
line-height: 18px;
|
320
|
-
float: left;
|
321
|
-
width: 100%;
|
322
|
-
}
|
323
|
-
|
324
304
|
ul.list {
|
325
305
|
margin: 0;
|
326
306
|
padding: 2*$default-padding;
|
@@ -355,19 +335,6 @@ ul.list li.legend {
|
|
355
335
|
float: left;
|
356
336
|
}
|
357
337
|
|
358
|
-
ul.list div.detail_row {
|
359
|
-
background-color: $medium-gray;
|
360
|
-
font-size: 10px;
|
361
|
-
margin-top: 3px;
|
362
|
-
padding: $default-padding;
|
363
|
-
overflow: hidden;
|
364
|
-
}
|
365
|
-
|
366
|
-
ul.list div.detail_row div {
|
367
|
-
padding-top: 1px;
|
368
|
-
padding-bottom: 1px;
|
369
|
-
}
|
370
|
-
|
371
338
|
ul.list span.right {
|
372
339
|
float: right;
|
373
340
|
}
|
@@ -394,24 +361,6 @@ table td.tools .icon, table td.icon .icon {
|
|
394
361
|
margin-right: 4px;
|
395
362
|
}
|
396
363
|
|
397
|
-
.list li.table_row div.table_right span {
|
398
|
-
float: left;
|
399
|
-
text-align: left;
|
400
|
-
}
|
401
|
-
|
402
|
-
.list li.table_row div.table_center {
|
403
|
-
float: none;
|
404
|
-
padding-left: 24px;
|
405
|
-
}
|
406
|
-
|
407
|
-
.list div.table_left {
|
408
|
-
float: left;
|
409
|
-
}
|
410
|
-
|
411
|
-
.list div.table_right {
|
412
|
-
float: right;
|
413
|
-
}
|
414
|
-
|
415
364
|
#archive_all {
|
416
365
|
padding: 4*$default-padding;
|
417
366
|
|
@@ -184,7 +184,7 @@ div.element_editor {
|
|
184
184
|
|
185
185
|
.foot_note {
|
186
186
|
padding: $default-padding;
|
187
|
-
background-color:
|
187
|
+
background-color: $light_yellow;
|
188
188
|
@include rounded-corner;
|
189
189
|
margin-bottom: 1em;
|
190
190
|
}
|
@@ -257,7 +257,6 @@ a.element_move_button {
|
|
257
257
|
.element_head {
|
258
258
|
padding: 8px 0 6px;
|
259
259
|
position: relative;
|
260
|
-
overflow: hidden;
|
261
260
|
margin-bottom: 0;
|
262
261
|
border-top-color: #e3e3e3;
|
263
262
|
height: 20px;
|
@@ -808,3 +807,39 @@ textarea.default_tinymce, textarea.custom_tinymce {
|
|
808
807
|
line-height: 24px;
|
809
808
|
}
|
810
809
|
}
|
810
|
+
|
811
|
+
a.element_hint {
|
812
|
+
position: absolute;
|
813
|
+
right: 32px;
|
814
|
+
top: 8px;
|
815
|
+
width: 16px;
|
816
|
+
height: 16px;
|
817
|
+
|
818
|
+
&:hover span.bubble { display: block }
|
819
|
+
|
820
|
+
span.bubble {
|
821
|
+
display: none;
|
822
|
+
background: $light_yellow;
|
823
|
+
@include rounded-corner;
|
824
|
+
@include box-shadow(0 4px 24px $dark-gray);
|
825
|
+
position: absolute;
|
826
|
+
right: -25px;
|
827
|
+
top: 26px;
|
828
|
+
z-index: 100;
|
829
|
+
padding: 8px;
|
830
|
+
line-height: 1.5em;
|
831
|
+
min-width: 180px;
|
832
|
+
|
833
|
+
&:before {
|
834
|
+
content: '';
|
835
|
+
position: absolute;
|
836
|
+
top: -8px;
|
837
|
+
right: 24px;
|
838
|
+
width: 0px;
|
839
|
+
height: 0px;
|
840
|
+
border-style: solid;
|
841
|
+
border-width: 0 8px 8px 8px;
|
842
|
+
border-color: transparent transparent $light_yellow transparent;
|
843
|
+
}
|
844
|
+
}
|
845
|
+
}
|
@@ -10,7 +10,7 @@ module Alchemy
|
|
10
10
|
def index
|
11
11
|
@size = params[:size].present? ? params[:size] : 'medium'
|
12
12
|
@pictures = Picture.scoped
|
13
|
-
@pictures = @pictures.tagged_with(params[:tagged_with]
|
13
|
+
@pictures = @pictures.tagged_with(params[:tagged_with]) if params[:tagged_with].present?
|
14
14
|
case params[:filter]
|
15
15
|
when 'recent'
|
16
16
|
@pictures = @pictures.recent
|
@@ -46,7 +46,7 @@ module Alchemy
|
|
46
46
|
:upload_hash => params[:upload_hash]
|
47
47
|
)
|
48
48
|
@picture.name = @picture.humanized_name
|
49
|
-
@picture.save
|
49
|
+
@picture.save!
|
50
50
|
@size = params[:size] || 'medium'
|
51
51
|
if in_overlay?
|
52
52
|
@while_assigning = true
|
@@ -58,12 +58,13 @@ module Alchemy
|
|
58
58
|
end
|
59
59
|
@pictures = Picture.find_paginated(params, pictures_per_page_for_size(@size))
|
60
60
|
@message = t('Picture uploaded succesfully', :name => @picture.name)
|
61
|
-
# Are we using the
|
61
|
+
# Are we using the single file uploader?
|
62
62
|
if params[Rails.application.config.session_options[:key]].blank?
|
63
63
|
flash[:notice] = @message
|
64
|
-
#redirect_to :back
|
65
|
-
#TODO temporary workaround; has to be fixed.
|
66
64
|
redirect_to admin_pictures_path(:filter => 'last_upload')
|
65
|
+
else
|
66
|
+
# Or the mutliple file uploader?
|
67
|
+
render # create.js.erb template
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
@@ -103,14 +104,19 @@ module Alchemy
|
|
103
104
|
def delete_multiple
|
104
105
|
if request.delete? && params[:picture_ids].present?
|
105
106
|
pictures = Picture.find(params[:picture_ids])
|
106
|
-
names =
|
107
|
+
names = []
|
107
108
|
pictures.each do |picture|
|
109
|
+
next unless picture.deletable?
|
110
|
+
names << picture.name
|
108
111
|
picture.destroy
|
109
112
|
end
|
110
|
-
flash[:notice] = t("Pictures deleted successfully", :names => names)
|
113
|
+
flash[:notice] = t("Pictures deleted successfully", :names => names.to_sentence)
|
111
114
|
else
|
112
115
|
flash[:notice] = t("Could not delete Pictures")
|
113
116
|
end
|
117
|
+
rescue Exception => e
|
118
|
+
flash[:error] = e.message
|
119
|
+
ensure
|
114
120
|
redirect_to_index
|
115
121
|
end
|
116
122
|
|
@@ -119,8 +125,11 @@ module Alchemy
|
|
119
125
|
name = @picture.name
|
120
126
|
@picture.destroy
|
121
127
|
flash[:notice] = t("Picture deleted successfully", :name => name)
|
128
|
+
rescue Exception => e
|
129
|
+
flash[:error] = e.message
|
130
|
+
ensure
|
122
131
|
@redirect_url = admin_pictures_path(:per_page => params[:per_page], :page => params[:page], :query => params[:query])
|
123
|
-
render :
|
132
|
+
render :redirect
|
124
133
|
end
|
125
134
|
|
126
135
|
def flush
|
@@ -133,6 +142,11 @@ module Alchemy
|
|
133
142
|
render :layout => false
|
134
143
|
end
|
135
144
|
|
145
|
+
def info
|
146
|
+
@picture = Picture.find(params[:id])
|
147
|
+
render :layout => false
|
148
|
+
end
|
149
|
+
|
136
150
|
private
|
137
151
|
|
138
152
|
def pictures_per_page_for_size(size)
|