* code for task#1620.

This commit is contained in:
xia0ta0
2013-08-02 14:56:47 +08:00
parent 26a8572bde
commit df4c2a15c3
3 changed files with 52 additions and 59 deletions
-2
View File
@@ -1,2 +0,0 @@
.todoheader {margin-bottom:5px;}
.todoheader .active{color:#009900; font-weight:bold;}
+41 -46
View File
@@ -13,52 +13,47 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php include './featurebar.html.php';?>
<table class='cont-lt1 fixed'>
<tr valign='top'>
<td class='side'>
<div class='box-title'><?php echo $lang->user->dynamic;?></div>
<div class='box-content'>
<?php
echo html::a(inLink('dynamic', "period=today&account=$account"), $lang->action->dynamic->today) . '<br />';
echo html::a(inLink('dynamic', "period=yesterday&account=$account"), $lang->action->dynamic->yesterday) . '<br />';
echo html::a(inLink('dynamic', "period=twodaysago&account=$account"), $lang->action->dynamic->twoDaysAgo) . '<br />';
echo html::a(inLink('dynamic', "period=thisweek&account=$account"), $lang->action->dynamic->thisWeek) . '<br />';
echo html::a(inLink('dynamic', "period=lastweek&account=$account"), $lang->action->dynamic->lastWeek) . '<br />';
echo html::a(inLink('dynamic', "period=thismonth&account=$account"), $lang->action->dynamic->thisMonth) . '<br />';
echo html::a(inLink('dynamic', "period=lastmonth&account=$account"), $lang->action->dynamic->lastMonth) . '<br />';
echo html::a(inLink('dynamic', "period=all&account=$account"), $lang->action->dynamic->all) . '<br />';
?>
</div>
</td>
<td class='divider'></td>
<td>
<table class='table-1 colored tablesorter'>
<thead>
<tr class='colhead'>
<th class='w-150px'><?php echo $lang->action->date;?></th>
<th class='w-user'> <?php echo $lang->action->actor;?></th>
<th class='w-100px'><?php echo $lang->action->action;?></th>
<th class='w-80px'> <?php echo $lang->action->objectType;?></th>
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th><?php echo $lang->action->objectName;?></th>
</tr>
</thead>
<tbody>
<?php foreach($actions as $action):?>
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
<tr class='a-center'>
<td><?php echo $action->date;?></td>
<td><?php echo $users[$action->actor];?></td>
<td><?php echo $action->actionLabel;?></td>
<td><?php echo $lang->action->objectTypes[$action->objectType];?></td>
<td><?php echo $action->objectID;?></td>
<td class='a-left'><?php echo html::a($action->objectLink, $action->objectName);?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='6'><?php $pager->show();?></td></tr></tfoot>
</table>
</td>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='today'>" . html::a(inLink('dynamic', "period=today&account=$account"), $lang->action->dynamic->today) . '</span>';
echo "<span id='yesterday'>" . html::a(inLink('dynamic', "period=yesterday&account=$account"), $lang->action->dynamic->yesterday) . '</span>';
echo "<span id='twodaysago'>" . html::a(inLink('dynamic', "period=twodaysago&account=$account"), $lang->action->dynamic->twoDaysAgo) . '</span>';
echo "<span id='thisweek'>" . html::a(inLink('dynamic', "period=thisweek&account=$account"), $lang->action->dynamic->thisWeek) . '</span>';
echo "<span id='lastweek'>" . html::a(inLink('dynamic', "period=lastweek&account=$account"), $lang->action->dynamic->lastWeek) . '</span>';
echo "<span id='thismonth'>" . html::a(inLink('dynamic', "period=thismonth&account=$account"), $lang->action->dynamic->thisMonth) . '</span>';
echo "<span id='lastmonth'>" . html::a(inLink('dynamic', "period=lastmonth&account=$account"), $lang->action->dynamic->lastMonth) . '</span>';
echo "<span id='all'>" . html::a(inLink('dynamic', "period=all&account=$account"), $lang->action->dynamic->all) . '</span>';
?>
</div>
</div>
<table class='table-1 colored tablesorter'>
<thead>
<tr class='colhead'>
<th class='w-150px'><?php echo $lang->action->date;?></th>
<th class='w-user'> <?php echo $lang->action->actor;?></th>
<th class='w-100px'><?php echo $lang->action->action;?></th>
<th class='w-80px'> <?php echo $lang->action->objectType;?></th>
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th><?php echo $lang->action->objectName;?></th>
</tr>
</thead>
<tbody>
<?php foreach($actions as $action):?>
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
<tr class='a-center'>
<td><?php echo $action->date;?></td>
<td><?php echo $users[$action->actor];?></td>
<td><?php echo $action->actionLabel;?></td>
<td><?php echo $lang->action->objectTypes[$action->objectType];?></td>
<td><?php echo $action->objectID;?></td>
<td class='a-left'><?php echo html::a($action->objectLink, $action->objectName);?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='6'><?php $pager->show();?></td></tr></tfoot>
</table>
<script type='text/javascript'>
$(function(){$('#<?php echo $period?>').addClass('active');})
</script>
<?php include '../../common/view/footer.html.php';?>
+11 -11
View File
@@ -14,15 +14,17 @@
<?php include "../../common/view/datepicker.html.php"; ?>
<?php include './featurebar.html.php';?>
<script language='Javascript'>var account='<?php echo $account;?>'</script>
<div class='todoheader'>
<div id='featurebar'>
<div class='f-left'>
<?php
foreach($lang->todo->periods as $period => $label)
{
$vars = "account={$account}&date=$period";
if($period == 'before') $vars .= "&status=undone";
echo "<span id='$period'>" . html::a(inlink('todo', $vars), $label) . '</span> ';
}
?>
foreach($lang->todo->periods as $period => $label)
{
$vars = "account={$account}&date=$period";
if($period == 'before') $vars .= "&status=undone";
echo "<span id='$period'>" . html::a(inlink('todo', $vars), $label) . '</span> ';
}
?>
</div>
</div>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'import2Today');?>' id='todoform'>
<table class='table-1 tablesorter'>
@@ -57,8 +59,6 @@
</table>
</form>
<script type='text/javascript'>
$(function(){
$('#<?php echo $type?>').find('a').addClass('active');
})
$(function(){$('#<?php echo $type?>').addClass('active');})
</script>
<?php include '../../common/view/footer.html.php';?>