• Main Page
  • Modules
  • Classes
  • Files
  • File List

controllers/informationCenter/linkAction/SubmissionInfoCenterLinkAction.inc.php

00001 <?php
00002 
00015 import('lib.pkp.classes.linkAction.LinkAction');
00016 
00017 class SubmissionInfoCenterLinkAction extends LinkAction {
00018 
00026    function SubmissionInfoCenterLinkAction(&$request, $monographId, $linkKey = 'informationCenter.bookInfo') {
00027       // Instantiate the information center modal.
00028 
00029       $monographDao =& DAORegistry::getDAO('MonographDAO');
00030       $monograph =& $monographDao->getById($monographId);
00031 
00032       $primaryAuthor = $monograph->getPrimaryAuthor();
00033       if (!isset($primaryAuthor)) {
00034          $authors =& $monograph->getAuthors();
00035          if (sizeof($authors) > 0) {
00036             $primaryAuthor = $authors[0];
00037          }
00038       }
00039 
00040       $title = (isset($primaryAuthor)) ? implode(', ', array($primaryAuthor->getLastName(), $monograph->getLocalizedTitle())) : $monograph->getLocalizedTitle();
00041 
00042       $dispatcher =& $request->getDispatcher();
00043       import('lib.pkp.classes.linkAction.request.AjaxModal');
00044       $ajaxModal = new AjaxModal(
00045          $dispatcher->url(
00046             $request, ROUTE_COMPONENT, null,
00047             'informationCenter.SubmissionInformationCenterHandler',
00048             'viewInformationCenter',
00049             null,
00050             array('monographId' => $monographId)
00051          ),
00052          $title,
00053          'modal_information'
00054       );
00055 
00056       // Configure the link action.
00057       parent::LinkAction(
00058          'bookInfo', $ajaxModal,
00059          __($linkKey), 'more_info'
00060       );
00061    }
00062 }
00063 
00064 ?>

Generated on Mon Sep 17 2012 13:58:56 for Open Monograph Press by  doxygen 1.7.1