* Add program to repo.

This commit is contained in:
sgm0422
2020-07-01 16:57:13 +08:00
parent 0dc6796414
commit 01d630040b
7 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ ALTER TABLE `zt_product` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`
ALTER TABLE `zt_task` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_doc` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_story` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_repo` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_repo` ADD `program` varchar(255) NOT NULL AFTER `id`;
ALTER TABLE `zt_bug` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_case` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_testtask` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
+1
View File
@@ -656,6 +656,7 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
-- DROP TABLE IF EXISTS `zt_repo`;
CREATE TABLE IF NOT EXISTS `zt_repo` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`program` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`path` varchar(255) NOT NULL,
`prefix` varchar(100) NOT NULL,
+3 -2
View File
@@ -88,8 +88,9 @@ class repo extends control
$this->repo->setMenu($this->repos, '', false);
$this->app->loadLang('action');
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
$this->view->programs = $this->loadModel('program')->getPairs();
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->create;
$this->view->position[] = html::a(inlink('maintain'), $this->lang->repo->common);
+1
View File
@@ -2,6 +2,7 @@
$lang->repo->common = 'Repo';
$lang->repo->browse = 'View';
$lang->repo->viewRevision = 'View Revision';
$lang->repo->program = 'Program';
$lang->repo->create = 'Create';
$lang->repo->createAction = 'Create Repo';
$lang->repo->maintain = 'Repo List';
+1
View File
@@ -2,6 +2,7 @@
$lang->repo->common = '代码';
$lang->repo->browse = '浏览';
$lang->repo->viewRevision = '查看修订';
$lang->repo->program = '所属项目';
$lang->repo->create = '创建';
$lang->repo->createAction = '创建版本库';
$lang->repo->maintain = '版本库列表';
+1 -1
View File
@@ -189,7 +189,7 @@ class repoModel extends model
$this->checkConnection();
$data = fixer::input('post')
->skipSpecial('path,client,account,password')
->add('program', $this->session->program)
->join('program', ',')
->get();
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
+4
View File
@@ -24,6 +24,10 @@
</div>
<form id='repoForm' method='post' class='form-ajax'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->repo->program; ?></th>
<td class='required'><?php echo html::select('program[]', $programs, $this->session->program, "class='form-control chosen' multiple"); ?></td>
</tr>
<tr>
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, 'Git', "onchange='scmChanged(this.value)' class='form-control'"); ?></td>