alchemy_cms 2.4.1 → 2.5.0.b2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. data/.travis.yml +1 -1
  2. data/README.md +18 -17
  3. data/alchemy_cms.gemspec +5 -10
  4. data/app/assets/images/alchemy/icons.png +0 -0
  5. data/app/assets/stylesheets/alchemy/archive.scss +27 -0
  6. data/app/assets/stylesheets/alchemy/base.scss +0 -51
  7. data/app/assets/stylesheets/alchemy/elements.scss +37 -2
  8. data/app/assets/stylesheets/alchemy/icons.scss +4 -0
  9. data/app/assets/stylesheets/alchemy/modules.scss +4 -0
  10. data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
  11. data/app/assets/stylesheets/alchemy/tables.scss +1 -1
  12. data/app/assets/stylesheets/alchemy/variables.scss +1 -0
  13. data/app/controllers/alchemy/admin/pages_controller.rb +1 -0
  14. data/app/controllers/alchemy/admin/pictures_controller.rb +22 -8
  15. data/app/controllers/alchemy/admin/resources_controller.rb +1 -1
  16. data/app/controllers/alchemy/admin/sites_controller.rb +6 -0
  17. data/app/controllers/alchemy/base_controller.rb +8 -0
  18. data/app/controllers/alchemy/elements_controller.rb +33 -3
  19. data/app/controllers/alchemy/messages_controller.rb +47 -40
  20. data/app/controllers/alchemy/pages_controller.rb +8 -31
  21. data/app/controllers/alchemy/pictures_controller.rb +64 -30
  22. data/app/helpers/alchemy/admin/base_helper.rb +7 -0
  23. data/app/helpers/alchemy/admin/pages_helper.rb +12 -0
  24. data/app/helpers/alchemy/elements_helper.rb +2 -0
  25. data/app/helpers/alchemy/pages_helper.rb +30 -10
  26. data/app/helpers/alchemy/url_helper.rb +1 -0
  27. data/app/models/alchemy/content.rb +1 -2
  28. data/app/models/alchemy/element.rb +47 -2
  29. data/app/models/alchemy/language.rb +27 -14
  30. data/app/models/alchemy/page.rb +1 -1
  31. data/app/models/alchemy/picture.rb +46 -41
  32. data/app/models/alchemy/site.rb +44 -0
  33. data/app/views/alchemy/admin/elements/_element_head.html.erb +1 -0
  34. data/app/views/alchemy/admin/languages/index.html.erb +23 -0
  35. data/app/views/alchemy/admin/pages/edit.html.erb +27 -1
  36. data/app/views/alchemy/admin/pages/fold.js.erb +1 -0
  37. data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -0
  38. data/app/views/alchemy/admin/pictures/_picture.html.erb +24 -2
  39. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +5 -4
  40. data/app/views/alchemy/admin/pictures/create.js.erb +1 -9
  41. data/app/views/alchemy/admin/pictures/info.html.erb +42 -0
  42. data/app/views/alchemy/admin/resources/_form.html.erb +0 -2
  43. data/app/views/alchemy/admin/resources/_resource.html.erb +2 -1
  44. data/app/views/alchemy/admin/resources/index.html.erb +2 -1
  45. data/app/views/alchemy/elements/show.html.erb +1 -6
  46. data/app/views/alchemy/elements/show.js.erb +4 -10
  47. data/app/views/alchemy/essences/_essence_link_view.html.erb +1 -0
  48. data/app/views/alchemy/search/_form.html.erb +9 -6
  49. data/app/views/alchemy/search/_result.html.erb +1 -1
  50. data/bin/alchemy +13 -120
  51. data/config/alchemy/config.yml +7 -11
  52. data/config/alchemy/modules.yml +24 -12
  53. data/config/authorization_rules.rb +6 -2
  54. data/config/initializers/dragonfly.rb +20 -0
  55. data/config/locales/alchemy.de.yml +57 -28
  56. data/config/locales/alchemy.en.yml +18 -4
  57. data/config/routes.rb +4 -2
  58. data/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +21 -0
  59. data/db/migrate/20121205155004_create_alchemy_sites.rb +14 -0
  60. data/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +6 -0
  61. data/lib/alchemy/capistrano.rb +7 -2
  62. data/lib/alchemy/ferret_search.rb +84 -0
  63. data/lib/alchemy/picture_attributes.rb +29 -0
  64. data/lib/alchemy/seeder.rb +10 -16
  65. data/lib/alchemy/upgrader.rb +59 -8
  66. data/lib/alchemy/version.rb +1 -1
  67. data/lib/alchemy_cms.rb +7 -4
  68. data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +3 -0
  69. data/lib/rails/generators/alchemy/elements/elements_generator.rb +5 -1
  70. data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +1 -0
  71. data/lib/rails/generators/alchemy/scaffold/files/{pages.html.erb → application.html.erb} +0 -0
  72. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +11 -20
  73. data/lib/rails/templates/alchemy.rb +1 -7
  74. data/lib/tasks/{database.rake → alchemy/db.rake} +1 -1
  75. data/lib/tasks/{install.rake → alchemy/install.rake} +9 -14
  76. data/lib/tasks/{upgrade.rake → alchemy/upgrade.rake} +1 -1
  77. data/spec/controllers/elements_controller_spec.rb +24 -9
  78. data/spec/controllers/pictures_controller_spec.rb +11 -8
  79. data/{app → spec/dummy/app}/views/alchemy/elements/_article_editor.html.erb +0 -0
  80. data/{app → spec/dummy/app}/views/alchemy/elements/_article_view.html.erb +0 -0
  81. data/{app → spec/dummy/app}/views/alchemy/elements/_headline_view.html.erb +0 -0
  82. data/{app → spec/dummy/app}/views/alchemy/elements/_news_view.html.erb +0 -0
  83. data/{app → spec/dummy/app}/views/alchemy/elements/_searchresult_view.html.erb +0 -0
  84. data/{app → spec/dummy/app}/views/alchemy/page_layouts/_standard.html.erb +0 -0
  85. data/spec/dummy/config/alchemy/elements.yml +86 -0
  86. data/spec/dummy/config/alchemy/page_layouts.yml +26 -0
  87. data/spec/dummy/config/application.rb +1 -1
  88. data/spec/dummy/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +21 -0
  89. data/spec/dummy/db/migrate/20121205155004_create_alchemy_sites.rb +14 -0
  90. data/spec/dummy/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +6 -0
  91. data/spec/dummy/db/schema.rb +21 -6
  92. data/spec/factories.rb +6 -2
  93. data/spec/integration/translation_integration_spec.rb +4 -18
  94. data/spec/models/element_spec.rb +4 -4
  95. data/spec/models/picture_spec.rb +37 -20
  96. data/spec/models/site_spec.rb +69 -0
  97. data/spec/routing_spec.rb +115 -115
  98. data/spec/spec_helper.rb +1 -3
  99. data/spec/support/alchemy/specs_helpers.rb +4 -4
  100. data/vendor/assets/javascripts/jquery_plugins/jquery.html5uploader.js +1 -1
  101. metadata +72 -96
  102. data/app/assets/stylesheets/alchemy/standard_set.css +0 -440
  103. data/app/views/alchemy/elements/_bild_editor.html.erb +0 -1
  104. data/app/views/alchemy/elements/_bild_text_editor.html.erb +0 -7
  105. data/app/views/alchemy/elements/_bild_text_view.html.erb +0 -9
  106. data/app/views/alchemy/elements/_bild_view.html.erb +0 -9
  107. data/app/views/alchemy/elements/_claim_editor.html.erb +0 -1
  108. data/app/views/alchemy/elements/_claim_view.html.erb +0 -1
  109. data/app/views/alchemy/elements/_contactform_editor.html.erb +0 -4
  110. data/app/views/alchemy/elements/_contactform_view.html.erb +0 -78
  111. data/app/views/alchemy/elements/_download_editor.html.erb +0 -4
  112. data/app/views/alchemy/elements/_download_view.html.erb +0 -7
  113. data/app/views/alchemy/elements/_footnote_editor.html.erb +0 -1
  114. data/app/views/alchemy/elements/_footnote_view.html.erb +0 -5
  115. data/app/views/alchemy/elements/_header_editor.html.erb +0 -1
  116. data/app/views/alchemy/elements/_header_view.html.erb +0 -1
  117. data/app/views/alchemy/elements/_headline_editor.html.erb +0 -1
  118. data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +0 -3
  119. data/app/views/alchemy/elements/_image_mosaic_view.html.erb +0 -14
  120. data/app/views/alchemy/elements/_intro_editor.html.erb +0 -1
  121. data/app/views/alchemy/elements/_intro_image_text_editor.html.erb +0 -3
  122. data/app/views/alchemy/elements/_intro_image_text_view.html.erb +0 -16
  123. data/app/views/alchemy/elements/_intro_view.html.erb +0 -3
  124. data/app/views/alchemy/elements/_news_editor.html.erb +0 -3
  125. data/app/views/alchemy/elements/_searchresult_editor.html.erb +0 -4
  126. data/app/views/alchemy/elements/_sitemap_editor.html.erb +0 -3
  127. data/app/views/alchemy/elements/_sitemap_view.html.erb +0 -38
  128. data/app/views/alchemy/elements/_sitename_editor.html.erb +0 -1
  129. data/app/views/alchemy/elements/_sitename_view.html.erb +0 -1
  130. data/app/views/alchemy/elements/_subheadline_editor.html.erb +0 -1
  131. data/app/views/alchemy/elements/_subheadline_view.html.erb +0 -5
  132. data/app/views/alchemy/elements/_text_editor.html.erb +0 -1
  133. data/app/views/alchemy/elements/_text_view.html.erb +0 -3
  134. data/app/views/alchemy/page_layouts/_contact.html.erb +0 -14
  135. data/app/views/alchemy/page_layouts/_external.html.erb +0 -0
  136. data/app/views/alchemy/page_layouts/_intro.html.erb +0 -14
  137. data/app/views/alchemy/page_layouts/_layout_footer.html.erb +0 -14
  138. data/app/views/alchemy/page_layouts/_layout_header.html.erb +0 -14
  139. data/app/views/alchemy/page_layouts/_news.html.erb +0 -14
  140. data/app/views/alchemy/page_layouts/_newsletter_layout.html.erb +0 -1
  141. data/app/views/alchemy/page_layouts/_search.html.erb +0 -14
  142. data/app/views/alchemy/pictures/show.gif.flexi +0 -19
  143. data/app/views/alchemy/pictures/show.jpg.flexi +0 -19
  144. data/app/views/alchemy/pictures/show.png.flexi +0 -19
  145. data/app/views/alchemy/pictures/thumbnail.png.flexi +0 -13
  146. data/app/views/alchemy/pictures/zoom.jpg.flexi +0 -3
  147. data/app/views/alchemy/pictures/zoom.png.flexi +0 -3
  148. data/app/views/layouts/alchemy/pages.html.erb +0 -51
  149. data/config/alchemy/elements.yml +0 -274
  150. data/config/alchemy/page_layouts.yml +0 -75
  151. data/config/asset_packages.yml +0 -30
  152. data/config/initializers/localeapp.rb +0 -9
  153. data/lib/rails/generators/alchemy/plugin/files/translation.pot +0 -3
  154. data/lib/rails/generators/alchemy/plugin/files/translation_de.po +0 -3
  155. data/lib/rails/generators/alchemy/plugin/files/translation_en.po +0 -3
  156. data/lib/rails/generators/alchemy/plugin/plugin_generator.rb +0 -37
  157. data/lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb +0 -34
  158. data/lib/rails/generators/alchemy/plugin/templates/config.yml +0 -30
  159. data/lib/rails/generators/alchemy/plugin/templates/init.rb +0 -1
  160. data/lib/rails/generators/alchemy/plugin/templates/plugin.rb +0 -0
  161. data/lib/rails/generators/alchemy/plugin/templates/routes.rb +0 -10
  162. data/lib/tasks/fleximage.rake +0 -154
  163. data/spec/dummy/app/views/layouts/.gitkeep +0 -0
@@ -3,7 +3,7 @@ rvm:
3
3
  - 1.9.3
4
4
  branches:
5
5
  only:
6
- - 2.4-stable
6
+ - master
7
7
  before_script:
8
8
  - sudo spec/support/ci/install_phantomjs
9
9
  - "export PATH=phantomjs/bin:$PATH"
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=2.4-stable)](http://travis-ci.org/magiclabs/alchemy_cms)
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', :branch => '2.4-stable'
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
- * Wiki: <http://wiki.alchemy-cms.com>
115
- * API Documentation: <http://api.alchemy-cms.com>
116
- * Issue-Tracker: <http://issues.alchemy-cms.com>
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
 
@@ -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.11"]
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<tvdeyen-fleximage>, ["~> 1.2.0"]
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>, ['2.12.0']
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
@@ -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: #fffdef;
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
+ }
@@ -123,6 +123,10 @@
123
123
  background-position: -352px -39px;
124
124
  }
125
125
 
126
+ &.hint {
127
+ background-position: -446px -105px;
128
+ }
129
+
126
130
  &.image {
127
131
  background-position: -224px -136px;
128
132
  }
@@ -24,6 +24,10 @@ span.module.languages {
24
24
  background-position: -200px 0;
25
25
  }
26
26
 
27
+ span.module.sites {
28
+ background-position: -316px 0;
29
+ }
30
+
27
31
  span.module.tags {
28
32
  background-position: -280px 0;
29
33
  }
@@ -237,7 +237,7 @@ span.page_status {
237
237
  margin: 2px 2px 0 4px;
238
238
 
239
239
  &.restricted {
240
- background: -258px -39px;
240
+ background-position: -258px -39px;
241
241
  }
242
242
 
243
243
  &.not_restricted {
@@ -136,7 +136,7 @@ table tr td.icon {
136
136
  }
137
137
 
138
138
  table.list tr:hover td {
139
- background-color: #fffdef;
139
+ background-color: $light_yellow;
140
140
  }
141
141
 
142
142
  td.file_type {
@@ -5,6 +5,7 @@ $very-light-blue: lighten($light-blue, 12%);
5
5
  $light-gray: #EDEDED;
6
6
  $medium-gray: #E3E3E3;
7
7
  $dark-gray: #666666;
8
+ $light_yellow: #ffffdc;
8
9
 
9
10
  $default-padding: 4px;
10
11
  $default-margin: $default-padding;
@@ -1,6 +1,7 @@
1
1
  module Alchemy
2
2
  module Admin
3
3
  class PagesController < Alchemy::Admin::BaseController
4
+ include Alchemy::FerretSearch
4
5
 
5
6
  helper "alchemy/pages"
6
7
 
@@ -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], :any => true) if params[:tagged_with].present?
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 Flash uploader? Or the plain html file uploader?
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 = pictures.map(&:name).to_sentence
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 :action => :redirect
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)