ems 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,7 +50,7 @@ module Ems
50
50
  has_and_belongs_to_many :reports, :join_table => 'ems_news_reports'
51
51
  accepts_nested_attributes_for :reports
52
52
 
53
- has_attached_file :image, :styles => {:image228x126 => "228x126"}
53
+ has_attached_file :image, :styles => { :image564x252 => "564x252#", :image312x189 => "312x189#", :image312x126 => "312x126", :image228x126 => "228x126"}
54
54
 
55
55
  has_many :assets, :as => :assetable
56
56
  accepts_nested_attributes_for :assets, :allow_destroy => true
@@ -11,10 +11,7 @@
11
11
 
12
12
  = render "ems/globals/lead_image", :form => f, :imageName => @article.image.url
13
13
 
14
- %li
15
- #button-bar.input-buttons
16
- = f.label :content
17
- = f.input_field :content, :data => {:wmd => "article_content"}
14
+ = render "ems/globals/content_editor", :form => f, :type=>"article"
18
15
 
19
16
  = render "ems/globals/asset", :form => f
20
17
 
@@ -18,9 +18,11 @@
18
18
  - else
19
19
  %span.asset-blank
20
20
  - @assetField = builder.file_field :asset
21
+ - @errorField = builder.error :asset
21
22
  / - @titleField = builder.input_field :title, :placeholder => "Enter image title"
22
23
  %li
23
24
  = form.label "Add new asset"
24
25
  .input-push.asset-add
25
26
  = @assetField
26
- / = @titleField
27
+ / = @titleField
28
+ = @errorField
@@ -0,0 +1,5 @@
1
+ %li
2
+ #button-bar.input-buttons
3
+ = form.label :content
4
+ = form.input_field :content, :data => {:wmd => "#{type}_content"}
5
+ = form.error :content
@@ -11,11 +11,8 @@
11
11
 
12
12
  = render "ems/globals/lead_image", :form => f, :imageName => @news.image.url
13
13
 
14
- %li
15
- #button-bar.input-buttons
16
- = f.label :content
17
- = f.input_field :content, :data => {:wmd => "news_content"}
18
-
14
+ = render "ems/globals/content_editor", :form => f, :type=>"news"
15
+
19
16
  = render "ems/globals/asset", :form => f
20
17
 
21
18
 
@@ -11,18 +11,13 @@
11
11
 
12
12
  = render "ems/globals/lead_image", :form => f, :imageName => @report.image.url
13
13
 
14
-
15
-
16
- %li
17
- #button-bar.input-buttons
18
- = f.label :content
19
- = f.input_field :content, :data => {:wmd => "report_content"}
14
+ = render "ems/globals/content_editor", :form => f, :type=>"report"
20
15
 
21
16
  %li
22
17
  = f.input :download_cta
23
18
  %li
24
19
  = f.input :report
25
-
20
+
26
21
  = render "ems/globals/asset", :form => f
27
22
 
28
23
 
@@ -24,4 +24,4 @@
24
24
 
25
25
  %footer#footer
26
26
  %p
27
- The Beans Group #{Time.now.year}
27
+ \Powered by EMS #{Ems::VERSION}
@@ -1,3 +1,3 @@
1
1
  module Ems
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -59,7 +59,7 @@ module Kramdown
59
59
  def add_oembed(el, href, title, alt_text = nil)
60
60
 
61
61
  providers = {
62
- :twitter => "https://api.twitter.com/1/statuses/oembed.json?url=%s",
62
+ :twitter => "https://api.twitter.com/1/statuses/oembed.json?url=%s&lang=en",
63
63
  :youtube => "http://www.youtube.com/oembed?url=%s&format=json&maxwidth=550",
64
64
  :flickr => "http://flickr.com/services/oembed?url=%s&maxwidth=460&format=json&maxwidth=550",
65
65
  :vidler => "http://lab.viddler.com/services/oembed/?url=%s&type=simple&format=json",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -384,6 +384,7 @@ files:
384
384
  - app/views/ems/channels/show.html.haml
385
385
  - app/views/ems/ems/index.html.haml
386
386
  - app/views/ems/globals/_asset.html.haml
387
+ - app/views/ems/globals/_content_editor.html.haml
387
388
  - app/views/ems/globals/_lead_image.html.haml
388
389
  - app/views/ems/news/_form.html.haml
389
390
  - app/views/ems/news/edit.html.haml