From df6fc83c2e45eaa51c98b213eebd73dbd8e8b251 Mon Sep 17 00:00:00 2001 From: Catouse Date: Mon, 4 Aug 2014 17:12:28 +0800 Subject: [PATCH] * ajusted style of module extension and upgrade. --- module/extension/lang/en.php | 2 +- module/extension/lang/zh-cn.php | 2 +- module/extension/view/activate.html.php | 2 - module/extension/view/browse.html.php | 91 +++++++++++------------ module/extension/view/deactivate.html.php | 2 - module/extension/view/install.html.php | 8 +- module/upgrade/view/index.html.php | 2 +- 7 files changed, 50 insertions(+), 59 deletions(-) diff --git a/module/extension/lang/en.php b/module/extension/lang/en.php index b874a7243d..818c655782 100644 --- a/module/extension/lang/en.php +++ b/module/extension/lang/en.php @@ -93,7 +93,7 @@ $lang->extension->errorGetModules = "Get extensions' categories dat $lang->extension->errorGetExtensions = 'Get extensions from www.zentao.net failed. You can visit www.zentao.net to find your extensions, download it manually and then upload to zentaopms to install it.'; $lang->extension->errorDownloadPathNotFound = 'The save path of package file %sdoes not exists.
For linux users, can execute mkdir -p %s to fix it.'; $lang->extension->errorDownloadPathNotWritable = 'The save path of package file %sis not writable.
For linux users, can execute sudo chmod 777 %s to fix it.'; -$lang->extension->errorPackageFileExists = 'There is already a file with the same name %s.

If you want to %s again, please click this link.

'; +$lang->extension->errorPackageFileExists = 'There is already a file with the same name %s.
If you want to %s again, please click this link.
'; $lang->extension->errorDownloadFailed = 'Download failed, please try again. Or you can download it manually and upload it to install.'; $lang->extension->errorMd5Checking = 'The downloawd files checking failed, Please download it manually and upload it to install'; $lang->extension->errorExtracted = 'The package file %s extracted failed. The error is:
%s'; diff --git a/module/extension/lang/zh-cn.php b/module/extension/lang/zh-cn.php index 0029f66c92..e8f3ac55b0 100644 --- a/module/extension/lang/zh-cn.php +++ b/module/extension/lang/zh-cn.php @@ -93,7 +93,7 @@ $lang->extension->errorGetModules = '从www.zentao.net获得插件 $lang->extension->errorGetExtensions = '从www.zentao.net获得插件失败。可能是因为网络方面的原因,您可以到 www.zentao.net 手工下载插件,然后上传安装。'; $lang->extension->errorDownloadPathNotFound = '插件下载存储路径%s不存在。
linux下面请执行命令:mkdir -p %s来修正。'; $lang->extension->errorDownloadPathNotWritable = '插件下载存储路径%s不可写。
linux下面请执行命令:sudo chmod 777 %s来修正。'; -$lang->extension->errorPackageFileExists = '下载路径已经有一个名为的%s附件。

重新%s,请点击此链接

'; +$lang->extension->errorPackageFileExists = '下载路径已经有一个名为的%s附件。
重新%s,请点击此链接
'; $lang->extension->errorDownloadFailed = '下载失败,请重新下载。如果多次重试还不行,请尝试手工下载,然后通过上传功能上传。'; $lang->extension->errorMd5Checking = '下载文件不完整,请重新下载。如果多次重试还不行,请尝试手工下载,然后通过上传功能上传。'; $lang->extension->errorExtracted = '包文件 %s 解压缩失败,可能不是一个有效的zip文件。错误信息如下:
%s'; diff --git a/module/extension/view/activate.html.php b/module/extension/view/activate.html.php index 7cb06d7629..6f66850b5d 100644 --- a/module/extension/view/activate.html.php +++ b/module/extension/view/activate.html.php @@ -14,8 +14,6 @@
icons['extension']);?> - - extension->activate;?> icons['activate']);?>
diff --git a/module/extension/view/browse.html.php b/module/extension/view/browse.html.php index 02a759dca2..80c9a469f8 100644 --- a/module/extension/view/browse.html.php +++ b/module/extension/view/browse.html.php @@ -11,56 +11,51 @@ */ ?> -
-
- -
-
name;?>
-
desc;?>
-
-
-
- code"), $lang->extension->structure, '', "class='btn iframe'"); - $deactivateCode = html::a(inlink('deactivate', "extension=$extension->code"), $lang->extension->deactivate, '', "class='btn iframe'"); - $activateCode = html::a(inlink('activate', "extension=$extension->code"), $lang->extension->activate, '', "class='btn iframe'"); - $uninstallCode = html::a(inlink('uninstall', "extension=$extension->code"), $lang->extension->uninstall, '', "class='btn iframe'"); - $installCode = html::a(inlink('install', "extension=$extension->code"), $lang->extension->install, '', "class='btn iframe'"); - $eraseCode = html::a(inlink('erase', "extension=$extension->code"), $lang->extension->erase, '', "class='btn iframe'"); - - if(isset($extension->viewLink)) - { - echo html::a($extension->viewLink, $lang->extension->view, '', "class='btn extension'"); - } - if($extension->status == 'installed') - { - echo $structureCode; - } - if($extension->status == 'installed' and !empty($extension->upgradeLink)) - { - echo html::a($extension->upgradeLink, $lang->extension->upgrade, '', "class='btn iframe'"); - } - - if($extension->type != 'patch') - { - if($extension->status == 'installed') echo $deactivateCode . $uninstallCode; - if($extension->status == 'deactivated') echo $activateCode . $uninstallCode; - if($extension->status == 'available') echo $installCode . $eraseCode; - } - echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn'); - ?> -
-
+
+ +
+
name;?>
+
desc;?>
+
+
+
extension->version}: {$extension->version} "; - echo "{$lang->extension->author}: {$extension->author} "; - ?> + $structureCode = html::a(inlink('structure', "extension=$extension->code"), $lang->extension->structure, '', "class='btn iframe'"); + $deactivateCode = html::a(inlink('deactivate', "extension=$extension->code"), $lang->extension->deactivate, '', "class='btn iframe'"); + $activateCode = html::a(inlink('activate', "extension=$extension->code"), $lang->extension->activate, '', "class='btn iframe'"); + $uninstallCode = html::a(inlink('uninstall', "extension=$extension->code"), $lang->extension->uninstall, '', "class='btn iframe'"); + $installCode = html::a(inlink('install', "extension=$extension->code"), $lang->extension->install, '', "class='btn iframe'"); + $eraseCode = html::a(inlink('erase', "extension=$extension->code"), $lang->extension->erase, '', "class='btn iframe'"); + + if(isset($extension->viewLink)) + { + echo html::a($extension->viewLink, $lang->extension->view, '', "class='btn extension'"); + } + if($extension->status == 'installed') + { + echo $structureCode; + } + if($extension->status == 'installed' and !empty($extension->upgradeLink)) + { + echo html::a($extension->upgradeLink, $lang->extension->upgrade, '', "class='btn iframe'"); + } + + if($extension->type != 'patch') + { + if($extension->status == 'installed') echo $deactivateCode . $uninstallCode; + if($extension->status == 'deactivated') echo $activateCode . $uninstallCode; + if($extension->status == 'available') echo $installCode . $eraseCode; + } + echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn'); + ?>
-
- +
+ extension->version}: {$extension->version} "; + echo "{$lang->extension->author}: {$extension->author} "; + ?>
+
+
- - - diff --git a/module/extension/view/deactivate.html.php b/module/extension/view/deactivate.html.php index 13d0f34b6f..9ae75e164d 100644 --- a/module/extension/view/deactivate.html.php +++ b/module/extension/view/deactivate.html.php @@ -14,8 +14,6 @@
icons['extension']);?> - - extension->deactivate;?> icons['activate']);?>
diff --git a/module/extension/view/install.html.php b/module/extension/view/install.html.php index 3da5077276..375d3fbe7c 100644 --- a/module/extension/view/install.html.php +++ b/module/extension/view/install.html.php @@ -24,7 +24,7 @@
-

extension->installFailed, $installType);?>

+
extension->installFailed, $installType);?>


extension->refreshPage, 'onclick=location.href=location.href');?> @@ -32,14 +32,14 @@
-

extension->license;?>

-

+
extension->license;?>
+

extension->agreeLicense, '', "class='btn btn-primary'");?>
-

extension->installFinished, $installType);?>

+
extension->installFinished, $installType);?>
extension->viewInstalled, 'onclick=parent.location.href="' . inlink('browse') . '" class="btn btn-success"');?>
diff --git a/module/upgrade/view/index.html.php b/module/upgrade/view/index.html.php index 7324f6f969..26df211080 100644 --- a/module/upgrade/view/index.html.php +++ b/module/upgrade/view/index.html.php @@ -16,7 +16,7 @@ upgrade->warnning;?>