Permalink
Browse files

Omeka_View_Helper_Media does not use item-file div wrapper class by d…

…efault, but wrapper class is passed as an argument to display_files().
  • Loading branch information...
1 parent 0c0465d commit 993bb251737ae0a74aab98915c7b29544bb057a2 @kriskelly kriskelly committed Oct 31, 2008
Showing with 5 additions and 3 deletions.
  1. +4 −2 application/helpers/Functions.php
  2. +1 −1 application/helpers/Media.php
@@ -46,20 +46,22 @@ function auto_discovery_link_tag(){
*
* @return void
**/
-function display_files($files, array $props = array()) {
+function display_files($files, array $props = array(), $wrapperClass = 'item-file') {
require_once 'Media.php';
$helper = new Omeka_View_Helper_Media;
+ $helper->setWrapperClass($wrapperClass);
$output = '';
foreach ($files as $file) {
$output .= $helper->media($file, $props);
}
return $output;
}
-function display_file($file, array $props=array())
+function display_file($file, array $props=array(), $wrapperClass = 'item-file')
{
require_once 'Media.php';
$helper = new Omeka_View_Helper_Media;
+ $helper->setWrapperClass($wrapperClass);
return $helper->media($file, $props);
}
@@ -85,7 +85,7 @@ class Omeka_View_Helper_Media
'height' => 20
));
- protected $_wrapperClass = 'item-file';
+ protected $_wrapperClass = null;
/**
* Retrieve all the callbacks and default options from the plugins. They

0 comments on commit 993bb25

Please sign in to comment.