* @file classes/controllers/grid/feature/OrderCategoryGridItemsFeature.inc.php
 *
 * Copyright (c) 2014-2015 Simon Fraser University Library
 * Copyright (c) 2000-2015 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @class OrderCategoryGridItemsFeature
 * @ingroup controllers_grid_feature
 *
 * @brief Implements category grid ordering functionality.
 *
 */
import('lib.pkp.classes.controllers.grid.feature.OrderItemsFeature');
define_exposed('ORDER_CATEGORY_GRID_CATEGORIES_ONLY', 0x1);
define_exposed('ORDER_CATEGORY_GRID_CATEGORIES_ROWS_ONLY', 0x2);
define_exposed('ORDER_CATEGORY_GRID_CATEGORIES_AND_ROWS', 0x3);
class OrderCategoryGridItemsFeature extends OrderItemsFeature
{
    /**
     * Constructor.
     * @param $typeOption int Defines which grid elements will
     * be orderable (categories and/or rows).
     * @param $overrideRowTemplate boolean This feature uses row
     * actions and it will force the usage of the gridRow.tpl.
     * If you want to use a different grid row template file, set this flag to
     * false and make sure to use a template file that adds row actions.
     */
    function OrderCategoryGridItemsFeature($typeOption = ORDER_CATEGORY_GRID_CATEGORIES_AND_ROWS, $overrideRowTemplate = true)
    {
        parent::OrderItemsFeature($overrideRowTemplate);
        $this->addOptions(array('type' => $typeOption));
     * @return string HTML code for CC license
     */
    function getCCLicenseBadge($ccLicenseURL)
    {
        $licenseKeyMap = array('http://creativecommons.org/licenses/by-nc-nd/4.0' => 'submission.license.cc.by-nc-nd4.footer', 'http://creativecommons.org/licenses/by-nc/4.0' => 'submission.license.cc.by-nc4.footer', 'http://creativecommons.org/licenses/by-nc-sa/4.0' => 'submission.license.cc.by-nc-sa4.footer', 'http://creativecommons.org/licenses/by-nd/4.0' => 'submission.license.cc.by-nd4.footer', 'http://creativecommons.org/licenses/by/4.0' => 'submission.license.cc.by4.footer', 'http://creativecommons.org/licenses/by-sa/4.0' => 'submission.license.cc.by-sa4.footer');
        if (isset($licenseKeyMap[$ccLicenseURL])) {
            return __($licenseKeyMap[$ccLicenseURL]);
        }
        return null;
    }
}
/**
 * @see PKPApplication::defineExposedConstant()
 */
function define_exposed($name, $value)
{
    PKPApplication::defineExposedConstant($name, $value);
}
define_exposed('REALLY_BIG_NUMBER', 10000);
define_exposed('UPLOAD_MAX_FILESIZE', ini_get('upload_max_filesize'));
define_exposed('WORKFLOW_STAGE_ID_PUBLISHED', 0);
// FIXME? See bug #6463.
define_exposed('WORKFLOW_STAGE_ID_SUBMISSION', 1);
define_exposed('WORKFLOW_STAGE_ID_INTERNAL_REVIEW', 2);
define_exposed('WORKFLOW_STAGE_ID_EXTERNAL_REVIEW', 3);
define_exposed('WORKFLOW_STAGE_ID_EDITING', 4);
define_exposed('WORKFLOW_STAGE_ID_PRODUCTION', 5);
// To expose LISTBUILDER_SOURCE_TYPE_... constants via JS
import('lib.pkp.classes.controllers.listbuilder.ListbuilderHandler');
// To expose ORDER_CATEGORY_GRID_... constants via JS
import('lib.pkp.classes.controllers.grid.feature.OrderCategoryGridItemsFeature');
/**
 * @file classes/controllers/listbuilder/MultipleListsListbuilderHandler.inc.php
 *
 * Copyright (c) 2013-2014 Simon Fraser University Library
 * Copyright (c) 2000-2014 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @class MultipleListsListbuilderHandler
 * @ingroup controllers_listbuilder
 *
 * @brief Class defining basic operations for handling multiple lists listbuilder UI elements
 */
import('lib.pkp.classes.controllers.listbuilder.ListbuilderHandler');
import('lib.pkp.classes.controllers.listbuilder.ListbuilderList');
define_exposed('LISTBUILDER_SOURCE_TYPE_NONE', 3);
class MultipleListsListbuilderHandler extends ListbuilderHandler
{
    /** @var array Set of ListbuilderList objects that this listbuilder will handle **/
    var $_lists;
    /**
     * Constructor.
     */
    function MultipleListsListbuilderHandler()
    {
        parent::ListbuilderHandler();
    }
    //
    // Getters and Setters
    //
    /**
Пример #4
0
<?php

/**
 * @file classes/core/PKPApplication.inc.php
 *
 * Copyright (c) 2013-2014 Simon Fraser University Library
 * Copyright (c) 2000-2014 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @class PKPApplication
 * @ingroup core
 *
 * @brief Class describing this application.
 *
 */
define_exposed('REALLY_BIG_NUMBER', 10000);
define('ROUTE_COMPONENT', 'component');
define('ROUTE_PAGE', 'page');
define('CONTEXT_SITE', 0);
define('CONTEXT_ID_NONE', 0);
define('REVIEW_ROUND_NONE', 0);
define('ASSOC_TYPE_USER', 0x1000);
// This value used because of bug #6068
define('ASSOC_TYPE_USER_GROUP', 0x100002);
define('ASSOC_TYPE_CITATION', 0x100003);
define('ASSOC_TYPE_AUTHOR', 0x100004);
define('ASSOC_TYPE_EDITOR', 0x100005);
define('ASSOC_TYPE_SIGNOFF', 0x100006);
define('ASSOC_TYPE_USER_ROLES', 0x100007);
define('ASSOC_TYPE_ACCESSIBLE_WORKFLOW_STAGES', 0x100008);
define('ASSOC_TYPE_PLUGIN', 0x211);
Пример #5
0
import('lib.pkp.classes.controllers.listbuilder.ListbuilderGridRow');
import('lib.pkp.classes.controllers.listbuilder.ListbuilderGridColumn');
import('lib.pkp.classes.controllers.listbuilder.MultilingualListbuilderGridColumn');
/* Listbuilder source types: text-based, pulldown, ... */
define_exposed('LISTBUILDER_SOURCE_TYPE_TEXT', 0);
define_exposed('LISTBUILDER_SOURCE_TYPE_SELECT', 1);
/* Listbuilder save types */
define('LISTBUILDER_SAVE_TYPE_EXTERNAL', 0);
// Outside the listbuilder handler
define('LISTBUILDER_SAVE_TYPE_INTERNAL', 1);
// Using ListbuilderHandler::save
/* String to identify optgroup in the returning options data. If you want to use
 * optgroup in listbuilder select, return the options data in a multidimensional array
 * array[columnIndex][optgroupId][selectItemId] and also with
 * array[columnIndex][LISTBUILDER_OPTGROUP_LABEL][optgroupId] */
define_exposed('LISTBUILDER_OPTGROUP_LABEL', 'optGroupLabel');
class ListbuilderHandler extends GridHandler
{
    /** @var int Definition of the type of source LISTBUILDER_SOURCE_TYPE_... */
    var $_sourceType;
    /** @var int Constant indicating the save approach for the LB LISTBUILDER_SAVE_TYPE_... */
    var $_saveType = LISTBUILDER_SAVE_TYPE_INTERNAL;
    /** @var string Field for LISTBUILDER_SAVE_TYPE_EXTERNAL naming the field used to send the saved contents of the LB */
    var $_saveFieldName = null;
    /**
     * Constructor.
     */
    function ListbuilderHandler()
    {
        parent::GridHandler();
    }