forked from Islandora/islandora_solution_pack_video
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
329 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.islandora-video-content { | ||
background-color: #F2F2F2; | ||
border: 1px solid #ddd; | ||
-webkit-border-radius: 5px; | ||
-moz-border-radius: 5px; | ||
border-radius: 5px; | ||
padding: 15px; | ||
} | ||
|
||
.islandora-video-content img { | ||
margin: 0; | ||
display: block; | ||
} | ||
|
||
.islandora-video-metadata { | ||
display: block; | ||
clear: both; | ||
} | ||
|
||
dl.islandora-video-fields { | ||
width: 100%; | ||
} | ||
|
||
.islandora-video-metadata dt { | ||
font-weight: normal; | ||
text-align: right; | ||
font-weight: bold; | ||
padding-right: 0; | ||
} | ||
|
||
.islandora-video-metadata dd { | ||
padding-left: 40px; | ||
} | ||
|
||
|
||
.islandora-video-metadata dt, | ||
.islandora-video-metadata dd { | ||
border-top: 1px solid #e5e5e5; | ||
} | ||
|
||
.islandora-video-metadata dt.first, | ||
.islandora-video-metadata dd.first { | ||
border-top: 0; | ||
} | ||
|
||
body.two-sidebars .islandora-video-sidebar { | ||
clear: both; | ||
width: 100%; | ||
} | ||
|
||
@media all and (min-width: 768px) { | ||
|
||
body.no-sidebars .islandora-video-content { | ||
width: 65%; | ||
float: left; /* LTR */ | ||
} | ||
|
||
body.no-sidebars .islandora-video-sidebar { | ||
padding-left: 20px; | ||
} | ||
|
||
body.no-sidebars .islandora-video-sidebar { | ||
float: right; /* LTR */ | ||
width: 35%; | ||
clear: none; | ||
} | ||
|
||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* | ||
* Handles the uploading of the video file. | ||
*/ | ||
|
||
/** | ||
* Defines a file upload form for uploading the islandora video. | ||
* | ||
* @param array $form | ||
* The drupal form. | ||
* @param array $form_state | ||
* The drupal form state. | ||
* | ||
* @return array | ||
* The drupal form definition. | ||
*/ | ||
function islandora_video_upload_form(array $form, array &$form_state) { | ||
$upload_size = min((int)ini_get('post_max_size'), (int)ini_get('upload_max_filesize')); | ||
$extensions = array('ogg mp4 mov qt m4a avi'); | ||
return array( | ||
'file' => array( | ||
'#title' => t('Video'), | ||
'#type' => 'managed_file', | ||
'#default_value' => isset($form_state['values']['file']) ? $form_state['values']['file'] : NULL, | ||
'description' => t('Select video to upload.<br/>Files must be less than <b>!size MB.</b><br/>Allowed file types: <b>!ext.</b>', array('!size' => $upload_size, '!ext' => $extensions[0])), | ||
'#required' => TRUE, | ||
'#upload_location' => 'temporary://', | ||
'#upload_validators' => array( | ||
'file_validate_extensions' => $extensions, | ||
'file_validate_size' => array($upload_size * 1024 * 1024), // Assume its specified in MB | ||
), | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Submit handler, adds uploaded file to the video object. | ||
* | ||
* @param array $form | ||
* The drupal form. | ||
* @param array $form_state | ||
* The drupal form state. | ||
*/ | ||
function islandora_video_upload_form_submit(array $form, array &$form_state) { | ||
$object = $form_state['islandora']['objects'][0]; | ||
if (empty($object['OBJ'])) { | ||
$ds = $object->constructDatastream('OBJ', 'M'); | ||
$object->ingestDatastream($ds); | ||
} | ||
else { | ||
$ds = $object['OBJ']; | ||
} | ||
$file = file_load($form_state['values']['file']); | ||
$path = drupal_realpath($file->uri); | ||
$ds->setContentFromFile($path); | ||
$ds->label = $file->filename; | ||
$ds->mimetype = $file->filemime; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
name = Islandora Video Solution Pack | ||
description = Islandora configurations for persisting and displaying video files | ||
name = "Islandora video" | ||
description = "A default Islandora module to handle video" | ||
dependencies[] = islandora | ||
package = Islandora | ||
configure = admin/islandora/video | ||
version = 7.x-dev | ||
core = 7.x | ||
configure = admin/islandora/video | ||
stylesheets[all][] = css/islandora_video.theme.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.