Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
AdminContextHandler.inc.php
1 <?php
2 
16 import('lib.pkp.pages.admin.AdminHandler');
17 
22  function AdminContextHandler() {
23  parent::AdminHandler();
24 
25  $this->addRoleAssignment(
26  array(ROLE_ID_SITE_ADMIN),
27  array('contexts')
28  );
29  }
30 
36  function contexts($args, $request) {
37  $templateMgr = TemplateManager::getManager($request);
38  AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER);
39  if ($request->getUserVar('openWizard')) {
40  // Get the open wizard link action.
41  import('lib.pkp.classes.linkAction.request.WizardModal');
42  $dispatcher = $request->getDispatcher();
43  $templateMgr->assign(
44  'openWizardLinkAction',
45  new LinkAction(
46  'openWizard',
47  new WizardModal(
48  $dispatcher->url($request, ROUTE_COMPONENT, null,
49  'wizard.settings.ContextSettingsWizardHandler', 'startWizard', null),
50  __('manager.settings.wizard')
51  ),
52  __('manager.settings.wizard'),
53  null
54  )
55  );
56  }
57 
58  $templateMgr->display('admin/contexts.tpl');
59  }
60 }
61 
62 ?>
static requireComponents()
Handle requests for site administration functions.
addRoleAssignment($roleIds, $operations)
A modal that contains a wizard retrieved via AJAX.
Handle requests for context management in site administration.
Base class defining an action that can be performed by the user in the user interface.