* Add comment of zin and program.

This commit is contained in:
tianshujie
2022-11-01 12:10:43 +08:00
parent d15ed1e77d
commit 86e76aef33
5 changed files with 214 additions and 15 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
<?php
common::sortFeatureMenu();
/* Toolbar. */
/* Set toolbar. */
$toolbar = toolbar();
foreach($this->lang->program->featureBar['browse'] as $key => $label)
{
@@ -12,8 +13,10 @@ if(common::hasPriv('project', 'batchEdit') and $programType != 'bygrid' and $has
{
$toolbar->append(html::checkbox('editProject', array('1' => $lang->project->edit), '', $this->cookie->editProject ? 'checked=checked' : ''));
}
$toolbar->append('<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> ' . $lang->user->search . '</a>');
/* Set actionbar. */
$actionbar = actionbar();
if(common::hasPriv('project', 'create'))
{
+42 -7
View File
@@ -1,29 +1,64 @@
<?php
/**
* The v1 file of actionbar module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @author Jinyong Zhu <zhujinyong@easycorp.ltd>
* @package actionbar
* @version $Id
* @link https://www.zentao.net
*/
class actionbar extends wg
{
private $children = array();
/**
* Action list.
*
* @var array
* @access private
*/
private $actions = array();
public function __construct($text = '')
/**
* Construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Set action data.
*
* @param object $item
* @access public
* @return void
*/
public function append($item)
{
$this->children[] = $item;
$this->actions[] = $item;
}
/**
* Get actionbar html.
*
* @access public
* @return string
*/
public function toString()
{
$html = '<div class="pull-right">';
foreach($this->children as $child)
foreach($this->actions as $action)
{
if(is_string($child))
if(is_string($action))
{
$html .= $child;
$html .= $action;
continue;
}
$html .= $child->toString();
$html .= $action->toString();
}
return $html . '</div>';
}
+71
View File
@@ -1,35 +1,106 @@
<?php
/**
* The v1 file of button module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @author Jinyong Zhu <zhujinyong@easycorp.ltd>
* @package button
* @version $Id
* @link https://www.zentao.net
*/
class button extends wg
{
/**
* Button url.
*
* @var string
* @access public
*/
public $link = '';
/**
* Jump mode.
*
* @var string
* @access public
*/
public $target = '';
/**
* Miscellaneous.
*
* @var string
* @access public
*/
public $misc = '';
/**
* Whether to wrap.
*
* @var bool
* @access public
*/
public $newline = true;
/**
* Construct function, init tab data.
*
* @param string $text
* @access public
* @return void
*/
public function __construct($text)
{
parent::__construct();
$this->text = $text;
}
/**
* Set Button url.
*
* @param string $link
* @access public
* @return object
*/
public function link($link)
{
$this->link = $link;
return $this;
}
/**
* Set button jump mode.
*
* @param string $target
* @access public
* @return object
*/
public function target($target = '')
{
$this->target = $target;
return $this;
}
/**
* Set attribute.
*
* @param string $misc
* @access public
* @return object
*/
public function misc($misc)
{
$this->misc = $misc;
return $this;
}
/**
* Set button newline.
*
* @param bool $newline
* @access public
* @return object
*/
public function newline($newline = true)
{
$this->newline = $newline;
+56
View File
@@ -1,28 +1,84 @@
<?php
/**
* The v1 file of tab module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @author Jinyong Zhu <zhujinyong@easycorp.ltd>
* @package tab
* @version $Id
* @link https://www.zentao.net
*/
class tab extends wg
{
/**
* Tab content.
*
* @var string
* @access private
*/
private $text;
/**
* Active status.
*
* @var bool
* @access private
*/
private $isActive;
/**
* Tab url.
*
* @var string
* @access private
*/
private $link;
/**
* Construct function, init tab data.
*
* @param string $text
* @access public
* @return void
*/
public function __construct($text)
{
parent::__construct();
$this->text = $text;
}
/**
* Set active status.
*
* @param bool $isActive
* @access public
* @return object
*/
public function active($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Set tab url.
*
* @param string $link
* @access public
* @return object
*/
public function link($link)
{
$this->link = $link;
return $this;
}
/**
* Get tab html.
*
* @access public
* @return string
*/
public function toString()
{
$active = $this->isActive ? 'btn-active-text' : '';
+41 -7
View File
@@ -1,29 +1,63 @@
<?php
/**
* The v1 file of toolbar module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @author Jinyong Zhu <zhujinyong@easycorp.ltd>
* @package toolbar
* @version $Id
* @link https://www.zentao.net
*/
class toolbar extends wg
{
private $children = array();
/**
* Tool list.
*
* @var array
* @access private
*/
private $tools = array();
public function __construct($text = '')
/**
* Construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Set tools data.
*
* @param object $item
* @access public
* @return void
*/
public function append($item)
{
$this->children[] = $item;
$this->tools[] = $item;
}
/**
* Get toolbar html.
*
* @access public
* @return string
*/
public function toString()
{
$html = '<div class="btn-toolBar pull-left">';
foreach($this->children as $child)
foreach($this->tools as $tool)
{
if(is_string($child))
if(is_string($tool))
{
$html .= $child;
$html .= $tool;
continue;
}
$html .= $child->toString();
$html .= $tool->toString();
}
return $html . '</div>';
}