Skip to content

Commit

Permalink
Merge pull request Room-11#5 from J0celyn/master
Browse files Browse the repository at this point in the history
Sort list of questions
  • Loading branch information
gooh committed May 9, 2013
2 parents 37065f5 + fd20e1c commit 30f194a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/app/mvc/view/BacklogView.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,26 @@ public function renderBacklog()
*/
protected function createXhtmlItemList(\DOMDocument $dom)
{
$ul = $dom->createElement('ul');
$delvs = $cvs = array();

foreach ($this->backlog as $item) {
$ul->appendChild($dom->createElement('li'))
->appendChild($dom->createElement('a', $item->title))
$li = $dom->createElement('li');
$li->appendChild($dom->createElement('a', $item->title))
->setAttribute('class', isset($item->closed_date) ? 'delv' : 'cv')
->parentNode
->setAttribute('href', $item->link)
->parentNode
->setAttribute('title', $item->title);
if(isset($item->closed_date))
$delvs[] = $li;
else
$cvs[] = $li;
}
$ul = $dom->createElement('ul');
foreach($cvs as $li)
$ul->appendChild($li);
foreach($delvs as $li)
$ul->appendChild($li);
return $ul;
}

Expand Down

0 comments on commit 30f194a

Please sign in to comment.