function launch() { global $interface; $id = $_GET['id']; $interface->assign('id', $id); $this->eContentRecord = new EContentRecord(); $this->eContentRecord->id = $_GET['id']; $this->eContentRecord->find(true); $recordDriver = new EcontentRecordDriver(); $recordDriver->setDataObject($this->eContentRecord); $interface->assign('sourceUrl', $this->eContentRecord->sourceUrl); $interface->assign('source', $this->eContentRecord->source); $interface->setPageTitle(translate('Copies') . ': ' . $recordDriver->getBreadcrumb()); $driver = new EContentDriver(); $holdings = $driver->getHolding($id); $showEContentNotes = false; foreach ($holdings as $holding) { if (strlen($holding->notes) > 0) { $showEContentNotes = true; } } $interface->assign('showEContentNotes', $showEContentNotes); $interface->assign('holdings', $holdings); //Load status summary $result = $driver->getStatusSummary($id, $holdings); if (PEAR_Singleton::isError($result)) { PEAR_Singleton::raiseError($result); } $holdingData->holdingsSummary = $result; $interface->assign('subTemplate', 'view-holdings.tpl'); $interface->setTemplate('view-alt.tpl'); // Display Page $interface->display('layout.tpl'); }
function launch() { global $interface; $interface->assign('id', $_GET['id']); $this->eContentRecord = new EContentRecord(); $this->eContentRecord->id = $_GET['id']; $this->eContentRecord->find(true); $recordDriver = new EcontentRecordDriver(); $recordDriver->setDataObject($this->eContentRecord); $this->loadData(); $interface->setPageTitle(translate('Description') . ': ' . $recordDriver->getBreadcrumb()); $interface->assign('extendedMetadata', $recordDriver->getExtendedMetadata()); $interface->assign('subTemplate', 'view-description.tpl'); $interface->setTemplate('view-alt.tpl'); // Display Page $interface->display('layout.tpl', $this->cacheId); }
function launch() { global $interface; global $user; global $configArray; // Process Delete Comment if (isset($_GET['delete']) && is_object($user)) { $comment = new Comments(); $comment->id = $_GET['delete']; if ($comment->find(true)) { if ($user->id == $comment->user_id) { $comment->delete(); } } } $interface->assign('id', $_GET['id']); if (isset($_REQUEST['comment'])) { if (!$user) { $interface->assign('recordId', $_GET['id']); $interface->assign('comment', $_REQUEST['comment']); $interface->assign('followup', true); $interface->assign('followupModule', 'EContentRecord'); $interface->assign('followupAction', 'UserComments'); $interface->setPageTitle('You must be logged in first'); $interface->assign('subTemplate', '../MyResearch/login.tpl'); $interface->setTemplate('view-alt.tpl'); $interface->display('layout.tpl', 'UserComments' . $_GET['id']); exit; } $result = $this->saveComment(); } $interface->assign('user', $user); $eContentRecord = new EContentRecord(); $eContentRecord->id = $_GET['id']; $eContentRecord->find(true); $recordDriver = new EcontentRecordDriver(); $recordDriver->setDataObject($eContentRecord); $interface->setPageTitle(translate('Comments') . ': ' . $recordDriver->getBreadcrumb()); $this->loadEContentComments(); $interface->assign('subTemplate', 'view-comments.tpl'); $interface->setTemplate('view.tpl'); // Display Page $interface->display('layout.tpl'); }