-
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
Changes from all commits
bd49e15
fbc2a2d
5b3c09d
a221372
cb3b65e
22959b3
8c2c24e
9ff3179
01e3605
c35b172
fb7fb77
baaca22
4e96de9
3021b67
1dd40b8
6ae8dcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ATLA Hyku | ||
## Project Specific Info | ||
### Youtube/Vimeo Video Player For Works | ||
- Works will have the option to add a youtube or vimeo player via an embed link | ||
- This link must be a correctly formatted embed link from either youtube or vimeo. | ||
- To find this link: | ||
- Navigate to the url of the video you would like to include. | ||
- Click the "share" button | ||
- You will see a link or a section called "Embed". View the embed code for the video | ||
- Copy JUST the link. The link will be formatted as so for Youtube and Vimeo respectively: | ||
- https://www.youtube.com/embed/Znf73dsFdC8 | ||
- https://player.vimeo.com/video/467264493?h=b089de0eab |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<%# OVERRIDE Hyrax 3.5.0 to remove the broken error alerts from form validations %> | ||
|
||
<%= simple_form_for [main_app, @form], | ||
html: { | ||
data: { behavior: 'work-form', | ||
'param-key' => @form.model_name.param_key }, | ||
multipart: true | ||
} do |f| %> | ||
<%# OVERRIDE Here to remove broken error alert from form validation %> | ||
<% if Flipflop.batch_upload? && !f.object.persisted? %> | ||
<% provide :metadata_tab do %> | ||
<p class="switch-upload-type"><%= t('.batch_upload_hint') %> <%= link_to t('.batch_link'), hyrax.new_batch_upload_path(payload_concern: @form.model.class) %></p> | ||
<% end %> | ||
<% end %> | ||
<%= render 'hyrax/base/guts4form', f: f, tabs: form_tabs_for(form: f.object) %> | ||
<% end %> | ||
|
||
<script type="text/javascript"> | ||
Blacklight.onLoad(function() { | ||
<%# This causes the page to switch back to the default template if they've | ||
previously visited the batch download page in this Turbolinks session %> | ||
$("#fileupload").fileupload('option', 'downloadTemplateId', 'template-download') | ||
}); | ||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="col-sm-12"> | ||
<iframe class='video-embed-viewer' src="<%="#{@presenter.solr_document[:video_embed_tesim].first}"%>" title="Video Player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<%# OVERRIDE from Hyrax 3.5.0 to hide broken flash messages on the dashboard edit work pages %> | ||
|
||
<!DOCTYPE html> | ||
<html lang="<%= I18n.locale.to_s %>" prefix="og:http://ogp.me/ns#"> | ||
<head> | ||
<%= render partial: 'layouts/head_tag_content' %> | ||
<%= content_for(:head) %> | ||
</head> | ||
|
||
<body class="dashboard"> | ||
<div class="skip-to-content"> | ||
<%= link_to "Skip to Content", "#skip-to-content" %> | ||
</div> | ||
<%= render '/masthead' %> | ||
<%= content_for(:navbar) %> | ||
<div id="content-wrapper" role="main"> | ||
<div class="sidebar maximized"> | ||
<%= render 'hyrax/dashboard/sidebar' %> | ||
</div> | ||
<div class="main-content maximized"> | ||
<%# 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' %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
<%#= raise 'hell' %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops, this should be removed! |
||
<%= render_breadcrumbs builder: Hyrax::BootstrapBreadcrumbsBuilder %> | ||
<% if content_for?(:page_header) %> | ||
<div class="row"> | ||
<div class="col-xs-12 main-header"> | ||
<%= yield(:page_header) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<a name="skip-to-content" id="skip-to-content"></a> | ||
<%= render 'shared/read_only' if Flipflop.read_only? %> | ||
<%= content_for?(:content) ? yield(:content) : yield %> | ||
|
||
</div> | ||
|
||
</div><!-- /#content-wrapper --> | ||
<%= render 'shared/ajax_modal' %> | ||
</body> | ||
</html> |
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 theprivate
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