* adjust for doc.
This commit is contained in:
@@ -226,6 +226,11 @@ INSERT INTO `zt_productplan` (`id`, `product`, `title`, `desc`, `begin`, `end`,
|
||||
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
|
||||
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
|
||||
|
||||
INSERT INTO `zt_doclib` (`id`, `product`, `project`, `name`, `acl`, `main`) VALUES(1, 1, 0, '公司企业网站建设', 'open','1');
|
||||
INSERT INTO `zt_doclib` (`id`, `product`, `project`, `name`, `acl`, `main`) VALUES(2, 2, 0, '企业内部工时管理系统', 'open', '1');
|
||||
INSERT INTO `zt_doclib` (`id`, `product`, `project`, `name`, `acl`, `main`) VALUES(3, 0, 1, '企业网站第一期', 'open', '1');
|
||||
INSERT INTO `zt_doclib` (`id`, `product`, `project`, `name`, `acl`, `main`) VALUES(4, 0, 2, '企业网站第二期', 'open', '1');
|
||||
|
||||
INSERT INTO `zt_projectproduct` (`project`, `product`) VALUES(1, 1);
|
||||
INSERT INTO `zt_projectproduct` (`project`, `product`) VALUES(2, 1);
|
||||
|
||||
|
||||
@@ -21,3 +21,4 @@ ADD `users` text NOT NULL AFTER `groups`;
|
||||
ALTER TABLE `zt_doclib` ADD `acl` varchar(10) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'open' AFTER `name`;
|
||||
ALTER TABLE `zt_doc` ADD `acl` varchar(10) NOT NULL DEFAULT 'open' AFTER `editedDate`;
|
||||
ALTER TABLE `zt_doclib` ADD `main` enum('0','1') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `users`;
|
||||
UPDATE `zt_doc` SET `type` = 'text' WHERE `type` = 'file';
|
||||
|
||||
@@ -324,6 +324,7 @@ class doc extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode');
|
||||
$this->view->crumb = $this->doc->getCrumbs($libID, $moduleID, $docID = 0, $this->from);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -378,6 +379,7 @@ class doc extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode');
|
||||
$this->view->crumb = $this->doc->getCrumbs($libID, $doc->module, $docID = 0, $this->from);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -752,7 +754,7 @@ class doc extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $from;
|
||||
$this->view->libs = $this->doc->getLibByObject($type, $objectID);
|
||||
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
.libs-group-heading {color: #808080; border-bottom:1px solid #ddd; padding:8px; text-align:center; background:#DDF3F5}
|
||||
.libs-group-heading a{display:block;width:100%;height:100%;}
|
||||
.libs-group-heading a{display:block;width:100%;height:100%; overflow: hidden; white-space: nowrap;}
|
||||
.libs-group{padding:10px 10px 10px 10px;}
|
||||
.lib {float: left; display: block; width:80px; padding: 5px; margin:0px 3px; text-align: center; color: #333; overflow: hidden; text-overflow: ellipsis;}
|
||||
.lib .file-icon{font-size:30px;}
|
||||
.lib .lib-name{height: 2em; line-height: 14px; overflow: hidden;}
|
||||
.lib:hover, .lib:focus, .lib:active {border-color: #2e6dad; background-color: #EBF2F9; color: #2e6dad}
|
||||
.crumb{margin-right:10px;}
|
||||
#titlebar > .heading > strong > i{display:inline;}
|
||||
|
||||
#modulemenu .nav > li > .dropdown > a#libType{display:inline-block;}
|
||||
#modulemenu .nav > li > .dropdown.open > a#libType{background:#e5e5e5;}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.lib-heading{border-right:1px solid #ddd;}
|
||||
#libs table td.row{padding:0px;}
|
||||
#libs table td.none{border-right:0px}
|
||||
#libs table td.lib-more{border-left:1px solid #ddd;}
|
||||
#libs table td.lib-more a.more{display:block;width:100%;height:100%}
|
||||
.table.project,.table.product{border:0px;}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
.lib-file .card-heading > .icon-download {opacity: .5; position: relative; top: 2px}
|
||||
.lib-file .card-heading {color: #114f8e}
|
||||
.lib-file .card-heading:hover {background-color: #EBF2F9; color: #2e6dad}
|
||||
.lib-file .card-heading > .delete {opacity: 0; margin-top:-1px; margin-right:5px}
|
||||
.lib-file .card-heading > .delete {opacity: 0.2; margin-top:-1px; margin-right:5px}
|
||||
.lib-file .card-heading > .delete .icon{font-size:16px;}
|
||||
.lib-file .card-heading:hover > .delete{opacity:1}
|
||||
.lib-file .media-wrapper > .icon-holder {font-size: 105px; opacity: 1; color: rgba(255,255,255,.7); opacity: .6}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#titlebar > .heading > strong.crumb > i.icon-angle-right{display:inline;}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$(function()
|
||||
{
|
||||
toggleAcl($('#acl').val());
|
||||
toggleAcl($('input[name="acl"]:checked').val());
|
||||
$('input[name="type"]').change(function()
|
||||
{
|
||||
var type = $(this).val();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
toggleAcl($('input[name="acl"]:checked').val());
|
||||
})
|
||||
@@ -39,6 +39,8 @@ $lang->doc->moduleDoc = 'By module';
|
||||
$lang->doc->searchDoc = 'By search';
|
||||
$lang->doc->allDoc = 'All doc';
|
||||
$lang->doc->openedByMe = 'Added by me';
|
||||
$lang->doc->orderByOpen = 'Last added';
|
||||
$lang->doc->orderByEdit = 'Last edited';
|
||||
|
||||
/* Actions. */
|
||||
$lang->doc->index = 'Index';
|
||||
@@ -49,6 +51,8 @@ $lang->doc->browse = 'Browse doc';
|
||||
$lang->doc->view = 'View doc';
|
||||
$lang->doc->diff = 'Diff';
|
||||
$lang->doc->manageType = 'Manage type';
|
||||
$lang->doc->editType = 'Edit type';
|
||||
$lang->doc->deleteType = 'Delete type';
|
||||
$lang->doc->addType = 'Add type';
|
||||
|
||||
$lang->doc->libName = 'Library name';
|
||||
|
||||
@@ -755,7 +755,7 @@ class docModel extends model
|
||||
*/
|
||||
public function getLibsByObject($type, $objectID, $mode = '')
|
||||
{
|
||||
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('id desc')->fetchAll('id');
|
||||
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('id')->fetchAll('id');
|
||||
if($type == 'product')
|
||||
{
|
||||
$hasProject = $this->dao->select('DISTINCT product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
@@ -1096,7 +1096,7 @@ class docModel extends model
|
||||
$objectName = $this->dao->select('name')->from($table)->where('id')->eq($lib->$type)->fetch('name');
|
||||
}
|
||||
$crumb = '';
|
||||
if($objectName) $crumb .= $objectName . $this->lang->arrow;
|
||||
if($objectName) $crumb .= html::a(helper::createLink('doc', 'objectLibs', "type=$type&objectID={$lib->$type}&from=$from"), $objectName) . $this->lang->arrow;
|
||||
$crumb .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=$from"), $lib->name);
|
||||
foreach($parents as $module) $crumb .= $this->lang->arrow . html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m=$module->id&orderBy=id_desc&from=$from"), $module->name);
|
||||
if($doc) $crumb .= $this->lang->arrow . $doc->title;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php if(isset($subLibs[$lib->id])): ?>
|
||||
<?php if($i % 3 == 0) echo "<tr>"?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-<?php echo $type?>-heading'><strong><?php echo html::a(inlink('objectLibs', "type=$type&objectID=$lib->id&from=doc"), $lib->name)?></strong></div>
|
||||
<div class='libs-group-heading libs-<?php echo $type?>-heading'><strong><?php echo html::a(inlink('objectLibs', "type=$type&objectID=$lib->id&from=doc"), $lib->name, '', "title='{$lib->name}'")?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs[$lib->id] as $subLibID => $subLibName):?>
|
||||
<?php
|
||||
|
||||
@@ -15,9 +15,12 @@
|
||||
#filesPanel .file-icon {display: block; height: 60px; text-align: center; line-height: 60px; font-size: 50px; opacity: .7}
|
||||
#filesPanel .file:hover .file-icon {opacity: 1}
|
||||
#filesPanel .file-name {text-align: center; height: 2em; line-height: 14px; overflow: hidden;}
|
||||
#filesPanel .file > .actions {position: absolute; bottom: -30px; left: -1px; right: -1px; background-color: #333; background-color: rgba(0,0,0,.5); margin: 0; opacity: 0; transition: opacity .2s;}
|
||||
#filesPanel .file:hover > .actions {opacity: 1}
|
||||
#filesPanel .file > .actions > a {line-height: 30px; display: inline-block; padding: 0 8px; color: #fff;}
|
||||
#filesPanel .file.create {height:88px;}
|
||||
#filesPanel .file.create a{height:100%;}
|
||||
#filesPanel .file.create .file-icon {height:100%; opacity: 0.5; color:#ddd;}
|
||||
#filesPanel .file.create .icon-plus {font-size: 18px; display: block; text-align: center; position: absolute; top: 0; right: 0; left: 0; bottom: 0; line-height: 60px; opacity: 0.5; transition: opacity .2s; text-shadow: 1px 1px 3px rgba(0,0,0,.2);}
|
||||
#filesPanel .file.create:hover .icon-plus {opacity: .9; animation: flash-icon 1s linear alternate infinite}
|
||||
#filesPanel .file.create:hover .file-icon {opacity: .9; animation: flash-icon 1s linear alternate infinite}
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<div class='crumb pull-left'><i class='icon icon-tags'></i> <?php echo $crumb;?></div>
|
||||
@@ -68,6 +71,12 @@
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<div class='file file-dir create'>
|
||||
<a href='<?php echo $this->createLink('tree', 'browse', "rootID=$libID&view=doc&moduleID=$moduleID")?>' title='<?php echo $lang->doc->addType?>'>
|
||||
<i class='file-icon icon icon-folder-close-alt'></i>
|
||||
<i class='icon icon-plus'></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php foreach($docs as $doc):?>
|
||||
<div class='file'>
|
||||
<a href='<?php echo inlink('view', "docID=$doc->id")?>'>
|
||||
@@ -76,6 +85,12 @@
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<div class='file create'>
|
||||
<a href='<?php echo inlink('create', "libID=$libID&moduleID=$moduleID")?>' title='<?php echo $lang->doc->create?>'>
|
||||
<i class='file-icon icon icon-file'></i>
|
||||
<i class='icon icon-plus'></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($docs):?>
|
||||
<div class='panel-footer'><?php $pager->show();?></div>
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['doc']);?></span>
|
||||
<strong><small class='text-muted'><i class='icon icon-plus'></i></small> <?php echo $lang->doc->create;?></strong>
|
||||
<strong><i class='icon icon-tags'></i> <?php echo $crumb . $lang->arrow . $lang->doc->create;?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['doc']);?> <strong><?php echo $doc->id;?></strong></span>
|
||||
<strong><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title);?></strong>
|
||||
<strong><?php echo $crumb . $lang->arrow . html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title);?></strong>
|
||||
<small class='text-muted'> <?php echo html::icon($lang->icons['edit']) . ' ' . $lang->doc->edit;?></small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
<tr id='contentBox' <?php if($doc->type == 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('content', htmlspecialchars($doc->content), "style='width:100%; height:200px'") . html::hidden('contentType', $doc->contentType);?></td>
|
||||
<td colspan='2'><?php echo html::textarea('content', $doc->type == 'url' ? '' : htmlspecialchars($doc->content), "style='width:100%; height:200px'") . html::hidden('contentType', $doc->contentType);?></td>
|
||||
</tr>
|
||||
<tr id='urlBox' <?php if($doc->type != 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script language='Javascript'>
|
||||
$(document).ready(function()
|
||||
<style>
|
||||
#modulemenu .nav > li > .dropdown > a#libType {display: inline-block;}
|
||||
</style>
|
||||
<?php $crumbs = $this->doc->getCrumbs($rootID, $currentModuleID, $docID = 0, $this->cookie->from)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$(".right a").modalTrigger({width:500, height:200, type:'iframe'}); // The create lib link.
|
||||
$("#modulemenu a:contains('<?php echo $lang->doc->editLib;?>')").modalTrigger({width:500, height:200, type:'iframe'}); // The edit lib link.
|
||||
});
|
||||
$('#featurebar .heading').prepend("<i class='icon icon-tags'></i> " + <?php echo json_encode($crumbs)?> + <?php echo json_encode($lang->arrow)?>);
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<?php if(isset($subLibs['product'][$product->id])):?>
|
||||
<?php if($i % 3 == 0) echo '<tr>'?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-product-heading'><strong><?php echo html::a(inlink('objectLibs', "type=product&objectID=$product->id&from=doc"), $product->name)?></strong></div>
|
||||
<div class='libs-group-heading libs-product-heading'><strong><?php echo html::a(inlink('objectLibs', "type=product&objectID=$product->id&from=doc"), $product->name, '', "title='{$product->name}'")?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs['product'][$product->id] as $libID => $libName):?>
|
||||
<?php
|
||||
@@ -68,7 +68,7 @@
|
||||
<?php if(isset($subLibs['project'][$project->id])):?>
|
||||
<?php if($i % 3 == 0) echo '<tr>'?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-project-heading'><strong><?php echo html::a(inlink('objectLibs', "type=project&objectID=$project->id&from=doc"), $project->name)?></strong></div>
|
||||
<div class='libs-group-heading libs-project-heading'><strong><?php echo html::a(inlink('objectLibs', "type=project&objectID=$project->id&from=doc"), $project->name, '', "title='{$project->name}'")?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs['project'][$project->id] as $libID => $libName):?>
|
||||
<?php
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
</div>
|
||||
<div id='libs'>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($libs as $libID => $lib):?>
|
||||
<?php foreach($libs as $libID => $libName):?>
|
||||
<?php
|
||||
if($libID == 'project' and $from != 'doc') continue;
|
||||
|
||||
$libLink = inlink('browse', "libID=$lib->id&browseType=all¶m=0&orderBy=id_desc&from=$from");
|
||||
if($libID == 'project') $libLink = inlink('allLibs', "type=project&extra=product=$lib->id");
|
||||
if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$lib->id");
|
||||
$libLink = inlink('browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=$from");
|
||||
if($libID == 'project') $libLink = inlink('allLibs', "type=project&extra=product=$object->id");
|
||||
if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$object->id");
|
||||
?>
|
||||
<a class='lib' title='<?php echo $lib->name?>' href='<?php echo $libLink?>'>
|
||||
<a class='lib' title='<?php echo $libName?>' href='<?php echo $libLink?>'>
|
||||
<i class='file-icon icon icon-folder-close-alt'></i>
|
||||
<div class='lib-name' title='<?php echo $lib->name?>'><?php echo $lib->name?></div>
|
||||
<div class='lib-name' title='<?php echo $libName?>'><?php echo $libName?></div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<strong><?php echo $object->name . ': ' . $lang->doclib->files?></strong>
|
||||
<strong><?php echo html::a(inlink('objectLibs', "type=$type&objectID={$object->id}&from={$this->from}"), $object->name) . $lang->arrow . $lang->doclib->files?></strong>
|
||||
<div class='actions'><?php echo html::backButton();?></div>
|
||||
</div>
|
||||
<div class='lib-files cards'>
|
||||
|
||||
@@ -149,7 +149,7 @@ class upgradeModel extends model
|
||||
case '8_2_4':
|
||||
case '8_2_5':
|
||||
case '8_2_6':
|
||||
$this->execSQL($this->getUpgradeFile('8.2.1'));
|
||||
$this->execSQL($this->getUpgradeFile('8.2.6'));
|
||||
$this->adjustDocModule();
|
||||
$this->moveDocContent();
|
||||
$this->adjustPriv8_3();
|
||||
|
||||
Reference in New Issue
Block a user