-
Notifications
You must be signed in to change notification settings - Fork 0
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
embedded iframe for videos #34
Conversation
private | ||
def extract_video_embed_presence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to set this up this way because when i was trying to use solr_document
above the private
methods, it was giving me an error that solr_document was private.
I also got a similar error (screenshot below) when trying to use. presenter.solr_document
directly in the view. only using it /calling the private method in the presenter itself seems to have fixed that issue
<%# OVERRIDE here to hide broken flash messages on the dashboard edit work pages. %> | ||
<%# regex includes only the paths for works since this is the only known place flash messages are broken. %> | ||
<% if !controller.request.env['REQUEST_PATH'].include?('concern') %> | ||
<%= render '/flash_msg' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although we originally said to remove the whole partial, that didn't really make sense since this is the flash message that is being used everywhere in the dashboard.
It is not necessarily broken everywhere in the dashboard, but it is for validations on works.
This conditional only removes the flash message if the path includes "concern" which is only on works
app/views/hyrax/base/show.html.erb
Outdated
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? %> | ||
<% if !@presenter.video_embed_viewer? %> | ||
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.universal_viewer? %> | ||
<% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<% end %> | |
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.universal_viewer? && !@presenter.video_embed_viewer? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work making it a single line?
Or maybe wrap the whole block like:
<% end %> | |
<% if @presenter.video_embed_viewer? %> | |
<%= render 'video_embed_viewer', presenter: @presenter %> | |
<% else %> | |
<% if @presenter.iiif_viewer? %> | |
<div class="col-sm-12"> | |
<%= render 'representative_media', presenter: @presenter, viewer: true %> | |
</div> | |
<% else %> | |
<div class="col-sm-3 text-center"> | |
<%= render 'representative_media', presenter: @presenter, viewer: false %> | |
</div> | |
<% end %> | |
<% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to change it to this, its way easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and maybe this is contribute back-able so it would be less confusing in hyku
<% if @presenter.video_embed_viewer? %> | ||
<%= render 'video_embed_viewer', presenter: @presenter %> | ||
<% end %> | ||
<% if @presenter.universal_viewer? & !@presenter.video_embed_viewer? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just use and if/else statement here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments are just suggestions, I think it's ok to approve. I do think the conditional rendering of the UV/Video/Representative media is a bit convoluted.
Great job remembering the themes!
I know, originally i wanted to just put it in the |
@labradford i just pushed up the show page views again with your suggestions, but had to do some weird things with the default one to get the columns to work. |
<%# OVERRIDE here to hide broken flash messages on the dashboard edit work pages. %> | ||
<%# regex includes only the paths for works since this is the only known place flash messages are broken. %> | ||
<%= render '/flash_msg' %> | ||
<%#= raise 'hell' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, this should be removed!
Story
SoftServ will customize the ability for YouTube videos to appear embedded on a work show page. Videos will not be played back in Universal Viewer.
Related
Expected Behavior Before Changes
Expected Behavior After Changes
video_embed
link saved in its metadata, the work show page will show that video in an iframe.video_embed
link saved in its metadata, but should show the universal viewer because it has files, it shows the viewer.video_embed
metadata or files to show in the viewer, it shows the default image.Screenshots / Video
Working youtube player
Working vimeo player
Form with error message for invalid url entry
Acceptance
Note