'; echo ''; echo ''; echo ''; /*translation:New collection: */ echo elgg_echo("koolielu:add_newnew_collection"); echo ''; echo ''; foreach ( $cids as $cid ) { $wo = waramu_list_resources(array($cid), true, false, array('silent_err' => true, 'showall' => true)); if (!$wo) continue; echo ''; echo ''; echo $wo; echo ''; } echo ''; } else if ( !strcmp($verb, 'confirm') ) { // TODO: add tags and curriculum to collection! $collids = get_input('dd'); $newcoll = trim(get_input('new')); $rc = getAllUserCollections(get_loggedin_user(), $rid); $addedto = array(); $cid = null; $modsmade = false; if (strlen($newcoll)>0) { $cid = newCollection($newcoll, $rid); if (is_int($cid)) { // something went wrong... /*translation:Something went wrong and your collection could not be created. Please contact administrators.*/ echo elgg_echo("koolielu:something_wrong"); } else { /*translation:New collection successfully created!*/ echo '
'.elgg_echo('koolielu:new_collection_created').'
'; echo '
'; /*translation:Don't forget to add metadata to your fresh collection! Your collection is*/ echo elgg_echo('koolielu:dont_forget_to_add_md'); /*translation:here*/ echo ' '.elgg_echo('koolielu:here').''; echo '
'; echo '
'; $addedto[] = $cid; } } $all_colls = $rc[0]; $part_of = $rc[1]; foreach ($all_colls as $coll) { if (in_array($coll, $part_of) && in_array($coll, $collids)) { continue; } if (in_array($coll, $part_of) && !in_array($coll, $collids)) { // remove from collection removeFromCollection($coll, $rid); $modsmade = true; } if (!in_array($coll, $part_of) && in_array($coll, $collids)) { // add to collection addToCollection($coll, $rid); $addedto[] = $coll; $modsmade = true; } } foreach($addedto as $collid) { enrichCollection($collid, $rid); } ?> getCollectionIDs()) > 0) { /*translation:Collections*/ $collections = ""; $p = array('limit' => 5, 'mode' => 'miniview', 'use_pagination' => false, 'silent_err' => true); $collections .= waramu_list_resources($obj->getCollectionIDs(), false, true, $p); if (count($obj->getCollectionIDs())> 5) { $res_colls_url = $CONFIG->wwwroot . "pg/waramu/collections/?resource_id=".$obj->uid; /*translation:more...*/ $collections .= "
".elgg_echo("koolielu:more_dot")."
"; } echo $collections; } echo ""; } ?>