imagine_cms 3.0.7 → 3.0.8

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.
@@ -52,7 +52,7 @@
52
52
  position: absolute;
53
53
  width: 100%;
54
54
  height: 1px;
55
- background: transparent url(/images/cropper/marqueeHoriz.gif) repeat-x 0 0;
55
+ background: transparent url(/assets/cropper/marqueeHoriz.gif) repeat-x 0 0;
56
56
  z-index: 3;
57
57
  }
58
58
 
@@ -60,7 +60,7 @@
60
60
  position: absolute;
61
61
  height: 100%;
62
62
  width: 1px;
63
- background: transparent url(/images/cropper/marqueeVert.gif) repeat-y 0 0;
63
+ background: transparent url(/assets/cropper/marqueeVert.gif) repeat-y 0 0;
64
64
  z-index: 3;
65
65
  }
66
66
 
@@ -1238,6 +1238,7 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1238
1238
  original_filename = data.original_filename.strip.gsub(/[\?\s\/\:\\]+/, '-').gsub(/^-/, '').gsub(/-$/, '')
1239
1239
  localfile = File.join(target_dir, original_filename)
1240
1240
  FileUtils.cp(data.tempfile, localfile)
1241
+ File.chmod(0644, localfile)
1241
1242
 
1242
1243
  finish_upload_status "'#{File.basename(localfile)}'"
1243
1244
  end
@@ -1247,8 +1248,9 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1247
1248
  localfile = File.join(Rails.root, 'public', 'assets', 'content', @pg.path, File.basename(params[:filename]))
1248
1249
 
1249
1250
  @filename = localfile + "?#{File.mtime(localfile).to_i}"
1250
- upload_to_s3(localfile, @pg, ImagineCmsConfig['amazon_s3'][Rails.env]['file_bucket'],
1251
- ImagineCmsConfig['amazon_s3']['file_prefix'])
1251
+ bucket = ImagineCmsConfig['amazon_s3'][Rails.env]['file_bucket'] rescue nil
1252
+ prefix = ImagineCmsConfig['amazon_s3']['file_prefix'] rescue nil
1253
+ upload_to_s3(localfile, @pg, bucket, prefix)
1252
1254
 
1253
1255
  render :partial => 'create_file_link'
1254
1256
  end
@@ -557,8 +557,9 @@ module CmsApplicationHelper
557
557
  begin
558
558
  val = page.send(attr.downcase.underscore)
559
559
  case val.class.to_s
560
- when 'String'
561
- val
560
+ when 'ActiveSupport::TimeWithZone'
561
+ val = val.utc
562
+ val = val.strftime("(%a) ") + val.strftime("%B ") + val.day.to_s + val.strftime(", %Y")
562
563
  when 'Time'
563
564
  val = val.strftime("(%a) ") + val.strftime("%B ") + val.day.to_s + val.strftime(", %Y")
564
565
  when 'NilClass'
@@ -26,7 +26,7 @@
26
26
  all_images.each { |img| images << img unless File.basename(img).include?('thumb') }
27
27
  -%>
28
28
  <div id="<%= File.basename(gallery) %>" style="float: left; width: 130px; margin: 0 20px 20px 0; text-align: center;">
29
- <%= link_to_remote image_tag(File.join('content', @pg.path, File.basename(gallery), 'management', 'preview.jpg')),
29
+ <%= link_to_remote image_tag(File.join('/images/content', @pg.path, File.basename(gallery), 'management', 'preview.jpg')),
30
30
  :url => { :action => 'select_gallery', :id => @pg, :gallery_id => File.basename(gallery) },
31
31
  :update => 'select_gallery_container' %><br/>
32
32
  <strong><%= File.basename(gallery).titleize %></strong><br/>
@@ -97,7 +97,7 @@ module ActionControllerExtensions
97
97
  'Could not find snippet "' + name + '" in the database.'
98
98
  end
99
99
  when :photo_gallery
100
- gallery_dir = File.join('images', 'content', @pg.path, File.basename(name))
100
+ gallery_dir = File.join('assets', 'content', @pg.path, File.basename(name))
101
101
  Dir.chdir(File.join(Rails.root, 'public'))
102
102
  all_images = Dir.glob("#{gallery_dir}/*.{jpg,jpeg,png,gif}")
103
103
  Dir.chdir(Rails.root)
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "3.0.7"
2
+ VERSION = "3.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagine_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails