ecm_videos 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +8 -8
- data/app/concerns/models/markup_concern.rb +1 -1
- data/app/models/ecm/videos/category.rb +6 -1
- data/app/models/ecm/videos/video.rb +1 -1
- data/app/views/ecm/videos/categories/index.haml +1 -1
- data/app/views/ecm/videos/categories/show.haml +1 -1
- data/config/locales/de.yml +2 -0
- data/lib/ecm/videos/configuration.rb +1 -1
- data/lib/ecm/videos/version.rb +1 -1
- data/lib/ecm_videos.rb +2 -2
- data/lib/generators/ecm/videos/install/templates/initializer.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3cb05eb0a9cca8dd93f461415abb5c651c10097
|
4
|
+
data.tar.gz: ce691af323597514e4f59d7721f27595c96c8ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9eeaee4a1bf69870923c9c828b557de76fc1a5127d1e25d9bcae70c93e369a2083922c9557e15d08aaeca5eaad92960050220eb75643c18fef4a206c95e8214
|
7
|
+
data.tar.gz: fea6e3595c47816b3b9d66e874445ad6662276731a2b1bc13b22ccbb9453750405c96d0d142717acbd18988a4b2e87c86937c4e5a16ed37e24376e82ebcc74c7
|
data/Rakefile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
begin
|
2
|
-
require
|
2
|
+
require 'bundler/setup'
|
3
3
|
rescue LoadError
|
4
|
-
puts
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
-
require
|
7
|
+
require 'rdoc/task'
|
8
8
|
|
9
9
|
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir =
|
11
|
-
rdoc.title =
|
12
|
-
rdoc.options <<
|
13
|
-
rdoc.rdoc_files.include(
|
14
|
-
rdoc.rdoc_files.include(
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Ecm::Videos'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
17
|
Bundler::GemHelper.install_tasks
|
@@ -3,7 +3,7 @@ module Ecm::Videos
|
|
3
3
|
# markup support
|
4
4
|
include Models::MarkupConcern
|
5
5
|
markup :description
|
6
|
-
|
6
|
+
|
7
7
|
# acts as published
|
8
8
|
include ActsAsPublished::ActiveRecord
|
9
9
|
acts_as_published
|
@@ -18,6 +18,11 @@ module Ecm::Videos
|
|
18
18
|
videos.first.try(:preview_image)
|
19
19
|
end
|
20
20
|
|
21
|
+
def published_preview_image_url(style)
|
22
|
+
return unless video = videos.published.first
|
23
|
+
video.clip.url(style)
|
24
|
+
end
|
25
|
+
|
21
26
|
def videos_count
|
22
27
|
videos.count
|
23
28
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
%h1= t('.title', inflections)
|
2
2
|
|
3
3
|
= render_collection(@collection, Ecm::Videos::Category, as: :bootstrap_media_object) do |list|
|
4
|
-
= list.media_object(title_method: :name, body: list.resource.description(:html), image_url: list.resource.
|
4
|
+
= list.media_object(title_method: :name, body: list.resource.description(:html), image_url: list.resource.published_preview_image_url(:default_thumb))
|
5
5
|
|
6
6
|
.well.page-actions
|
7
7
|
= link_to(t('.back'), main_app.root_path, class: 'btn btn-default')
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
#video-category-videos
|
8
|
-
= render_collection(@resource.videos, Ecm::Videos::Video, as: :bootstrap_media_object) do |list|
|
8
|
+
= render_collection(@resource.videos.published, Ecm::Videos::Video, as: :bootstrap_media_object) do |list|
|
9
9
|
= list.media_object(title_method: :name, body: list.resource.description(:html), image_url: list.resource.clip.url(:default_thumb))
|
10
10
|
|
11
11
|
.well.page-actions
|
data/config/locales/de.yml
CHANGED
@@ -16,6 +16,7 @@ de:
|
|
16
16
|
locale: Sprache
|
17
17
|
markup_language: Markup Sprache
|
18
18
|
name: Name
|
19
|
+
preview_image: Vorschau
|
19
20
|
published: Veröffentlicht
|
20
21
|
published_at: Veröffentlicht am
|
21
22
|
videos_count: Videos
|
@@ -30,6 +31,7 @@ de:
|
|
30
31
|
description: Beschreibung
|
31
32
|
markup_language: Markup Sprache
|
32
33
|
name: Name
|
34
|
+
preview_image: Vorschau
|
33
35
|
published: Veröffentlicht
|
34
36
|
published_at: Veröffentlicht am
|
35
37
|
ecm:
|
data/lib/ecm/videos/version.rb
CHANGED
data/lib/ecm_videos.rb
CHANGED
@@ -28,8 +28,8 @@ Ecm::Videos.configure do |config|
|
|
28
28
|
# }
|
29
29
|
# end
|
30
30
|
#
|
31
|
-
config.paperclip_options =
|
32
|
-
{
|
31
|
+
config.paperclip_options = proc do |_model|
|
32
|
+
{
|
33
33
|
styles: {
|
34
34
|
small_thumb: '80x60',
|
35
35
|
medium_thumb: '160x120',
|
@@ -37,4 +37,4 @@ Ecm::Videos.configure do |config|
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
end
|
40
|
-
end
|
40
|
+
end
|