* Add program to repo.
This commit is contained in:
+1
-1
@@ -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`;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 = '版本库列表';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user