当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings::isSingleProjectTracker方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Settings::isSingleProjectTracker方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::isSingleProjectTracker方法的具体用法?PHP Settings::isSingleProjectTracker怎么用?PHP Settings::isSingleProjectTracker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Settings的用法示例。


在下文中一共展示了Settings::isSingleProjectTracker方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __

 disabled<?php 
}
?>
>
                <option value=1<?php 
if (\thebuggenie\core\framework\Settings::isSingleProjectTracker()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('Yes, behave as tracker for a single project');
?>
</option>
                <option value=0<?php 
if (!\thebuggenie\core\framework\Settings::isSingleProjectTracker()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('No, use regular index page');
?>
</option>
            </select>
            <?php 
echo config_explanation(__('In single project tracker mode, The Bug Genie will display the homepage for the first project as the main page instead of the regular index page') . "<br>" . (count(\thebuggenie\core\entities\Project::getAll()) > 1 ? '<br><b class="more_than_one_project_warning">' . __('More than one project exists. When in "single project" mode, accessing other projects than the first will become harder.') . '</b>' : ''));
?>
        </td>
    </tr>
    <tr>
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:_general.inc.php

示例2: array

    ?>
                        <?php 
    echo javascript_link_tag(image_tag('tabmenu_dropdown.png', array('class' => 'menu_dropdown')));
    ?>
                    </div>
                    <div id="project_information_menu" class="tab_menu_dropdown">
                        <?php 
    include_component('project/projectinfolinks', array('submenu' => true));
    ?>
                    </div>
                </li>
            <?php 
}
?>
        <?php 
if (!$tbg_user->isThisGuest() && !framework\Settings::isSingleProjectTracker() && !framework\Context::isProjectContext()) {
    ?>
                <li<?php 
    if ($tbg_response->getPage() == 'dashboard') {
        ?>
 class="selected"<?php 
    }
    ?>
>
                    <div class="menuitem_container">
                        <?php 
    echo link_tag('javascript:void(0);', image_tag('icon_dashboard_small.png') . __('Dashboard'));
    ?>
                        <?php 
    echo javascript_link_tag(image_tag('tabmenu_dropdown.png', array('class' => 'menu_dropdown')));
    ?>
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:31,代码来源:headermainmenu.inc.php

示例3: runDashboard

 /**
  * Developer dashboard
  *
  * @param \thebuggenie\core\framework\Request $request
  */
 public function runDashboard(framework\Request $request)
 {
     $this->forward403unless(!$this->getUser()->isThisGuest() && $this->getUser()->hasPageAccess('dashboard'));
     if (framework\Settings::isSingleProjectTracker()) {
         if (($projects = entities\Project::getAll()) && ($project = array_shift($projects))) {
             framework\Context::setCurrentProject($project);
         }
     }
     if ($request['dashboard_id']) {
         $dashboard = entities\Dashboard::getB2DBTable()->selectById((int) $request['dashboard_id']);
         if ($dashboard->getType() == entities\Dashboard::TYPE_PROJECT && !$dashboard->getProject()->hasAccess()) {
             unset($dashboard);
         } elseif ($dashboard->getType() == entities\Dashboard::TYPE_USER && $dashboard->getUser()->getID() != framework\Context::getUser()->getID()) {
             unset($dashboard);
         }
     }
     if (!isset($dashboard) || !$dashboard instanceof entities\Dashboard) {
         $dashboard = $this->getUser()->getDefaultDashboard();
     }
     if ($request->isPost()) {
         switch ($request['mode']) {
             case 'add_view':
                 $sort_order = 1;
                 foreach ($dashboard->getViews() as $view) {
                     if ($view->getColumn() == $request['column']) {
                         $sort_order++;
                     }
                 }
                 $view = new entities\DashboardView();
                 $view->setDashboard($dashboard);
                 $view->setType($request['view_type']);
                 $view->setDetail($request['view_subtype']);
                 $view->setColumn($request['column']);
                 $view->setSortOrder($sort_order);
                 $view->save();
                 framework\Context::setCurrentProject($view->getProject());
                 return $this->renderJSON(array('view_content' => $this->getComponentHTML('main/dashboardview', array('view' => $view, 'show' => false)), 'view_id' => $view->getID()));
             case 'remove_view':
                 $deleted = 0;
                 foreach ($dashboard->getViews() as $view) {
                     if ($view->getID() == $request['view_id']) {
                         $deleted = $view->getID();
                         $view->delete();
                     }
                 }
                 return $this->renderJSON(array('deleted_view' => $deleted));
         }
     }
     $this->dashboard = $dashboard;
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:55,代码来源:Main.php


注:本文中的thebuggenie\core\framework\Settings::isSingleProjectTracker方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。