Browse Source

added folder colour randomization

pull/557/head
axfelix 10 years ago
parent
commit
b934bceb53
  1. BIN
      images/bluefolder.png
  2. BIN
      images/greenfolder.png
  3. BIN
      images/purplefolder.png
  4. BIN
      images/redfolder.png
  5. BIN
      images/tealfolder.png
  6. BIN
      images/yellowfolder.png
  7. 28
      islandora.module

BIN
images/bluefolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
images/greenfolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
images/purplefolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
images/redfolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
images/tealfolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
images/yellowfolder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

28
islandora.module

@ -1372,7 +1372,33 @@ function islandora_islandora_required_objects(IslandoraTuque $connection) {
$datastream = $root_collection->constructDatastream('TN', 'M');
$datastream->label = 'Thumbnail';
$datastream->mimetype = 'image/png';
$datastream->setContentFromFile("$module_path/images/folder.png", FALSE);
// randomly pick a colour for the folder
$randomColour = mt_rand(1,7);
switch ($randomColour) {
case 1:
$datastream->setContentFromFile("$module_path/images/folder.png", FALSE);
break;
case 2:
$datastream->setContentFromFile("$module_path/images/redfolder.png", FALSE);
break;
case 3:
$datastream->setContentFromFile("$module_path/images/bluefolder.png", FALSE);
break;
case 4:
$datastream->setContentFromFile("$module_path/images/yellowfolder.png", FALSE);
break;
case 5:
$datastream->setContentFromFile("$module_path/images/greenfolder.png", FALSE);
break;
case 6:
$datastream->setContentFromFile("$module_path/images/purplefolder.png", FALSE);
break;
case 7:
$datastream->setContentFromFile("$module_path/images/tealfolder.png", FALSE);
break;
}
$root_collection->ingestDatastream($datastream);
return array(
'islandora' => array(

Loading…
Cancel
Save