| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- /**
- * The yyy view file of xxx module of ZenTaoPMS.
- * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
- * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
- * @author Shujie Tian<tianshujie@easycorp.ltd>
- * @package xxx
- * @link https://www.zentao.net
- */
- namespace zin;
- $menuItems = array();
- if(!empty($lang->custom->{$module}->fields) && $module != 'reviewcl')
- {
- foreach($lang->custom->{$module}->fields as $key => $value)
- {
- $currentModule = 'custom';
- $method = $key;
- $params = $key == 'required' ? "module=$module" : '';
- $active = $app->rawMethod == strtolower($key) ? 'active' : '';
- $tab = '';
- if(!in_array($key, $config->custom->notSetMethods))
- {
- $params = "module=$module&field=$key";
- $method = 'set';
- $active = (isset($field) and $field == $key) ? 'active' : $active;
- }
- if($module == 'approvalflow')
- {
- $currentModule = 'approvalflow';
- $method = $key;
- $params = '';
- $tab = 'admin';
- }
- if($module == 'setDate')
- {
- if($key == 'holiday')
- {
- $currentModule = 'holiday';
- $method = 'browse';
- $params = '';
- $active = isset($type) ? '' : 'active';
- }
- else
- {
- $method = 'hours';
- $params = "type={$key}";
- $active = (isset($type) and $type == $key) ? 'active' : '';
- }
- }
- if(common::hasPriv($currentModule, $method))
- {
- $menuItems[] = li
- (
- setClass('menu-item'),
- a
- (
- setClass($active),
- set::href(createLink($currentModule, $method, $params)),
- $tab ? set('data-app', $tab) : null,
- $value
- )
- );
- }
- }
- }
- $isEn = $app->getClientLang() == 'en';
- $EnSidebarWidth = $isEn ? set::width('210') : null;
- $sidebarMenu = $menuItems ? sidebar
- (
- set::showToggle(false),
- $EnSidebarWidth,
- div
- (
- setClass('cell p-2.5 bg-white'),
- menu
- (
- $menuItems
- )
- )
- ) : null;
|