* Init deliverable.

This commit is contained in:
sunguangming
2025-04-15 14:14:20 +08:00
committed by 刘刚
parent 68b3361710
commit f0e316f352
8 changed files with 125 additions and 0 deletions
+1
View File
@@ -429,6 +429,7 @@ define('TABLE_ACL', '`' . $config->db->prefix . 'acl`');
define('TABLE_DESIGN', '`' . $config->db->prefix . 'design`');
define('TABLE_DESIGNSPEC', '`' . $config->db->prefix . 'designspec`');
define('TABLE_DELIVERABLE', '`' . $config->db->prefix . 'deliverable`');
define('TABLE_DOCLIB', '`' . $config->db->prefix . 'doclib`');
define('TABLE_DOC', '`' . $config->db->prefix . 'doc`');
define('TABLE_DOCBLOCK', '`' . $config->db->prefix . 'docblock`');
+2
View File
@@ -0,0 +1,2 @@
<?php
$config->deliverable = new stdclass();
+40
View File
@@ -0,0 +1,40 @@
<?php
$config->deliverable->dtable = new stdclass();
$config->deliverable->dtable->fieldList['id']['title'] = $lang->idAB;
$config->deliverable->dtable->fieldList['id']['name'] = 'id';
$config->deliverable->dtable->fieldList['id']['type'] = 'checkID';
$config->deliverable->dtable->fieldList['id']['sortType'] = 'desc';
$config->deliverable->dtable->fieldList['id']['checkbox'] = true;
$config->deliverable->dtable->fieldList['id']['width'] = '80';
$config->deliverable->dtable->fieldList['id']['required'] = true;
$config->deliverable->dtable->fieldList['name']['title'] = $lang->deliverable->name;
$config->deliverable->dtable->fieldList['name']['name'] = 'name';
$config->deliverable->dtable->fieldList['name']['type'] = 'title';
$config->deliverable->dtable->fieldList['name']['sortType'] = true;
$config->deliverable->dtable->fieldList['module']['title'] = $lang->deliverable->module;
$config->deliverable->dtable->fieldList['module']['name'] = 'module';
$config->deliverable->dtable->fieldList['module']['type'] = 'category';
$config->deliverable->dtable->fieldList['module']['sortType'] = true;
$config->deliverable->dtable->fieldList['method']['title'] = $lang->deliverable->method;
$config->deliverable->dtable->fieldList['method']['name'] = 'method';
$config->deliverable->dtable->fieldList['method']['type'] = 'category';
$config->deliverable->dtable->fieldList['method']['sortType'] = true;
$config->deliverable->dtable->fieldList['model']['title'] = $lang->deliverable->model;
$config->deliverable->dtable->fieldList['model']['name'] = 'model';
$config->deliverable->dtable->fieldList['model']['type'] = 'text';
$config->deliverable->dtable->fieldList['model']['sortType'] = true;
$config->deliverable->dtable->fieldList['createdBy']['title'] = $lang->deliverable->createdBy;
$config->deliverable->dtable->fieldList['createdBy']['name'] = 'createdBy';
$config->deliverable->dtable->fieldList['createdBy']['type'] = 'user';
$config->deliverable->dtable->fieldList['createdBy']['sortType'] = true;
$config->deliverable->dtable->fieldList['createdDate']['title'] = $lang->deliverable->createdDate;
$config->deliverable->dtable->fieldList['createdDate']['name'] = 'createdDate';
$config->deliverable->dtable->fieldList['createdDate']['type'] = 'date';
$config->deliverable->dtable->fieldList['createdDate']['sortType'] = true;
+30
View File
@@ -0,0 +1,30 @@
<?php
class deliverable extends control
{
/**
* 交付物列表。
* Browse deliverables.
*
* @access public
* @return void
*/
public function browse()
{
$this->view->deliverables = array();
$this->view->title = $this->lang->deliverable->common;
$this->display();
}
/**
* 创建交付物。
* Create deliverable.
*
* @access public
* @return void
*/
public function create()
{
$this->view->title = $this->lang->deliverable->create;
$this->display();
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
$lang->deliverable->name = '名称';
$lang->deliverable->desc = '描述';
$lang->deliverable->module = '适用对象';
$lang->deliverable->method = '动作';
$lang->deliverable->model = '适用范围';
$lang->deliverable->createdBy = '创建人';
$lang->deliverable->createdDate = '创建时间';
$lang->deliverable->create = '创建';
$lang->deliverable->edit = '编辑';
$lang->deliverable->delete = '删除';
$lang->deliverable->view = '详情';
+9
View File
@@ -0,0 +1,9 @@
<?php
class deliverableModel extends model
{
public function getList()
{
$deliverables = $this->dao->select('*')->from(TABLE_DELIVERABLE)->fetchAll();
return $deliverables;
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace zin;
featureBar();
toolbar
(
hasPriv('deliverable', 'create') ? item(set(array
(
'icon' => 'plus',
'class' => 'primary',
'text' => $lang->deliverable->create,
'data-app' => $app->tab,
'url' => createLink('deliverable', 'create')
))) : null,
);
$cols = $config->deliverable->dtable->fieldList;
dtable
(
set::cols($cols),
set::data($deliverables)
);
+7
View File
@@ -0,0 +1,7 @@
<?php
namespace zin;
formPanel
(
);