alchemy_cms 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -14,4 +14,7 @@ tmp
14
14
  spec/dummy/index/
15
15
  log
16
16
  spec/dummy/uploads/
17
- spec/dummy/.sass-cache/
17
+ spec/dummy/.sass-cache/
18
+ spec/dummy/public/**/alchemy
19
+ spec/dummy/db/migrate
20
+ spec/dummy/db/seeds.rb
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "http://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  group :development, :test do
7
- gem 'gettext', '>=1.9.3', :require => false
7
+ gem 'gettext', '>=1.93.0', :require => false
8
8
  end
9
9
 
10
10
  group :test do
data/README.md CHANGED
@@ -46,7 +46,7 @@ Features
46
46
  - Completely free:
47
47
  - BSD License
48
48
  - No Enterprise Licences, or Community Editions
49
- - Hostable on any Server that supports RubyOnRails and ImageMagick ([Software Requirements](https://github.com/magiclabs/alchemy/wiki/Software-Requirements))
49
+ - Hostable on any Server that supports RubyOnRails and ImageMagick ([Software Requirements](https://github.com/magiclabs/alchemy_cms/wiki/Software-Requirements))
50
50
 
51
51
  Rails Version
52
52
  -------------
@@ -1,6 +1,7 @@
1
1
  class Admin::EssenceFilesController < AlchemyController
2
2
 
3
3
  filter_access_to :all
4
+ helper :contents
4
5
 
5
6
  def edit
6
7
  @content = Content.find(params[:id])
@@ -9,8 +9,8 @@ class Attachment < ActiveRecord::Base
9
9
  )
10
10
  validates_as_attachment
11
11
 
12
- def name
13
- read_attribute(:name).split('.').first
12
+ def urlname
13
+ CGI.escape(read_attribute(:filename).split('.').first)
14
14
  end
15
15
 
16
16
  def extension
@@ -10,7 +10,7 @@ class EssenceFile < ActiveRecord::Base
10
10
  # Saves the ingredient
11
11
  def save_ingredient(params, options = {})
12
12
  return true if params.blank?
13
- self.attachment_id = params["attachment_id"].to_s
13
+ self.attachment_id = params["attachment"].to_s
14
14
  self.save
15
15
  end
16
16
 
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'file') %>
@@ -0,0 +1,3 @@
1
+ <div class="download" <%= element_preview_code(element) -%>>
2
+ <%= render_essence_view_by_name(element, 'file') %>
3
+ </div>
@@ -28,6 +28,7 @@
28
28
  <%= content.ingredient.name rescue ("&#x2190;" + _('assign_file_from_archive')).html_safe %>
29
29
  </div>
30
30
  <%- unless content.ingredient.nil? -%>
31
+ <%= hidden_field_tag content.form_field_name, content.ingredient.id %>
31
32
  <div class="essence_file_tools">
32
33
  <%= link_to_overlay_window("",
33
34
  admin_attachments_path(
@@ -1,6 +1,10 @@
1
1
  <%= link_to(
2
2
  h(content.essence.attachment.name),
3
- download_attachment_path(:id => content.essence.attachment.id, :name => content.essence.attachment.filename),
3
+ download_attachment_path(
4
+ :id => content.essence.attachment.id,
5
+ :name => content.essence.attachment.urlname,
6
+ :format => content.essence.attachment.suffix
7
+ ),
4
8
  :class => "file_link #{content.essence.css_class.blank? ? "" : content.essence.css_class}",
5
9
  :title => "#{content.essence.title.blank? ? content.essence.attachment.filename : content.essence.title}"
6
10
  ) if content.essence.attachment %>
@@ -572,7 +572,7 @@ a.drop_down_select img {
572
572
  .js_filter_field_box .js_filter_field_clear {
573
573
  width: 15px;
574
574
  height: 15px;
575
- background: url(/images/alchemy/icons.png) no-repeat 0 -104px;
575
+ background: url(/images/alchemy/icons.png) no-repeat 0 -70px;
576
576
  position: absolute;
577
577
  right: 8px;
578
578
  top: 4px;
@@ -553,7 +553,7 @@ div.file_icon span.icon {
553
553
  div.file_icon a.assign_file {
554
554
  display: block;
555
555
  height: 16px;
556
- background: url(/images/alchemy/icons.png) no-repeat -240px -24px;
556
+ background: url(/images/alchemy/icons.png) no-repeat -480px -40px;
557
557
  width: 16px;
558
558
  margin: 4px;
559
559
  }
@@ -583,11 +583,11 @@ div.essence_file_tools a{
583
583
  }
584
584
 
585
585
  div.essence_file_tools a.assign_file {
586
- background: url(/images/alchemy/icons.png) -256px -24px;
586
+ background: url(/images/alchemy/icons.png) -512px -40px;
587
587
  }
588
588
 
589
589
  div.essence_file_tools a.edit_file {
590
- background: url(/images/alchemy/icons.png) -16px -24px;
590
+ background: url(/images/alchemy/icons.png) -160px -167px;
591
591
  }
592
592
 
593
593
  td.content_editor_essence_type {
@@ -191,6 +191,11 @@
191
191
  - name: subheadline
192
192
  type: EssenceText
193
193
 
194
+ - name: download
195
+ contents:
196
+ - name: file
197
+ type: EssenceFile
198
+
194
199
  - name: news
195
200
  contents:
196
201
  - name: date
@@ -33,7 +33,7 @@
33
33
  autogenerate: [header, intro_image_text]
34
34
 
35
35
  - name: standard
36
- elements: [article, claim, header, bild, bild_text, text, intro, headline, image_mosaic]
36
+ elements: [article, claim, header, bild, bild_text, text, intro, headline, image_mosaic, download]
37
37
  autogenerate: [header, claim, article]
38
38
 
39
39
  - name: contact
@@ -70,6 +70,7 @@ de:
70
70
  news_headline: "News Überschrift"
71
71
  image_mosaic:
72
72
  caption: "Mosaik Bildunterschrift"
73
+ file: Datei
73
74
 
74
75
  content_validations:
75
76
  errors:
data/config/routes.rb CHANGED
@@ -14,7 +14,7 @@ Rails.application.routes.draw do
14
14
  :as => :leave_admin
15
15
  match '/admin/logout' => 'admin#logout',
16
16
  :as => :logout
17
- match '/attachment/:id/download(/:name)(.:suffix)' => 'attachments#download',
17
+ match '/attachment/:id/download(/:name)(.:format)' => 'attachments#download',
18
18
  :as => :download_attachment
19
19
  match '/attachment/:id/show' => 'attachments#show',
20
20
  :as => :show_attachment
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.0.4"
3
+ VERSION = "2.0.5"
4
4
 
5
5
  end
data/spec/routing_spec.rb CHANGED
@@ -12,7 +12,7 @@ describe "The Routing", :type => :routing do
12
12
  :action => "download",
13
13
  :id => "32",
14
14
  :name => "Presseveranstaltung",
15
- :suffix => "pdf"
15
+ :format => "pdf"
16
16
  )
17
17
  end
18
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-12-09 00:00:00.000000000 Z
14
+ date: 2011-12-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
18
- requirement: &70179184164880 !ruby/object:Gem::Requirement
18
+ requirement: &70254802650620 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '3.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70179184164880
26
+ version_requirements: *70254802650620
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: authlogic
29
- requirement: &70179184163920 !ruby/object:Gem::Requirement
29
+ requirement: &70254802650100 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ~>
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '3.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70179184163920
37
+ version_requirements: *70254802650100
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: awesome_nested_set
40
- requirement: &70179184163160 !ruby/object:Gem::Requirement
40
+ requirement: &70254802649620 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '2.0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70179184163160
48
+ version_requirements: *70254802649620
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: declarative_authorization
51
- requirement: &70179184162200 !ruby/object:Gem::Requirement
51
+ requirement: &70254802649140 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0.5'
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70179184162200
59
+ version_requirements: *70254802649140
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: tvdeyen-fleximage
62
- requirement: &70179184160540 !ruby/object:Gem::Requirement
62
+ requirement: &70254802648660 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ~>
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.0.7
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *70179184160540
70
+ version_requirements: *70254802648660
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: gettext_i18n_rails
73
- requirement: &70179184159840 !ruby/object:Gem::Requirement
73
+ requirement: &70254802648180 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0.3'
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *70179184159840
81
+ version_requirements: *70254802648180
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: will_paginate
84
- requirement: &70179184158920 !ruby/object:Gem::Requirement
84
+ requirement: &70254806302460 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ~>
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '3.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *70179184158920
92
+ version_requirements: *70254806302460
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: acts_as_ferret
95
- requirement: &70179184157880 !ruby/object:Gem::Requirement
95
+ requirement: &70254802664160 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ~>
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0.5'
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *70179184157880
103
+ version_requirements: *70254802664160
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: acts_as_list
106
- requirement: &70179184156820 !ruby/object:Gem::Requirement
106
+ requirement: &70254802663680 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ~>
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: '0.1'
112
112
  type: :runtime
113
113
  prerelease: false
114
- version_requirements: *70179184156820
114
+ version_requirements: *70254802663680
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: userstamp
117
- requirement: &70179184156120 !ruby/object:Gem::Requirement
117
+ requirement: &70254802663200 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ~>
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: 2.0.1
123
123
  type: :runtime
124
124
  prerelease: false
125
- version_requirements: *70179184156120
125
+ version_requirements: *70254802663200
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: dynamic_form
128
- requirement: &70179184155520 !ruby/object:Gem::Requirement
128
+ requirement: &70254802662720 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ~>
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: '1.1'
134
134
  type: :runtime
135
135
  prerelease: false
136
- version_requirements: *70179184155520
136
+ version_requirements: *70254802662720
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: jquery-rails
139
- requirement: &70179184154900 !ruby/object:Gem::Requirement
139
+ requirement: &70254802662240 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ~>
@@ -144,10 +144,10 @@ dependencies:
144
144
  version: '1.0'
145
145
  type: :runtime
146
146
  prerelease: false
147
- version_requirements: *70179184154900
147
+ version_requirements: *70254802662240
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: tinymce_hammer
150
- requirement: &70179184154380 !ruby/object:Gem::Requirement
150
+ requirement: &70254802661760 !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
153
153
  - - ~>
@@ -155,10 +155,10 @@ dependencies:
155
155
  version: '0.2'
156
156
  type: :runtime
157
157
  prerelease: false
158
- version_requirements: *70179184154380
158
+ version_requirements: *70254802661760
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: attachment_magic
161
- requirement: &70179184153720 !ruby/object:Gem::Requirement
161
+ requirement: &70254802661280 !ruby/object:Gem::Requirement
162
162
  none: false
163
163
  requirements:
164
164
  - - ~>
@@ -166,10 +166,10 @@ dependencies:
166
166
  version: 0.1.1
167
167
  type: :runtime
168
168
  prerelease: false
169
- version_requirements: *70179184153720
169
+ version_requirements: *70254802661280
170
170
  - !ruby/object:Gem::Dependency
171
171
  name: rspec-rails
172
- requirement: &70179184153080 !ruby/object:Gem::Requirement
172
+ requirement: &70254802660800 !ruby/object:Gem::Requirement
173
173
  none: false
174
174
  requirements:
175
175
  - - ~>
@@ -177,10 +177,10 @@ dependencies:
177
177
  version: '2.6'
178
178
  type: :development
179
179
  prerelease: false
180
- version_requirements: *70179184153080
180
+ version_requirements: *70254802660800
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: sqlite3
183
- requirement: &70179184152520 !ruby/object:Gem::Requirement
183
+ requirement: &70254802660420 !ruby/object:Gem::Requirement
184
184
  none: false
185
185
  requirements:
186
186
  - - ! '>='
@@ -188,10 +188,10 @@ dependencies:
188
188
  version: '0'
189
189
  type: :development
190
190
  prerelease: false
191
- version_requirements: *70179184152520
191
+ version_requirements: *70254802660420
192
192
  - !ruby/object:Gem::Dependency
193
193
  name: ruby-debug19
194
- requirement: &70179184151620 !ruby/object:Gem::Requirement
194
+ requirement: &70254802659900 !ruby/object:Gem::Requirement
195
195
  none: false
196
196
  requirements:
197
197
  - - ! '>='
@@ -199,7 +199,7 @@ dependencies:
199
199
  version: '0'
200
200
  type: :development
201
201
  prerelease: false
202
- version_requirements: *70179184151620
202
+ version_requirements: *70254802659900
203
203
  description: Alchemy is an awesome Rails CMS with an extremely flexible content storing
204
204
  architecture.
205
205
  email:
@@ -392,6 +392,8 @@ files:
392
392
  - app/views/elements/_claim_view.html.erb
393
393
  - app/views/elements/_contactform_editor.html.erb
394
394
  - app/views/elements/_contactform_view.html.erb
395
+ - app/views/elements/_download_editor.html.erb
396
+ - app/views/elements/_download_view.html.erb
395
397
  - app/views/elements/_editor_not_found.html.erb
396
398
  - app/views/elements/_footnote_editor.html.erb
397
399
  - app/views/elements/_footnote_view.html.erb
@@ -732,12 +734,6 @@ files:
732
734
  - spec/dummy/public/422.html
733
735
  - spec/dummy/public/500.html
734
736
  - spec/dummy/public/favicon.ico
735
- - spec/dummy/public/javascripts/application.js
736
- - spec/dummy/public/javascripts/controls.js
737
- - spec/dummy/public/javascripts/dragdrop.js
738
- - spec/dummy/public/javascripts/effects.js
739
- - spec/dummy/public/javascripts/prototype.js
740
- - spec/dummy/public/javascripts/rails.js
741
737
  - spec/dummy/public/stylesheets/.gitkeep
742
738
  - spec/dummy/script/rails
743
739
  - spec/factories.rb
@@ -818,12 +814,6 @@ test_files:
818
814
  - spec/dummy/public/422.html
819
815
  - spec/dummy/public/500.html
820
816
  - spec/dummy/public/favicon.ico
821
- - spec/dummy/public/javascripts/application.js
822
- - spec/dummy/public/javascripts/controls.js
823
- - spec/dummy/public/javascripts/dragdrop.js
824
- - spec/dummy/public/javascripts/effects.js
825
- - spec/dummy/public/javascripts/prototype.js
826
- - spec/dummy/public/javascripts/rails.js
827
817
  - spec/dummy/public/stylesheets/.gitkeep
828
818
  - spec/dummy/script/rails
829
819
  - spec/factories.rb