* change style for mobile.

This commit is contained in:
wangyidong
2013-06-21 08:59:35 +00:00
parent 6735e05438
commit 13c28ff95e
5 changed files with 103 additions and 44 deletions
+29 -8
View File
@@ -20,12 +20,33 @@
</ul>
</div>
</div>
<ul data-role='listview'>
<?php foreach($stories as $story):?>
<li><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), "#$story->id $story->title")?></li>
<?php endforeach;?>
</ul>
<p>
<?php $pager->show('right', 'short')?>
</p>
<?php foreach($stories as $story):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<h1><?php echo $story->title;?></h1>
<div>
<p><strong><?php echo $lang->story->spec?><strong></p>
<?php echo $story->spec?>
</div>
<div>
<p><strong><?php echo $lang->story->verify?><strong></p>
<?php echo $story->verify?>
</div>
<div data-role='navbar'>
<ul>
<?php
if(!$story->deleted)
{
common::printIcon('story', 'review', "storyID=$story->id", $story);
common::printIcon('story', 'close', "storyID=$story->id", $story, '', '', '', 'iframe', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, '', '', '', 'iframe', true);
common::printIcon('story', 'delete', "storyID=$story->id", '', '', '', 'hiddenwin');
}
?>
</ul>
</div>
</div>
</div>
<?php endforeach;?>
<p><?php $pager->show('right', 'short')?></p>
<?php include '../../common/view/m.footer.html.php';?>
+20 -5
View File
@@ -20,10 +20,25 @@
</ul>
</div>
</div>
<ul data-role='listview'>
<?php foreach($tasks as $task):?>
<li><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name)?></li>
<?php endforeach;?>
</ul>
<?php foreach($tasks as $task):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<h1><?php echo $task->name;?></h1>
<div><?php echo $task->desc;?></div>
<div data-role='navbar'>
<ul>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task);
common::printIcon('task', 'start', "taskID=$task->id", $task);
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task);
common::printIcon('task', 'finish', "taskID=$task->id", $task);
common::printIcon('task', 'close', "taskID=$task->id", $task);
common::printIcon('task', 'activate', "taskID=$task->id", $task);
?>
</ul>
</div>
</div>
</div>
<?php endforeach;?>
<p><?php $pager->show('right', 'short')?></p>
<?php include '../../common/view/m.footer.html.php';?>
+22 -23
View File
@@ -20,29 +20,28 @@
</ul>
</div>
</div>
<ul data-role='listview'>
<?php foreach($todos as $todo):?>
<li>
<?php echo html::a($this->createLink('todo', 'view', "todoID=$todo->id&from=my"), '#' . $todo->id . ' ' . $todo->name)?>
<span class='ui-li-count'>
<?php
if($todo->status == 'done')
{
echo $lang->todo->finish;
}
elseif(empty($todo->begin))
{
echo $lang->todo->lblDisableDate;
}
else
{
echo $todo->begin . ' ~ ' . $todo->end;
}
?>
</span>
</li>
<?php endforeach;?>
</ul>
<?php foreach($todos as $todo):?>
<?php if(!$todo->private or ($todo->private and $todo->account == $app->user->account)):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<h1><?php echo $todo->name;?></h1>
<div><?php echo $todo->desc;?></div>
<div data-role='navbar'>
<ul>
<?php
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin');
if($todo->account == $app->user->account)
{
common::printIcon('todo', 'edit', "todoID=$todo->id");
common::printIcon('todo', 'delete', "todoID=$todo->id", '', 'button', '', 'hiddenwin');
}
?>
</ul>
</div>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
<p><?php echo $pager->show('right', 'short')?></p>
<div data-role='footer' data-position='fixed'>
<div data-role='navbar'>
+26 -6
View File
@@ -12,14 +12,34 @@
?>
<?php include '../../common/view/m.header.html.php';?>
</div>
<ul data-role='listview'>
<?php foreach($stories as $story):?>
<?php if($story->status == 'closed') continue;?>
<li>
<?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), "#$story->id $story->title")?>
<span class='ui-li-count'><?php echo $lang->story->statusList[$story->status]?></span>
</li>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<h1><?php echo $story->title;?></h1>
<div>
<p><strong><?php echo $lang->story->spec?><strong></p>
<?php echo $story->spec?>
</div>
<div>
<p><strong><?php echo $lang->story->verify?><strong></p>
<?php echo $story->verify?>
</div>
<div data-role='navbar'>
<ul>
<?php
if(!$story->deleted)
{
common::printIcon('story', 'review', "storyID=$story->id", $story);
common::printIcon('story', 'close', "storyID=$story->id", $story, '', '', '', 'iframe', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, '', '', '', 'iframe', true);
common::printIcon('story', 'delete', "storyID=$story->id", '', '', '', 'hiddenwin');
}
?>
</ul>
</div>
</div>
</div>
<?php endforeach;?>
</ul>
<p><?php $pager->show('right', 'short')?></p>
<?php include '../../common/view/m.footer.html.php';?>
+6 -2
View File
@@ -708,13 +708,15 @@ class storyModel extends model
*/
public function getProductStories($productID = 0, $moduleIds = 0, $status = 'all', $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.title as planTitle')
return $this->dao->select('t1.*, t2.title as planTitle, t3.verify, t3.spec')
->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
->leftJoin(TABLE_STORYSPEC)->alias('t3')->on('t1.id = t3.story')
->where('t1.product')->in($productID)
->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi()
->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
->andWhere('t1.deleted')->eq(0)
->andWhere('t3.version=t1.version')
->orderBy($orderBy)->page($pager)->fetchAll();
}
@@ -1025,15 +1027,17 @@ class storyModel extends model
*/
public function getUserStories($account, $type = 'assignedTo', $orderBy = 'id_desc', $pager = null)
{
$stories = $this->dao->select('t1.*, t2.title as planTitle, t3.name as productTitle')
$stories = $this->dao->select('t1.*, t2.title as planTitle, t3.name as productTitle, t4.spec, t4.verify')
->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->leftJoin(TABLE_STORYSPEC)->alias('t4')->on('t1.id = t4.story')
->where('t1.deleted')->eq(0)
->beginIF($type == 'assignedTo')->andWhere('assignedTo')->eq($account)->fi()
->beginIF($type == 'openedBy')->andWhere('openedBy')->eq($account)->fi()
->beginIF($type == 'reviewedBy')->andWhere('reviewedBy')->like('%' . $account . '%')->fi()
->beginIF($type == 'closedBy')->andWhere('closedBy')->eq($account)->fi()
->andWhere('t4.version=t1.version')
->orderBy($orderBy)
->page($pager)
->fetchAll();