* improve dashboard UI.

This commit is contained in:
Catouse
2016-04-13 17:42:21 +08:00
parent 5a837ca15c
commit 27ed67331e
15 changed files with 162 additions and 153 deletions
+39 -36
View File
@@ -27,18 +27,16 @@ class block extends control
/**
* Block admin.
*
* @param int $index
* @param int $id
* @param string $module
* @access public
* @return void
*/
public function admin($index = 0, $module = 'my')
public function admin($id = 0, $module = 'my')
{
$this->session->set('blockModule', $module);
$title = $index == 0 ? $this->lang->block->createBlock : $this->lang->block->editBlock;
if(!$index) $index = $this->block->getLastKey($module) + 1;
$title = $id == 0 ? $this->lang->block->createBlock : $this->lang->block->editBlock;
if($module == 'my')
{
@@ -61,11 +59,11 @@ class block extends control
elseif(isset($this->lang->block->moduleList[$module]))
{
$this->get->set('mode', 'getblocklist');
$this->view->blocks = $this->fetch('block', 'main', "module=$module&index=$index");
$this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id");
}
$this->view->block = $this->block->getBlock($index);
$this->view->index = $index;
$this->view->block = $this->block->getBlock($id);
$this->view->blockID = $id;
$this->view->title = $title;
$this->display();
}
@@ -73,22 +71,22 @@ class block extends control
/**
* Set params when type is rss or html.
*
* @param int $index
* @param int $id
* @param string $type
* @access public
* @return void
*/
public function set($index, $type, $source = '')
public function set($id, $type, $source = '')
{
if($_POST)
{
$source = isset($this->lang->block->moduleList[$source]) ? $source : '';
$this->block->save($index, $source, $type, $this->session->blockModule);
$this->block->save($id, $source, $type, $this->session->blockModule);
if(dao::isError()) die(js::error(dao::geterror()));
die(js::reload('parent'));
}
$block = $this->block->getBlock($index);
$block = $this->block->getBlock($id);
if($block) $type = $block->block;
if(isset($this->lang->block->moduleList[$source]))
@@ -100,7 +98,7 @@ class block extends control
$this->view->source = $source;
$this->view->type = $type;
$this->view->index = $index;
$this->view->id = $id;
$this->view->block = ($block) ? $block : array();
$this->display();
}
@@ -108,21 +106,21 @@ class block extends control
/**
* Delete block
*
* @param int $index
* @param int $id
* @param string $sys
* @param string $type
* @access public
* @return void
*/
public function delete($index, $module = 'my', $type = 'delete')
public function delete($id, $module = 'my', $type = 'delete')
{
if($type == 'hidden')
{
$this->dao->update(TABLE_BLOCK)->set('hidden')->eq(1)->where('`order`')->eq($index)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
$this->dao->update(TABLE_BLOCK)->set('hidden')->eq(1)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
}
else
{
$this->dao->delete()->from(TABLE_BLOCK)->where('`order`')->eq($index)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
$this->dao->delete()->from(TABLE_BLOCK)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
}
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success'));
@@ -137,18 +135,17 @@ class block extends control
* @access public
* @return void
*/
public function sort($oldOrder, $newOrder, $module = 'my')
public function sort($orders, $module = 'my')
{
$oldOrder = explode(',', $oldOrder);
$newOrder = explode(',', $newOrder);
$orderList = $this->block->getBlockList($module);
foreach($oldOrder as $key => $oldIndex)
$orders = explode(',', $orders);
$blockList = $this->block->getBlockList($module);
foreach ($orders as $order => $blockID)
{
if(!isset($orderList[$oldIndex])) continue;
$order = $orderList[$oldIndex];
$order->order = $newOrder[$key];
$this->dao->replace(TABLE_BLOCK)->data($order)->exec();
$block = $blockList[$blockID];
if(!isset($block)) continue;
$block->order = $order;
$this->dao->replace(TABLE_BLOCK)->data($block)->exec();
}
if(dao::isError()) $this->send(array('result' => 'fail'));
@@ -175,20 +172,26 @@ class block extends control
foreach($blocks as $block)
{
$params = json_decode($block->params);
$block->params = json_decode($block->params);
$blockID = $block->block;
$block->blockLink = $this->createLink('block', 'printBlock', "index=$block->order&module=$block->module");
$block->blockLink = $this->createLink('block', 'printBlock', "id=$block->id&module=$block->module");
$block->moreLink = '';
if(isset($this->lang->block->modules[$module]->moreLinkList->{$blockID}))
{
list($moduleName, $method, $vars) = explode('|', sprintf($this->lang->block->modules[$module]->moreLinkList->{$blockID}, $params->type));
list($moduleName, $method, $vars) = explode('|', sprintf($this->lang->block->modules[$module]->moreLinkList->{$blockID}, $block->params->type));
$block->moreLink = $this->createLink($moduleName, $method, $vars);
}
}
$this->view->blocks = $blocks;
$this->view->module = $module;
if($this->app->getViewType() == 'json')
{
die(json_encode($blocks));
}
$this->display();
}
@@ -208,13 +211,13 @@ class block extends control
/**
* Print block.
*
* @param int $index
* @param int $id
* @access public
* @return void
*/
public function printBlock($index, $module = 'my')
public function printBlock($id, $module = 'my')
{
$block = $this->block->getBlock($index, $module);
$block = $this->block->getBlock($id, $module);
if(empty($block)) return false;
@@ -230,7 +233,7 @@ class block extends control
$this->get->set('source', $block->source);
$this->get->set('blockid', $block->block);
$this->get->set('param',base64_encode(json_encode($block->params)));
$html = $this->fetch('block', 'main', "module={$block->source}&index=$index");
$html = $this->fetch('block', 'main', "module={$block->source}&id=$id");
}
elseif($block->block == 'dynamic')
{
@@ -246,7 +249,7 @@ class block extends control
* @access public
* @return void
*/
public function main($module = '', $index = 0)
public function main($module = '', $id = 0)
{
if(!$this->selfCall)
{
@@ -269,7 +272,7 @@ class block extends control
$blocks = json_decode($blocks, true);
$blockPairs = array('' => '') + $blocks;
$block = $this->block->getBlock($index);
$block = $this->block->getBlock($id);
echo "<th>{$this->lang->block->lblBlock}</th>";
echo '<td>' . html::select('moduleBlock', $blockPairs, ($block and $block->source != '') ? $block->block : '', "class='form-control' onchange='getBlockParams(this.value, \"$module\")'") . '</td>';
+76 -4
View File
@@ -2,10 +2,82 @@ body {background: #fafafa;}
.page-content {margin-top: -19px; border-top: 1px solid #3280fc;}
.dashboard {position: relative; padding-top: 25px; z-index: 1030}
.dashboard {position: relative;}
.dashboard .row {margin: 0 auto;}
.dashboard .panel-actions {margin-top: 0; margin-right: 0;}
.dashboard-actions {position: absolute; top: -35px; right: 100px}
.dashboard-actions .btn {padding: 5px 12px}
.dashboard .table tr[data-url] td {cursor: pointer;}
.dashboard .panel-heading {height: 30px}
.dashboard .panel-heading {line-height: 17px; height: 30px; position: relative;}
.dashboard .panel-actions {position: absolute; top: 0; right: 0; height: 30px;}
.dashboard .panel-action {display: block; float: left; height: 30px; width: 26px; text-align: center; line-height: 30px;}
.dashboard .panel-action:hover, .dashboard .panel-actions > .dropdown > a:hover {color: #333; background-color: #ddd; background-color: rgba(0,0,0,0.1)}
.dashboard .panel-title {font-size: 13px; color: #333}
.dashboard a.panel-title:hover {color: #1a53ff}
.dashboard .panel {box-shadow: none}
.outer > .dashboard {margin-left: -10px; margin-right: -10px;}
/* panel style */
.panel-block .table th {background-color: #fafafa}
.panel-primary {border-color: transparent;!important;}
.panel-success > .panel-heading,
.panel-warning > .panel-heading,
.panel-primary > .panel-heading,
.panel-info > .panel-heading,
.panel-danger > .panel-heading {color: #333; border: none; border-bottom: 1px solid rgba(0,0,0,.04);}
.panel-success > .panel-body,
.panel-warning > .panel-body,
.panel-primary > .panel-body,
.panel-info > .panel-body,
.panel-danger > .panel-body {box-shadow: inset 0 1px 100px rgba(255,255,255,.6);}
.panel-success {background: #d1fecb!important; border-color: #b0e4ac!important}
.panel-success > .panel-heading {background: #c5f7c1!important; }
.panel-warning {background: #fdfdc7!important; border-color: #e1e09a!important}
.panel-warning > .panel-heading {background: #f8f7b6!important;}
.panel-primary {background: #d8f2fa!important; border-color: #badfeb!important}
.panel-primary > .panel-heading {background: #c9ecf8!important; color: #333!important; border:none!important;}
.panel-info {background: #dcd8fe!important; border-color: #d0c9ee!important}
.panel-info > .panel-heading {background: #d4cdf3!important;}
.panel-danger {background: #f5d0f5!important; border-color: #e9b9e9!important}
.panel-danger > .panel-heading {background: #f1c3f1!important;}
.panel-success .table td, .panel-success .table th,
.panel-warning .table td, .panel-warning .table th,
.panel-primary .table td, .panel-primary .table th,
.panel-info .table td, .panel-info .table th,
.panel-danger .table td, .panel-danger .table th {border: none; background-color: transparent}
.panel-success .table tr:nth-child(even) > td, .panel-success .table th,
.panel-warning .table tr:nth-child(even) > td, .panel-warning .table th,
.panel-primary .table tr:nth-child(even) > td, .panel-primary .table th,
.panel-info .table tr:nth-child(even) > td, .panel-info .table th,
.panel-danger .table tr:nth-child(even) > td, .panel-danger .table th {background: rgba(255,255,255,.25);}
.panel-success .table tr:nth-child(odd) > td,
.panel-warning .table tr:nth-child(odd) > td,
.panel-primary .table tr:nth-child(odd) > td,
.panel-info .table tr:nth-child(odd) > td,
.panel-danger .table tr:nth-child(odd) > td {background: rgba(0,0,0,.03);}
.panel-success .table tr:last-child > td,
.panel-warning .table tr:last-child > td,
.panel-primary .table tr:last-child > td,
.panel-info .table tr:last-child > td
.panel-danger .table tr:last-child > td {border-bottom: 1px solid rgba(0,0,0,0.05)}
.panel-success .table tr:hover > th,
.panel-warning .table tr:hover > th,
.panel-primary .table tr:hover > th,
.panel-info .table tr:hover > th,
.panel-danger .table tr:hover > th {background: none;}
.panel-success .table.table-hover tr:hover > td,
.panel-warning .table.table-hover tr:hover > td,
.panel-primary .table.table-hover tr:hover > td,
.panel-info .table.table-hover tr:hover > td,
.panel-danger .table.table-hover tr:hover > td {background: rgba(255,255,255,.4);}
.block.input-group-btn .btn-success {background: #d1fecb; color: #333; text-shadow: none; border-color: #ccc}
.block.input-group-btn .btn-warning {background: #fdfdc7; color: #333; text-shadow: none; border-color: #ccc}
.block.input-group-btn .btn-info {background: #dcd8fe; color: #333; text-shadow: none; border-color: #ccc}
.block.input-group-btn .btn-danger {background: #f5d0f5; color: #333; text-shadow: none; border-color: #ccc}
.block.input-group-btn .btn-primary, .block.input-group-btn .btn-primary:focus {background: #d8f2fa; color: #333; text-shadow: none; border-color: #ccc}
.block.input-group-btn .btn-success:hover {border-color: #aaa}
.block.input-group-btn .btn-warning:hover {border-color: #aaa}
.block.input-group-btn .btn-primary:hover {border-color: #aaa}
.block.input-group-btn .btn-info:hover {border-color: #aaa}
.block.input-group-btn .btn-danger:hover {border-color: #aaa}
.block.input-group-btn .btn-primary .caret, .block.input-group-btn .btn-success .caret, .block.input-group-btn .btn-warning .caret, .block.input-group-btn .btn-danger .caret, .block.input-group-btn .btn-info .caret {border-top-color: #333}
+5 -3
View File
@@ -7,6 +7,7 @@
*/
function getBlocks(moduleID)
{
console.log('getBlocks', moduleID);
var moduleBlock = $('#modules').parent().parent().next();
$(moduleBlock).hide();
@@ -24,8 +25,9 @@ function getBlocks(moduleID)
return true;
}
$.get(createLink('block', 'main', 'module=' + moduleID + '&index=' + index), {mode:'getblocklist'}, function(data)
$.get(createLink('block', 'main', 'module=' + moduleID + '&id=' + blockID), {mode:'getblocklist'}, function(data)
{
console.log('GET BLOCKS', moduleID, data);
$(moduleBlock).html(data);
$(moduleBlock).show();
})
@@ -40,7 +42,7 @@ function getBlocks(moduleID)
*/
function getRssAndHtmlParams(type)
{
$.get(createLink('block', 'set', 'index=' + index + '&type=' + type), function(data)
$.get(createLink('block', 'set', 'id=' + blockID + '&type=' + type), function(data)
{
$('#blockParam').html(data);
});
@@ -57,7 +59,7 @@ function getRssAndHtmlParams(type)
function getBlockParams(type, moduleID)
{
$('#blockParam').empty();
$.get(createLink('block', 'set', 'index=' + index + '&type=' + type + '&source=' + moduleID), function(data)
$.get(createLink('block', 'set', 'id=' + blockID + '&type=' + type + '&source=' + moduleID), function(data)
{
$('#blockParam').html(data);
});
+10 -21
View File
@@ -1,6 +1,6 @@
$(function()
{
$('#dashboard').dashboard(
var $dashboard = $('#dashboard').dashboard(
{
height : 240,
draggable : true,
@@ -10,6 +10,8 @@ $(function()
sensitive : true,
panelRemovingTip : config.confirmRemoveBlock
});
$dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
});
/**
@@ -40,27 +42,14 @@ function deleteBlock(index)
*/
function sortBlocks(orders)
{
var oldOrder = new Array();
var newOrder = new Array();
for(i in orders)
{
oldOrder.push(i.replace('block', ''));
newOrder.push(orders[i]);
}
$.getJSON(createLink('block', 'sort', 'oldOrder=' + oldOrder.join(',') + '&newOrder=' + newOrder.join(',') + '&module=' + module), function(data)
var ordersMap = [];
$.each(orders, function(blockId, order) {ordersMap.push({id: blockId, order: order});});
ordersMap.sort(function(a, b) {return a.order - b.order;});
var newOrders = $.map(ordersMap, function(order, idx) {return order.id});
$.getJSON(createLink('block', 'sort', 'orders=' + newOrders.join(',') + '&module=' + module), function(data)
{
if(data.result != 'success') return false;
$('#dashboard .panel').each(function()
{
var index = $(this).data('order');
/* Update new index for block id edit and delete. */
$(this).attr('id', 'block' + index).attr('data-id', index).data('url', createLink('block', 'printBlock', 'index=' + index));
$(this).find('.panel-actions .edit-block').attr('href', createLink('block', 'admin', 'index=' + index));
});
$.zui.messager.success(config.ordersSaved);
if(data.result == 'success') $.zui.messager.success(config.ordersSaved);
});
}
+9 -8
View File
@@ -21,11 +21,12 @@ class blockModel extends model
* @access public
* @return void
*/
public function save($index, $source, $type, $module = 'my')
public function save($id, $source, $type, $module = 'my')
{
$data = fixer::input('post')
->add('account', $this->app->user->account)
->add('order', $index)
->setIF($id, 'id', $id)
->setIF(!$id, 'order', $this->getLastKey($module) + 1)
->add('module', $module)
->add('hidden', 0)
->setDefault('grid', '4')
@@ -60,14 +61,14 @@ class blockModel extends model
/**
* Get saved block config.
*
* @param int $index
* @param int $id
* @access public
* @return object
*/
public function getBlock($index, $module = 'my')
public function getBlock($id, $module = 'my')
{
$block = $this->dao->select('*')->from(TABLE_BLOCK)
->where('`order`')->eq($index)
->where('`id`')->eq($id)
->andWhere('account')->eq($this->app->user->account)
->andWhere('module')->eq($module)
->fetch();
@@ -87,13 +88,13 @@ class blockModel extends model
*/
public function getLastKey($module = 'my')
{
$index = $this->dao->select('`order`')->from(TABLE_BLOCK)
$order = $this->dao->select('`order`')->from(TABLE_BLOCK)
->where('module')->eq($module)
->andWhere('account')->eq($this->app->user->account)
->orderBy('order desc')
->limit(1)
->fetch('order');
return $index ? $index : 0;
return $order ? $order : 0;
}
/**
@@ -109,7 +110,7 @@ class blockModel extends model
->andWhere('module')->eq($module)
->andWhere('hidden')->eq(0)
->orderBy('`order`')
->fetchAll('order');
->fetchAll('id');
return $blocks;
}
+3 -3
View File
@@ -10,7 +10,7 @@
* @link http://www.ranzhico.com
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php if(isset($pageCSS)) css::internal($pageCSS); ?>
<table class='table table-form'>
<tr><th class='w-100px'></th><td></td></tr>
<?php if(!empty($modules)):?>
@@ -26,5 +26,5 @@
<tr><?php if(!empty($blocks)) echo $blocks;?></tr>
</table>
<div id='blockParam'></div>
<?php js::set('index', $index)?>
<?php include '../../common/view/footer.lite.html.php';?>
<?php js::set('blockID', $blockID)?>
<?php if(isset($pageJS)) js::execute($pageJS);?>
+10 -7
View File
@@ -16,30 +16,33 @@ $themeRoot = $webRoot . "theme/";
if(isset($pageCSS)) css::internal($pageCSS);
?>
<div class='dashboard dashboard-draggable' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<ul class='dashboard-actions hide'><li><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='600'><i class='icon icon-list-alt'></i> <?php echo $lang->block->createBlock?></a></li></ul>
<div class='row'>
<?php foreach($blocks as $index => $block):?>
<div class='col-sm-6 col-md-<?php echo $block->grid;?>'>
<div class='panel <?php if(isset($block->params->color)) echo 'panel-' . $block->params->color;?>' id='block<?php echo $index?>' data-id='<?php echo $index?>' data-name='<?php echo $block->title?>' data-url='<?php echo $block->blockLink?>'>
<div class='panel panel-block <?php if(isset($block->params->color)) echo 'panel-' . $block->params->color;?>' id='block<?php echo $block->id?>' data-id='<?php echo $block->id?>' data-name='<?php echo $block->title?>' data-url='<?php echo $block->blockLink?>'>
<div class='panel-heading'>
<div class='panel-actions'>
<?php if(isset($block->moreLink)) echo html::a($block->moreLink, $lang->more . "<i class='icon-double-angle-right'></i>", "class='app-btn'");?>
<button class='btn btn-mini refresh-panel'><i class='icon-repeat'></i></button>
<a href='javascript:;' class='refresh-panel panel-action'><i class='icon-repeat'></i></a>
<div class='dropdown'>
<button class='btn btn-mini' data-toggle='dropdown'><span class='caret'></span></button>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
<ul class='dropdown-menu pull-right'>
<li><a data-toggle='modal' href="<?php echo $this->createLink("block", "admin", "index=$index&module=$module"); ?>" class='edit-block' data-title='<?php echo $block->title; ?>' data-icon='icon-pencil'><i class='icon-pencil'></i> <?php echo $lang->edit; ?></a></li>
<li><a data-toggle='modal' href="<?php echo $this->createLink("block", "admin", "id=$block->id&module=$module"); ?>" class='edit-block' data-title='<?php echo $block->title; ?>' data-icon='icon-pencil'><i class='icon-pencil'></i> <?php echo $lang->edit; ?></a></li>
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->delete; ?></a></li>
</ul>
</div>
</div>
<?php echo $block->title;?>
<?php if(isset($block->moreLink)):?>
<?php echo html::a($block->moreLink, $block->title . " <i class='icon-double-angle-right'></i>", null, "class='panel-title drag-disabled' title='$lang->more'"); ?>
<?php else: ?>
<span class='panel-title'><?php echo $block->title;?></span>
<?php endif; ?>
</div>
<div class='panel-body no-padding'></div>
</div>
</div>
<?php endforeach;?>
</div>
<div class='dashboard-actions'><a class='btn btn-primary' href='<?php echo $this->createLink("block", "admin", "index=0&module=$module"); ?>' data-toggle='modal'><i class='icon-plus'></i> <?php echo $lang->block->createBlock?></a></div>
</div>
<script>
config.ordersSaved = '<?php echo $lang->block->ordersSaved; ?>';
+2 -2
View File
@@ -10,10 +10,10 @@
* @link http://www.zentao.net
*/
?>
<table class='table table-data table-condensed table-hover table-striped table-fixed block-product'>
<table class='table table-data table-hover table-fixed table-striped table-borderless block-product'>
<thead>
<tr class='text-center'>
<th class='text-left'><i class="icon icon-cube"></i> <?php echo $lang->product->name;?></th>
<th class='text-left'><?php echo $lang->product->name;?></th>
<th width='35' title='<?php echo $lang->story->common;?>'><?php echo $lang->story->statusList['active'];?></th>
<th width='45' title='<?php echo $lang->story->common;?>'><?php echo $lang->story->statusList['changed'];?></th>
<th width='35' title='<?php echo $lang->story->common;?>'><?php echo $lang->story->statusList['draft'];?></th>
+1 -1
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<table class='table table-data table-condensed table-hover table-striped table-fixed block-project'>
<table class='table table-data table-hover table-striped table-fixed block-project'>
<thead>
<tr class='text-center'>
<th><div class='text-left'><i class="icon-folder-close-alt icon"></i> <?php echo $lang->project->name;?></div></th>
+1 -1
View File
@@ -27,7 +27,7 @@
<?php echo $lang->block->color;?> <span class='caret'></span>
</button>
<?php echo html::hidden('params[color]', isset($block->params->color) ? $block->params->color : 'default');?>
<div class='dropdown-menu buttons'>
<div class='dropdown-menu buttons pull-right'>
<li><button type='button' data-id='default' class='btn btn-block btn-default'>&nbsp;</li>
<li><button type='button' data-id='primary' class='btn btn-block btn-primary'>&nbsp;</li>
<li><button type='button' data-id='warning' class='btn btn-block btn-warning'>&nbsp;</li>
+1 -1
View File
@@ -24,7 +24,7 @@ if($type == 'html')
include '../../common/view/kindeditor.html.php';
}
?>
<form method='post' id='blockForm' target='hiddenwin' class='form form-horizontal' action='<?php echo $this->createLink('block', 'set', "index=$index&type=$type&source=$source")?>'>
<form method='post' id='blockForm' target='hiddenwin' class='form form-horizontal' action='<?php echo $this->createLink('block', 'set', "id=$id&type=$type&source=$source")?>'>
<table class='table table-form'>
<tbody>
<?php include 'publicform.html.php';?>
+1 -2
View File
@@ -14,9 +14,8 @@
$webRoot = $config->webRoot;
$jsRoot = $webRoot . "js/";
$themeRoot = $webRoot . "theme/";
include "../../common/view/chosen.html.php";
?>
<form method='post' id='blockForm' target='hiddenwin' class='form form-horizontal' action='<?php echo $this->createLink('block', 'set', "index=$index&type=$type&source=$source")?>'>
<form method='post' id='blockForm' target='hiddenwin' class='form form-horizontal' action='<?php echo $this->createLink('block', 'set', "id=$id&type=$type&source=$source")?>'>
<table class='table table-form'>
<tbody>
<?php include './publicform.html.php'?>
+1 -1
View File
@@ -7,7 +7,7 @@
<?php echo html::a($this->createLink('project', 'create'), "<i class='icon-plus'></i> " . $lang->my->home->createProject,'', "class='btn btn-primary'");?> &nbsp; &nbsp; <?php echo " <i class='icon-question-sign text-muted'></i> " . $lang->my->home->help; ?>
</div>
<?php else:?>
<table class='table table-condensed table-hover table-striped table-borderless table-fixed'>
<table class='table table-hover table-striped table-borderless table-fixed'>
<thead>
<tr class='text-center'>
<th class='w-200px'><div class='text-left'><i class="icon-folder-close-alt icon"></i> <?php echo $lang->project->name;?></div></th>
+1 -63
View File
@@ -12,67 +12,5 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sparkline.html.php';?>
<?php css::import($defaultTheme . 'index.css', $config->version);?>
<div class='dashboard' id='myDashboard'></div>
<script>
$(function()
{
$('#myDashboard').dashboard(
{
draggable: true,
data:
[
// Test block config data, like
// {
// id: block id
// colWidth: grid width
// url: the url to get block content
// content: default content
// }
{id: 1, colWidth: 6, content: "<div class='panel-heading'>Panel 1</div><div class='panel-body'><h1>block 1</h1></div>"},
{id: 2, colWidth: 3, content: "<div class='panel-heading'>Panel 2</div><div class='panel-body'><h1>block 2</h1></div>"},
{id: 3, colWidth: 3, content: "<div class='panel-heading'>Panel 3</div><div class='panel-body'><h1>block 3</h1></div>"},
{id: 4, colWidth: 4, content: "<div class='panel-heading'>Panel 4</div><div class='panel-body'><h1>block 4</h1></div>"},
{id: 5, colWidth: 8, content: "<div class='panel-heading'>Panel 5</div><div class='panel-body'><h1>block 5</h1></div>"},
]
});
});
</script>
<div class="row">
<div class="col-md-8">
<?php include './blockprojects.html.php';?>
<?php include './blockproducts.html.php';?>
</div>
<div class="col-md-4">
<?php if(common::hasPriv('company', 'dynamic')) include './blockdynamic.html.php';?>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6">
<?php include './blocktodoes.html.php';?>
</div>
<?php if($app->user->role and strpos('qa|qd', $app->user->role) !== false):?>
<div class="col-md-4 col-sm-6">
<?php include './blockbugs.html.php';?>
</div>
<div class="col-md-4 col-sm-6">
<?php include './blocktasks.html.php';?>
</div>
<?php elseif($app->user->role and strpos('po|pd', $app->user->role) !== false):?>
<div class="col-md-4 col-sm-6">
<?php include './blockstories.html.php';?>
</div>
<div class="col-md-4 col-sm-6">
<?php include './blockbugs.html.php';?>
</div>
<?php else:?>
<div class="col-md-4 col-sm-6">
<?php include './blocktasks.html.php';?>
</div>
<div class="col-md-4 col-sm-6">
<?php include './blockbugs.html.php';?>
</div>
<?php endif;?>
</div>
<?php echo $this->fetch('block', 'dashboard', 'module=my');?>
<?php include '../../common/view/footer.html.php';?>
+2
View File
@@ -10,4 +10,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php echo $this->fetch('block', 'dashboard', 'module=project');?>
<?php include '../../common/view/footer.html.php';?>