diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 121f22921e..bbe2bf8f82 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -32,6 +32,12 @@ js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty); + bug->create->requiredFields) as $field) + { + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; + } + ?>
diff --git a/module/build/config.php b/module/build/config.php index 350e441a74..86715fa4b7 100644 --- a/module/build/config.php +++ b/module/build/config.php @@ -8,3 +8,22 @@ $config->build->edit->requiredFields = 'product,project,name,builder,date'; $config->build->editor = new stdclass(); $config->build->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); $config->build->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); + +global $lang; +$config->build->search['module'] = 'build'; +$config->build->search['fields']['name'] = $lang->build->name; +$config->build->search['fields']['id'] = $lang->build->id; +$config->build->search['fields']['product'] = '所属' . $lang->build->product; +$config->build->search['fields']['scmPath'] = $lang->build->scmPath; +$config->build->search['fields']['filePath'] = $lang->build->filePath; +$config->build->search['fields']['date'] = $lang->build->date; +$config->build->search['fields']['builder'] = $lang->build->builder; +$config->build->search['fields']['desc'] = $lang->build->desc; + +$config->build->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->build->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => 'products'); +$config->build->search['params']['scmPath'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->build->search['params']['filePath'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->build->search['params']['date'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->build->search['params']['builder'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->build->search['params']['desc'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); diff --git a/module/build/model.php b/module/build/model.php index 889b55c75b..b0a06424be 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -52,11 +52,13 @@ class buildModel extends model /** * Get builds of a project. * - * @param int $projectID + * @param int $projectID + * @param string $type all|product|bysearch + * @param int|string $param productID|buildQuery * @access public * @return array */ - public function getProjectBuilds($projectID) + public function getProjectBuilds($projectID, $type, $param) { return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName, t4.name as branchName') ->from(TABLE_BUILD)->alias('t1') @@ -65,10 +67,53 @@ class buildModel extends model ->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id') ->where('t1.project')->eq((int)$projectID) ->andWhere('t1.deleted')->eq(0) + ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() + ->beginIF($type == 'bysearch')->andWhere($param)->fi() ->orderBy('t1.date DESC, t1.id desc') ->fetchAll('id'); } + /** + * Get builds of a project by search. + * + * @param int $projectID + * @param int $queryID + * @access public + * @return array + */ + public function getProjectBuildsBySearch($projectID, $queryID) + { + /* If there are saved query conditions, reset the session. */ + if($queryID) + { + $query = $this->loadModel('search')->getQuery($queryID); + if($query) + { + $this->session->set('projectBuildQuery', $query->sql); + $this->session->set('projectBuildForm', $query->form); + } + } + + $allProduct = "`product` = 'all'"; + $buildQuery = $this->session->projectBuildQuery; + if(strpos($this->session->projectBuildQuery, $allProduct) !== false) + { + $buildQuery = str_replace($allProduct, '1', $this->session->projectBuildQuery); + } + + /* Distinguish between repeated fields. */ + $fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`'); + foreach($fields as $field) + { + if(strpos($this->session->projectBuildQuery, $field) !== false) + { + $buildQuery = str_replace($field, "t1." . $field, $buildQuery); + } + } + + return $this->getProjectBuilds($projectID, 'bysearch', $buildQuery); + } + /** * Get builds of a project in pairs. * diff --git a/module/doc/model.php b/module/doc/model.php index 243c627180..cd665496e1 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -619,7 +619,7 @@ class docModel extends model ->join('groups', ',') ->join('users', ',') ->join('mailto', ',') - ->remove('files,labels,uid') + ->remove('files,labels,uid,contactListMenu') ->get(); /* Fix bug #2929. strip_tags($this->post->contentMarkdown, $this->config->allowedTags)*/ @@ -695,7 +695,7 @@ class docModel extends model ->join('groups', ',') ->join('users', ',') ->join('mailto', ',') - ->remove('comment,files,labels,uid') + ->remove('comment,files,labels,uid,contactListMenu') ->get(); if($doc->contentType == 'markdown') $doc->content = $this->post->content; if($doc->acl == 'private') $doc->users = $oldDoc->addedBy; diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index 62781f1fbd..b73426ff4f 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -64,7 +64,7 @@ - + @@ -53,7 +63,7 @@ $build):?> - + + + + + + + + + + + + + + + + + + + + + printExtendFields('', 'table');?> + + + + + + + + + + +
mailto, "multiple class='form-control chosen'"); echo $this->fetch('my', 'buildContactLists'); ?>
diff --git a/module/extension/lang/de.php b/module/extension/lang/de.php index a30e94b6fc..f692487ef2 100644 --- a/module/extension/lang/de.php +++ b/module/extension/lang/de.php @@ -9,51 +9,52 @@ * @version $Id$ * @link http://www.zentao.net */ -$lang->extension->common = 'Erweiterung'; -$lang->extension->browse = 'Durchsuchen'; -$lang->extension->install = 'Installieren'; -$lang->extension->installAuto = 'Auto Install'; -$lang->extension->installForce = 'Installation erzwingen'; -$lang->extension->uninstall = 'Deinstallieren'; +$lang->extension->common = 'Erweiterung'; +$lang->extension->browse = 'Durchsuchen'; +$lang->extension->install = 'Installieren'; +$lang->extension->installAuto = 'Auto Install'; +$lang->extension->installForce = 'Installation erzwingen'; +$lang->extension->uninstall = 'Deinstallieren'; $lang->extension->uninstallAction = 'Uninstall Extension'; -$lang->extension->activate = 'Aktivieren'; +$lang->extension->activate = 'Aktivieren'; $lang->extension->activateAction = 'Activate Extension'; -$lang->extension->deactivate = 'Deaktivieren'; +$lang->extension->deactivate = 'Deaktivieren'; $lang->extension->deactivateAction = 'Deactivate Extension'; -$lang->extension->obtain = 'Hole Erweiterung'; -$lang->extension->view = 'Details'; -$lang->extension->downloadAB = 'Download'; -$lang->extension->upload = 'Local Installation'; -$lang->extension->erase = 'Löschen'; +$lang->extension->obtain = 'Hole Erweiterung'; +$lang->extension->view = 'Details'; +$lang->extension->downloadAB = 'Download'; +$lang->extension->upload = 'Local Installation'; +$lang->extension->erase = 'Löschen'; $lang->extension->eraseAction = 'Erase Extension'; -$lang->extension->upgrade = 'Erweiterung Upgraden'; -$lang->extension->agreeLicense = 'Lizenz'; +$lang->extension->upgrade = 'Erweiterung Upgraden'; +$lang->extension->agreeLicense = 'Lizenz'; $lang->extension->structure = 'Struktur'; $lang->extension->structureAction = 'Struktur'; $lang->extension->installed = 'Installiert'; -$lang->extension->deactivated = 'Deaktiviert'; -$lang->extension->available = 'Heruntergeladen'; +$lang->extension->deactivated = 'Deaktiviert'; +$lang->extension->available = 'Heruntergeladen'; -$lang->extension->name = 'Erweiterungsname'; -$lang->extension->code = 'Code'; -$lang->extension->desc = 'Beschreiben'; -$lang->extension->type = 'Typ'; -$lang->extension->dirs = 'Verzeichnisse'; -$lang->extension->files = 'Dateien'; -$lang->extension->status = 'Status'; -$lang->extension->version = 'Version'; -$lang->extension->latest = 'Letzte:%s,benötigt ZenTao %s'; -$lang->extension->author = 'Author'; -$lang->extension->license = 'Lizenz'; -$lang->extension->site = 'Website'; -$lang->extension->downloads = 'Downloads'; -$lang->extension->compatible = 'Kompatibilität'; -$lang->extension->grade = 'Wertung'; -$lang->extension->depends = 'Benötigt'; -$lang->extension->expireDate = 'Verfällt'; -$lang->extension->zentaoCompatible = 'Kompatible Version'; -$lang->extension->installedTime = 'Installationszeit'; +$lang->extension->name = 'Erweiterungsname'; +$lang->extension->code = 'Code'; +$lang->extension->desc = 'Beschreiben'; +$lang->extension->type = 'Typ'; +$lang->extension->dirs = 'Verzeichnisse'; +$lang->extension->files = 'Dateien'; +$lang->extension->status = 'Status'; +$lang->extension->version = 'Version'; +$lang->extension->latest = 'Letzte:%s,benötigt ZenTao %s'; +$lang->extension->author = 'Author'; +$lang->extension->license = 'Lizenz'; +$lang->extension->site = 'Website'; +$lang->extension->downloads = 'Downloads'; +$lang->extension->compatible = 'Kompatibilität'; +$lang->extension->grade = 'Wertung'; +$lang->extension->depends = 'Benötigt'; +$lang->extension->expireDate = 'Verfällt'; +$lang->extension->zentaoCompatible = 'Kompatible Version'; +$lang->extension->installedTime = 'Installationszeit'; +$lang->extension->life = 'lifetime'; $lang->extension->publicList[0] = 'Manuell'; $lang->extension->publicList[1] = 'Auto'; diff --git a/module/extension/lang/en.php b/module/extension/lang/en.php index 9f6d32a4da..b2c0feb24c 100644 --- a/module/extension/lang/en.php +++ b/module/extension/lang/en.php @@ -35,25 +35,26 @@ $lang->extension->installed = 'Installed'; $lang->extension->deactivated = 'Deactivated'; $lang->extension->available = 'Downloaded'; -$lang->extension->name = 'Extension Name'; -$lang->extension->code = 'Code'; -$lang->extension->desc = 'Description'; -$lang->extension->type = 'Type'; -$lang->extension->dirs = 'Installation Directory'; -$lang->extension->files = 'Installation Files'; -$lang->extension->status = 'Status'; -$lang->extension->version = 'Version'; -$lang->extension->latest = 'Latest:%s,need zentao %s'; -$lang->extension->author = 'Author'; -$lang->extension->license = 'License'; -$lang->extension->site = 'Website'; -$lang->extension->downloads = 'Downloads'; -$lang->extension->compatible = 'Compatibility'; -$lang->extension->grade = 'Score'; -$lang->extension->depends = 'Dependency'; -$lang->extension->expireDate = 'Expire'; -$lang->extension->zentaoCompatible = 'Compatible Version'; -$lang->extension->installedTime = 'Installed Time'; +$lang->extension->name = 'Extension Name'; +$lang->extension->code = 'Code'; +$lang->extension->desc = 'Description'; +$lang->extension->type = 'Type'; +$lang->extension->dirs = 'Installation Directory'; +$lang->extension->files = 'Installation Files'; +$lang->extension->status = 'Status'; +$lang->extension->version = 'Version'; +$lang->extension->latest = 'Latest:%s,need zentao %s'; +$lang->extension->author = 'Author'; +$lang->extension->license = 'License'; +$lang->extension->site = 'Website'; +$lang->extension->downloads = 'Downloads'; +$lang->extension->compatible = 'Compatibility'; +$lang->extension->grade = 'Score'; +$lang->extension->depends = 'Dependency'; +$lang->extension->expireDate = 'Expire'; +$lang->extension->zentaoCompatible = 'Compatible Version'; +$lang->extension->installedTime = 'Installed Time'; +$lang->extension->life = 'lifetime'; $lang->extension->publicList[0] = 'Manual'; $lang->extension->publicList[1] = 'Auto'; diff --git a/module/extension/lang/fr.php b/module/extension/lang/fr.php index 37f976d5ff..2ac2c48056 100644 --- a/module/extension/lang/fr.php +++ b/module/extension/lang/fr.php @@ -35,25 +35,26 @@ $lang->extension->installed = 'Installée'; $lang->extension->deactivated = 'Désctivatée'; $lang->extension->available = 'Téléchargée'; -$lang->extension->name = 'Nom Extension'; -$lang->extension->code = 'Code'; -$lang->extension->desc = 'Description'; -$lang->extension->type = 'Type'; -$lang->extension->dirs = 'Répertoire Installation'; -$lang->extension->files = 'Fichiers Installation'; -$lang->extension->status = 'Statut'; -$lang->extension->version = 'Version'; -$lang->extension->latest = 'Dernière:%s,a besoin de zentao %s'; -$lang->extension->author = 'Auteur'; -$lang->extension->license = 'License'; -$lang->extension->site = 'Website'; -$lang->extension->downloads = 'Téléchargements'; -$lang->extension->compatible = 'Compatibilité'; -$lang->extension->grade = 'Score'; -$lang->extension->depends = 'Dépendence'; -$lang->extension->expireDate = 'Expire le'; -$lang->extension->zentaoCompatible = 'Version Compatible'; -$lang->extension->installedTime = 'Date Installation'; +$lang->extension->name = 'Nom Extension'; +$lang->extension->code = 'Code'; +$lang->extension->desc = 'Description'; +$lang->extension->type = 'Type'; +$lang->extension->dirs = 'Répertoire Installation'; +$lang->extension->files = 'Fichiers Installation'; +$lang->extension->status = 'Statut'; +$lang->extension->version = 'Version'; +$lang->extension->latest = 'Dernière:%s,a besoin de zentao %s'; +$lang->extension->author = 'Auteur'; +$lang->extension->license = 'License'; +$lang->extension->site = 'Website'; +$lang->extension->downloads = 'Téléchargements'; +$lang->extension->compatible = 'Compatibilité'; +$lang->extension->grade = 'Score'; +$lang->extension->depends = 'Dépendence'; +$lang->extension->expireDate = 'Expire le'; +$lang->extension->zentaoCompatible = 'Version Compatible'; +$lang->extension->installedTime = 'Date Installation'; +$lang->extension->life = 'lifetime'; $lang->extension->publicList[0] = 'Manuel'; $lang->extension->publicList[1] = 'Auto'; diff --git a/module/extension/lang/vi.php b/module/extension/lang/vi.php index ad5aa839b3..01c7a938c4 100644 --- a/module/extension/lang/vi.php +++ b/module/extension/lang/vi.php @@ -54,6 +54,7 @@ $lang->extension->depends = 'Dependency'; $lang->extension->expireDate = 'Expire'; $lang->extension->zentaoCompatible = 'Compatible Version'; $lang->extension->installedTime = 'Installed Time'; +$lang->extension->life = 'lifetime'; $lang->extension->publicList[0] = 'Manual'; $lang->extension->publicList[1] = 'Tự động'; diff --git a/module/extension/lang/zh-cn.php b/module/extension/lang/zh-cn.php index b79c5e998b..a157584c4d 100644 --- a/module/extension/lang/zh-cn.php +++ b/module/extension/lang/zh-cn.php @@ -35,25 +35,26 @@ $lang->extension->installed = '已安装'; $lang->extension->deactivated = '被禁用'; $lang->extension->available = '已下载'; -$lang->extension->name = '插件名称'; -$lang->extension->code = '代号'; -$lang->extension->desc = '描述'; -$lang->extension->type = '类型'; -$lang->extension->dirs = '安装目录'; -$lang->extension->files = '安装文件'; -$lang->extension->status = '状态'; -$lang->extension->version = '版本'; -$lang->extension->latest = '最新版本%s,兼容禅道%s'; -$lang->extension->author = '作者'; -$lang->extension->license = '授权'; -$lang->extension->site = '官网'; -$lang->extension->downloads = '下载量'; -$lang->extension->compatible = '兼容性'; -$lang->extension->grade = '评分'; -$lang->extension->depends = '依赖'; -$lang->extension->expireDate = '到期日期'; -$lang->extension->zentaoCompatible = '适用版本'; -$lang->extension->installedTime = '安装时间'; +$lang->extension->name = '插件名称'; +$lang->extension->code = '代号'; +$lang->extension->desc = '描述'; +$lang->extension->type = '类型'; +$lang->extension->dirs = '安装目录'; +$lang->extension->files = '安装文件'; +$lang->extension->status = '状态'; +$lang->extension->version = '版本'; +$lang->extension->latest = '最新版本%s,兼容禅道%s'; +$lang->extension->author = '作者'; +$lang->extension->license = '授权'; +$lang->extension->site = '官网'; +$lang->extension->downloads = '下载量'; +$lang->extension->compatible = '兼容性'; +$lang->extension->grade = '评分'; +$lang->extension->depends = '依赖'; +$lang->extension->expireDate = '到期日期'; +$lang->extension->zentaoCompatible = '适用版本'; +$lang->extension->installedTime = '安装时间'; +$lang->extension->life = '终身'; $lang->extension->publicList[0] = '手工下载'; $lang->extension->publicList[1] = '直接下载'; diff --git a/module/extension/lang/zh-tw.php b/module/extension/lang/zh-tw.php index da20a0d768..9298092656 100644 --- a/module/extension/lang/zh-tw.php +++ b/module/extension/lang/zh-tw.php @@ -35,25 +35,26 @@ $lang->extension->installed = '已安裝'; $lang->extension->deactivated = '被禁用'; $lang->extension->available = '已下載'; -$lang->extension->name = '插件名稱'; -$lang->extension->code = '代號'; -$lang->extension->desc = '描述'; -$lang->extension->type = '類型'; -$lang->extension->dirs = '安裝目錄'; -$lang->extension->files = '安裝檔案'; -$lang->extension->status = '狀態'; -$lang->extension->version = '版本'; -$lang->extension->latest = '最新版本%s,兼容禪道%s'; -$lang->extension->author = '作者'; -$lang->extension->license = '授權'; -$lang->extension->site = '官網'; -$lang->extension->downloads = '下載量'; -$lang->extension->compatible = '兼容性'; -$lang->extension->grade = '評分'; -$lang->extension->depends = '依賴'; -$lang->extension->expireDate = '到期日期'; -$lang->extension->zentaoCompatible = '適用版本'; -$lang->extension->installedTime = '安裝時間'; +$lang->extension->name = '插件名稱'; +$lang->extension->code = '代號'; +$lang->extension->desc = '描述'; +$lang->extension->type = '類型'; +$lang->extension->dirs = '安裝目錄'; +$lang->extension->files = '安裝檔案'; +$lang->extension->status = '狀態'; +$lang->extension->version = '版本'; +$lang->extension->latest = '最新版本%s,兼容禪道%s'; +$lang->extension->author = '作者'; +$lang->extension->license = '授權'; +$lang->extension->site = '官網'; +$lang->extension->downloads = '下載量'; +$lang->extension->compatible = '兼容性'; +$lang->extension->grade = '評分'; +$lang->extension->depends = '依賴'; +$lang->extension->expireDate = '到期日期'; +$lang->extension->zentaoCompatible = '適用版本'; +$lang->extension->installedTime = '安裝時間'; +$lang->extension->life = '終身'; $lang->extension->publicList[0] = '手工下載'; $lang->extension->publicList[1] = '直接下載'; diff --git a/module/extension/model.php b/module/extension/model.php index d7d5085111..bf05963faf 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -910,6 +910,10 @@ class extensionModel extends model $startDate = $order->paidDate != '0000-00-00 00:00:00' ? $order->paidDate : $order->createdDate; if($days) $expireDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600); } + else + { + $expireDate = $order->type; + } } return $expireDate; diff --git a/module/extension/view/browse.html.php b/module/extension/view/browse.html.php index 556951cf65..59bed96653 100644 --- a/module/extension/view/browse.html.php +++ b/module/extension/view/browse.html.php @@ -55,7 +55,13 @@ echo "{$lang->extension->version}: {$extension->version} "; echo "{$lang->extension->author}: {$extension->author} "; $expireDate = $this->extension->getExpireDate($extension); - if(!empty($expireDate)) echo "{$lang->extension->expireDate}: {$expireDate}"; + + if(!empty($expireDate)) + { + echo $lang->extension->expireDate . ': '; + if($expireDate != 'life') echo "{$expireDate}"; + else echo "{$lang->extension->life}"; + } ?> diff --git a/module/install/lang/de.php b/module/install/lang/de.php index 72503318bf..18277ec5c9 100644 --- a/module/install/lang/de.php +++ b/module/install/lang/de.php @@ -197,7 +197,7 @@ EOD; $lang->install->zdoo = new stdclass(); $lang->install->zdoo->name = 'ZDOO'; $lang->install->zdoo->logo = 'images/main/zdoo.ico'; -$lang->install->zdoo->url = 'https://www.zdoo.com'; +$lang->install->zdoo->url = 'https://www.zdoo.co/'; $lang->install->zdoo->desc = <<
  • CRM: Customer Management und Bestellvervollgung
  • diff --git a/module/install/lang/en.php b/module/install/lang/en.php index 08c1bf7aae..9bfabeeab8 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -197,7 +197,7 @@ EOD; $lang->install->zdoo = new stdclass(); $lang->install->zdoo->name = 'ZDOO'; $lang->install->zdoo->logo = 'images/main/zdoo.ico'; -$lang->install->zdoo->url = 'https://www.zdoo.com'; +$lang->install->zdoo->url = 'https://www.zdoo.co/'; $lang->install->zdoo->desc = <<
  • CRM: Customer Management and Order Tracking
  • diff --git a/module/install/lang/fr.php b/module/install/lang/fr.php index 242750f726..8790988ca6 100644 --- a/module/install/lang/fr.php +++ b/module/install/lang/fr.php @@ -197,7 +197,7 @@ EOD; $lang->install->zdoo = new stdclass(); $lang->install->zdoo->name = 'ZDOO'; $lang->install->zdoo->logo = 'images/main/zdoo.ico'; -$lang->install->zdoo->url = 'https://www.zdoo.com'; +$lang->install->zdoo->url = 'https://www.zdoo.co/'; $lang->install->zdoo->desc = <<
  • CRM: gestion des clients et suivi des commandes
  • diff --git a/module/install/lang/vi.php b/module/install/lang/vi.php index 20bd28238f..2fc3854d9a 100644 --- a/module/install/lang/vi.php +++ b/module/install/lang/vi.php @@ -197,7 +197,7 @@ EOD; $lang->install->zdoo = new stdclass(); $lang->install->zdoo->name = 'ZDOO'; $lang->install->zdoo->logo = 'images/main/zdoo.ico'; -$lang->install->zdoo->url = 'https://www.zdoo.com'; +$lang->install->zdoo->url = 'https://www.zdoo.co/'; $lang->install->zdoo->desc = <<
  • CRM: Customer Management and Order Tracking
  • diff --git a/module/project/control.php b/module/project/control.php index 0e41a83346..3449b2619c 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -856,33 +856,59 @@ class project extends control * Browse builds of a project. * * @param int $projectID + * @param string $type all|product|bysearch + * @param int $param * @access public * @return void */ - public function build($projectID = 0) + public function build($projectID = 0, $type = 'all', $param = 0) { + /* Load module and set session. */ $this->loadModel('testtask'); $this->session->set('buildList', $this->app->getURI(true)); $project = $this->commonAction($projectID); $projectID = $project->id; - /* Header and position. */ - $this->view->title = $project->name . $this->lang->colon . $this->lang->project->build; - $this->view->position[] = html::a(inlink('browse', "projectID=$projectID"), $project->name); - $this->view->position[] = $this->lang->project->build; + /* Get products' list. */ + $products = $this->project->getProducts($projectID, false); + $products = array('' => '') + $products; - $builds = $this->loadModel('build')->getProjectBuilds((int)$projectID); + /* Build the search form. */ + $type = strtolower($type); + $queryID = ($type == 'bysearch') ? (int)$param : 0; + $actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID"); + $this->project->buildVersionSearchForm($products, $queryID, $actionURL); + + /* Get builds. */ + if($type == 'bysearch') + { + $builds = $this->loadModel('build')->getProjectBuildsBySearch((int)$projectID, $param); + } + else + { + $builds = $this->loadModel('build')->getProjectBuilds((int)$projectID, $type, $param); + } + + /* Set project builds. */ $projectBuilds = array(); if(!empty($builds)) { foreach($builds as $build) $projectBuilds[$build->product][] = $build; } - /* Get builds. */ + /* Header and position. */ + $this->view->title = $project->name . $this->lang->colon . $this->lang->project->build; + $this->view->position[] = html::a(inlink('browse', "projectID=$projectID"), $project->name); + $this->view->position[] = $this->lang->project->build; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->buildsTotal = count($builds); $this->view->projectBuilds = $projectBuilds; + $this->view->projectID = $projectID; + $this->view->product = $type == 'product' ? $param : 'all'; + $this->view->products = $products; + $this->view->type = $type; $this->display(); } diff --git a/module/project/js/build.js b/module/project/js/build.js new file mode 100644 index 0000000000..63c872731a --- /dev/null +++ b/module/project/js/build.js @@ -0,0 +1,12 @@ +/** + * Change product. + * + * @param int $productID + * @access public + * @return void + */ +function changeProduct(productID) +{ + link = createLink('project', 'build', 'projectID=' + projectID + '&type=product¶m=' + productID); + location.href = link; +} diff --git a/module/project/model.php b/module/project/model.php index 8a19254d58..03f58f93ea 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2485,6 +2485,28 @@ class projectModel extends model $this->loadModel('search')->setSearchParams($this->config->project->search); } + /** + * Build version search form. + * + * @param array $products + * @param int $queryID + * @param string $actionURL + * @access public + * @return void + */ + public function buildVersionSearchForm($products, $queryID, $actionURL) + { + $this->loadModel('build'); + + /* Set search param. */ + $this->config->build->search['module'] = 'projectBuild'; + $this->config->build->search['actionURL'] = $actionURL; + $this->config->build->search['queryID'] = $queryID; + $this->config->build->search['params']['product']['values'] = $products; + + $this->loadModel('search')->setSearchParams($this->config->build->search); + } + /** * Get Kanban tasks * diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 793b0b8c3a..1d16608c6f 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -12,18 +12,28 @@ ?> build->confirmDelete)?> +
    +

    @@ -39,7 +49,7 @@

    build->id;?>build->product;?>build->product;?> build->name;?> build->scmPath;?> build->filePath;?>
    id"), sprintf('%03d', $build->id));?>productName;?>productName;?> branchName) echo "{$build->branchName}"?> createLink('build', 'view', "build=$build->id"), $build->name);?> diff --git a/module/story/model.php b/module/story/model.php index 1feaebfa6e..a780ad6614 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -972,7 +972,7 @@ class storyModel extends model if($oldStory->plan != $story->plan) $this->updateStoryOrderOfPlan($storyID, $story->plan, $oldStory->plan); $this->executeHooks($storyID); - $this->setStage($storyID); + $this->batchChangeStage(array($storyID), $story->stage); if($story->closedReason == 'done') $this->loadModel('score')->create('story', 'close'); $allChanges[$storyID] = common::createChanges($oldStory, $story); } diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index 4052b82dd6..87b7fc6a6a 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -24,6 +24,12 @@ + story->create->requiredFields) as $field) + { + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; + } + ?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 0d33d38e3a..7b1e76284e 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -136,7 +136,7 @@ common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); - if($config->global->flow != 'onlyStory' and !isonlybody() and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) + if($config->global->flow != 'onlyStory' and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) { $this->app->loadLang('testcase'); echo "
    "; @@ -144,10 +144,10 @@ echo "
    + task->create->requiredFields) as $field) + { + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; + } + ?>
    diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 6582b2bc5d..678fcb47e8 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -23,232 +23,238 @@ - -
    - - - - - - - - - testcase->typeList['unit']);?> - - - + testcase->create->requiredFields) as $field) + { + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; + } + ?> + +
    testcase->product;?> -
    - - session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?> -
    -
    -
    - testcase->module?> - "; - echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'"); - echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'"); - echo ''; - } - ?> -
    -
    testcase->type;?>testcase->typeList, $type, "class='form-control chosen'");?> -
    - testcase->stage?> - testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?> -
    -
    + + + + + + + + + testcase->typeList['unit']);?> + + + + + + global->flow != 'onlyTest'):?> + + + + - - global->flow != 'onlyTest'):?> - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - printExtendFields('', 'table');?> - - - - - - - - - - -
    testcase->product;?> +
    + + session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?> +
    +
    +
    + testcase->module?> + "; + echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'"); + echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'"); + echo ''; + } + ?> +
    +
    testcase->type;?>testcase->typeList, $type, "class='form-control chosen'");?> +
    + testcase->stage?> + testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?> +
    +
    testcase->lblStory;?> +
    + searchMore . '"');?> + + + + + createLink('story', 'view', "storyID=$storyID", '', true), $lang->preview, '', "class='btn' id='preview'");?> + + +
    +
    testcase->lblStory;?> -
    - searchMore . '"');?> - - - - - createLink('story', 'view', "storyID=$storyID", '', true), $lang->preview, '', "class='btn' id='preview'");?> - - -
    -
    testcase->title;?> -
    -
    - -
    - - - +
    testcase->title;?> +
    +
    + +
    + + + +
    -
    - - testcase->pri;?> - testcase->priList as $priKey => $priValue) - { - if(!empty($priKey) and (string)$priKey != (string)$priValue) - { - $hasCustomPri = true; - break; - } - } - $priList = $lang->testcase->priList; - if(end($priList)) unset($priList[0]); - if(!isset($priList[$pri])) - { - reset($priList); - $pri = key($priList); - } - ?> - - - - -
    - - - - - testcase->forceNotReview()):?> - testcase->forceNotReview, '', "id='forceNotReview0'");?> - -
    -
    testcase->precondition;?>
    testcase->steps;?> - - - - - - - - - - - - - - - - - $step):?> - - - - - - - - -
    testcase->stepID;?>testcase->stepDesc;?>testcase->stepExpect;?>actions;?>
    -
    - - - - -
    - - -
    -
    -
    -
    -
    - - - -
    -
    -
    - - desc, "rows='1' class='form-control autosize step-steps'") ?> - - type)) $step->type = 'step';?> - -
    - type === 'group') echo ' checked' ?>> - -
    -
    -
    -
    expect, "rows='1' class='form-control autosize step-expects'") ?> -
    - - - -
    -
    -
    testcase->keywords;?>
    testcase->status;?>
    testcase->files;?>fetch('file', 'buildform');?>
    - - -
    - - -
    testcase->precondition;?>
    testcase->steps;?> + + + + + + + + + + + + + + + + + $step):?> + + + + + + + + +
    testcase->stepID;?>testcase->stepDesc;?>testcase->stepExpect;?>actions;?>
    +
    + + + + +
    + + +
    +
    +
    +
    +
    + + + +
    +
    +
    + + desc, "rows='1' class='form-control autosize step-steps'") ?> + + type)) $step->type = 'step';?> + +
    + type === 'group') echo ' checked' ?>> + +
    +
    +
    +
    expect, "rows='1' class='form-control autosize step-expects'") ?> +
    + + + +
    +
    +
    testcase->keywords;?>
    testcase->status;?>
    testcase->files;?>fetch('file', 'buildform');?>
    + + +
    + + + - testcase->module)?> diff --git a/module/testtask/control.php b/module/testtask/control.php index 69c74632aa..b35eebca1a 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -436,6 +436,7 @@ class testtask extends control $this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct); $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); $this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testtask->statusList; + $this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries(); $this->config->testcase->search['queryID'] = $queryID; $this->config->testcase->search['fields']['assignedTo'] = $this->lang->testtask->assignedTo; diff --git a/module/user/view/batchcreate.html.php b/module/user/view/batchcreate.html.php index a680c42798..4bc93c4bbb 100644 --- a/module/user/view/batchcreate.html.php +++ b/module/user/view/batchcreate.html.php @@ -35,7 +35,7 @@ if($field) { $requiredFields[$field] = ''; - if(strpos(",{$config->user->custom->batchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; + if(strpos(",{$config->user->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; } } $minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';