From d4b4e911c06b0f5c7046729d316edfcaa740cca3 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 4 Dec 2018 14:46:34 +0800 Subject: [PATCH] * Code for task #5162. --- module/common/lang/en.php | 1 + module/common/lang/zh-cn.php | 7 ++++--- module/common/model.php | 15 ++++++++++++++- module/common/view/footer.html.php | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index e980dfce60..b1929e7781 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -504,6 +504,7 @@ $lang->pager->summery = "%s-%s of %s."; $lang->proVersion = "ZenTao Pro   "; $lang->downNotify = "Download Desktop Notification"; +$lang->downloadClient = "Download Desktop Client"; $lang->website = "https://www.zentao.pm"; $lang->suhosinInfo = "Warning! Data is reaching the limit. Please change sohusin.post.max_vars and sohusin.request.max_vars (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved."; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index d1d6d49248..e2de871633 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -502,9 +502,10 @@ $lang->pager->previousPage = "上一页"; $lang->pager->nextPage = "下一页"; $lang->pager->summery = "第 %s-%s 项,共 %s 项"; -$lang->proVersion = "专业版   "; -$lang->downNotify = "下载桌面提醒"; -$lang->website = "https://www.zentao.net"; +$lang->proVersion = "专业版   "; +$lang->downNotify = "下载桌面提醒"; +$lang->downloadClient = "下载客户端"; +$lang->website = "https://www.zentao.net"; $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改sohusin.post.max_vars和sohusin.request.max_vars(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。"; $lang->maxVarsInfo = "警告:数据太多,请在php.ini中修改max_input_vars(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。"; diff --git a/module/common/model.php b/module/common/model.php index d5d87aa2e6..11e8685c23 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -167,7 +167,7 @@ class commonModel extends model if($this->loadModel('user')->isLogon() or ($this->app->company->guest and $this->app->user->account == 'guest')) { if(stripos($method, 'ajax') !== false) return true; - if(stripos($method, 'downnotify') !== false) return true; + if(stripos($method, 'downloadClient') !== false) return true; if($module == 'block' and $method == 'main') return true; if($module == 'misc' and $method == 'changelog') return true; if($module == 'tutorial') return true; @@ -689,6 +689,19 @@ class commonModel extends model } } + /** + * Print the link for zentao client. + * + * @static + * @access public + * @return void + */ + public static function printClientLink() + { + global $lang; + echo html::a(helper::createLink('misc', 'downloadClient'), "", '', "title='$lang->downloadClient' class='text-primary iframe' data-width='400'") . '   '; + } + /** * Print QR code Link. * diff --git a/module/common/view/footer.html.php b/module/common/view/footer.html.php index c47776420f..3f8a1bae88 100755 --- a/module/common/view/footer.html.php +++ b/module/common/view/footer.html.php @@ -13,7 +13,7 @@ designedByAIUX;?>   zentaoPMS . $config->version;?>   proVersion;?> - +