Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As discussed we use a video Model. Because this is a breaking change … #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 49 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,123 +1,119 @@
PATH
remote: .
specs:
scrivito_video_widget (1.0.10)
scrivito_video_widget (1.1.0)
bundler
projekktor-rails
scrivito_sdk

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.1)
actionview (= 4.2.1)
activesupport (= 4.2.1)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.1)
activesupport (= 4.2.1)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.1)
activesupport (= 4.2.1)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.1)
activesupport (= 4.2.1)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.1)
activemodel (= 4.2.1)
activesupport (= 4.2.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.1)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
arel (6.0.0)
arel (6.0.3)
builder (3.2.2)
diff-lcs (1.2.5)
erubis (2.7.0)
globalid (0.3.5)
globalid (0.3.6)
activesupport (>= 4.1.0)
hyp_diff (0.0.4)
diff-lcs (~> 1.2.5)
nokogiri (~> 1.6.5)
i18n (0.7.0)
jbuilder (2.2.16)
jbuilder (2.3.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
loofah (2.0.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
memoist (0.12.0)
mime-types (2.6.1)
mime-types (2.6.2)
mini_portile (0.6.2)
minitest (5.7.0)
multi_json (1.11.0)
minitest (5.8.1)
multi_json (1.11.2)
multipart-post (2.0.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
projekktor-rails (0.0.7)
rack (1.6.1)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.1)
actionmailer (= 4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
activemodel (= 4.2.1)
activerecord (= 4.2.1)
activesupport (= 4.2.1)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.1)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.1)
actionpack (= 4.2.1)
activesupport (= 4.2.1)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
scrivito_sdk (0.65.0)
scrivito_sdk (0.70.0)
addressable (~> 2.3.2)
diff-lcs (~> 1.2.5)
hyp_diff (~> 0.0.4)
jbuilder (~> 2.2.2)
jquery-rails (~> 3.1.1)
jbuilder (~> 2.0)
json (>= 1.7.7)
memoist (>= 0.12.0)
multipart-post (~> 2.0.0)
nokogiri (~> 1.6.5)
rails (~> 4.2.0)
rake (>= 0.9.2.2)
sprockets (3.2.0)
rack (~> 1.0)
sprockets-rails (2.3.1)
sprockets (3.3.5)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
Expand All @@ -132,3 +128,6 @@ PLATFORMS
DEPENDENCIES
rake
scrivito_video_widget!

BUNDLED WITH
1.10.6
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ Add this line to your application javascript manifest:

/= require scrivito_video_widget

Add a Filter to your content_browser

scrivito.content_browser.filters = {
obj_class: {
field: '_obj_class',
options: {
Quote: {
title: 'Video',
icon: 'video',
query: scrivito.obj_where('_obj_class', 'equals', 'Video'),
preset: {
_obj_class: 'Video'
}
}
}
}
};
If you want to implement a Contextual filter, visit our [Documentation](https://scrivito.com/content-browser)!

## Changelog

See [Changelog](https://github.com/Scrivito/scrivito_video_widget/blob/master/CHANGELOG.md) for more
Expand Down
4 changes: 4 additions & 0 deletions app/models/video.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Video < Obj
attribute :blob, :binary
attribute :title, :string
end
13 changes: 13 additions & 0 deletions app/views/video/details.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% meta = @obj.blob.meta_data %>

<%= scrivito_details_for 'Titel' do %>
<%= scrivito_tag(:div, @obj, :title) %>
<% end %>

<%= scrivito_tag :div, @obj, :blob, class: 'image-replace-dropzone' do %>
Drop here to replace the Video
<% end %>

<%= scrivito_details_for "Size" do %>
<%= number_to_human_size(@obj.binary_length) %>
<% end %>
2 changes: 1 addition & 1 deletion lib/scrivito_video_widget/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ScrivitoVideoWidget
VERSION = "1.0.10"
VERSION = "1.1.0"
end