Skip to content

Commit

Permalink
allow specification of additional css classes to style output
Browse files Browse the repository at this point in the history
darcs-hash:20090210150848-23886-70bfac2e3164f99f4babd74bc926f9aba504cad3.gz
  • Loading branch information
Michael Klier committed Feb 10, 2009
1 parent ef9678f commit 0b3b535
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,15 @@ function addPage($page) {
$this->_meta = NULL;

// priority and draft
if (!isset($this->page['draft']))
if (!isset($this->page['draft'])) {
$this->page['draft'] = ($this->_getMeta('type') == 'draft');
if (isset($this->page['priority']))
$class = ' class="priority'.$this->page['priority'].'"';
elseif ($this->page['draft'])
$class = ' class="draft"';
else
$class = '';
}
$class = '';
if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
if ($this->page['draft']) $class .= 'draft ';
if ($this->page['class']) $class .= $this->page['class'];
if(!empty($class)) $class = ' class="' . $class . '"';

$this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;

$this->_pageCell($id);
Expand Down

0 comments on commit 0b3b535

Please sign in to comment.