* adjust the extension structure page.

This commit is contained in:
wangchunsheng
2012-02-21 06:13:56 +00:00
parent 6ebdf7e5cd
commit 1e90550230
4 changed files with 16 additions and 31 deletions
+1 -1
View File
@@ -374,7 +374,7 @@ class extension extends control
*/
public function structure($extension)
{
$this->view->structures = $this->extension->structure($extension);
$this->view->extension = $this->extension->getInfoFromDB($extension);
$this->display();
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
if($('a.iframe').size()) $("a.iframe").colorbox({width:800, height:400, iframe:true, transition:'elastic', speed:350, scrolling:true});
if($('a.manual').size()) $("a.manual").colorbox({width:1024, height:600, iframe:true, transition:'elastic', speed:350, scrolling:false});
if($('a.extension').size()) $("a.extension").colorbox({width:1024, height:480, iframe:true, transition:'elastic', speed:350, scrolling:true});
if($('a.extension').size()) $("a.extension").colorbox({width:600, height:320, iframe:true, transition:'elastic', speed:350, scrolling:true});
-24
View File
@@ -751,28 +751,4 @@ class extensionModel extends model
}
return $this->dao->update(TABLE_EXTENSION)->data($data)->where('code')->eq($extension)->exec();
}
/**
* Get the structure of extension.
*
* @param int $extension
* @access public
* @return void
*/
public function structure($extension)
{
$extension = $this->getInfoFromDB($extension);
$files = json_decode($extension->files);
$appRoot = $this->app->getAppRoot();
$structures = array();
foreach($files as $struct => $value)
{
$structures[] = $appRoot . $struct;
}
$structures['name'] = $extension->name;
$structures['code'] = $extension->code;
return $structures;
}
}
+14 -5
View File
@@ -10,8 +10,17 @@
* @link http://www.zentao.net
*/
?>
<?php echo $structures['name'] . '[' . $structures['code'] . '] ' .$lang->extension->structure . ':';?> <br /><br />
<?php unset($structures['name']); unset($structures['code']);?>
<?php foreach($structures as $structure):?>
<?php echo $structure;?> <br />
<?php endforeach;?>
<?php include '../../common/view/header.lite.html.php';?>
<table class='table-1'>
<caption><?php echo $extension->name . '[' . $extension->code . '] ' .$lang->extension->structure . ':';?></cation>
<tr>
<td>
<?php
$appRoot = $this->app->getAppRoot();
$files = json_decode($extension->files);
foreach($files as $file => $md5) echo $appRoot . $file . "<br />";
?>
</td>
</tr>
</table>
<?php include '../../common/view/footer.lite.html.php';?>