Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,29 @@ function getMethods() {
/**
* Returns the column header for the Pagelist Plugin
*/
function th() {
function th($column=NULL, &$class=NULL) {
if ($column == 'prioritytxt' || $column == 'priorityimg') {
$class .= 'priority priority'.$task['priority'];
return $this->getLang('priority');
}
return $this->getLang('status');
}

/**
* Returns the status of the task
*/
function td($id) {
function td($id, $column=NULL, &$class=NULL) {
$task = $this->readTask($id);
if ($column == 'prioritytxt' || $column == 'priorityimg') {
$content = '';
$class .= 'priority priority'.$task['priority'];
if ($column == 'prioritytxt') {
$content = $this->priorityLabel($task['priority']);
} else if ($column == 'priorityimg') {
$class .= ' image';
}
return $content;
}
return $this->statusLabel($task['status']);
}

Expand Down
Binary file added images/prio_critical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/prio_high.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/prio_medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,35 @@ div.dokuwiki form#task__changeview_form input.button {
margin: 0;
}

div.dokuwiki th.priority,
div.dokuwiki td.priority,
div.dokuwiki th.status,
div.dokuwiki td.status {
color: __text_neu__;
font-size: 80%;
}

div.dokuwiki td.priority.image {
background-repeat: no-repeat;
background-position: 50% 50%;
}
div.dokuwiki td.priority3 {
color: #ff0000;
font-weight: bold;
}
div.dokuwiki td.priority2 {
color: #FFD700;
font-weight: bold;
}
div.dokuwiki td.priority1 {
font-weight: bold;
}
div.dokuwiki td.priority3.image {
background-image: url(images/prio_critical.png);
}
div.dokuwiki td.priority2.image {
background-image: url(images/prio_high.png);
}
div.dokuwiki td.priority1.image {
background-image: url(images/prio_medium.png);
}
24 changes: 19 additions & 5 deletions syntax/tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,27 @@ function render($mode, Doku_Renderer $renderer, $data) {
if ($select) $renderer->doc .= $this->_viewMenu($filter);

// prepare pagelist columns
$pagelist->header['page'] = $this->getLang('task');
$pagelist->header['date'] = str_replace(' ', ' ', $this->getLang('date'));
$pagelist->header['user'] = str_replace(' ', ' ', $this->getLang('user'));
$pagelist->column['date'] = $this->getConf('datefield');
$pagelist->column['user'] = true;
if (method_exists ($pagelist, 'setHeaderTitle')) {
$pagelist->setHeaderTitle('page', $this->getLang('task'));
$pagelist->setHeaderTitle('date', str_replace(' ', ' ', $this->getLang('date')));
$pagelist->setHeaderTitle('user', str_replace(' ', ' ', $this->getLang('user')));
$pagelist->setColumn('date', $this->getConf('datefield'));
$pagelist->setColumn('user', true);
} else {
$pagelist->header['page'] = $this->getLang('task');
$pagelist->header['date'] = str_replace(' ', ' ', $this->getLang('date'));
$pagelist->header['user'] = str_replace(' ', ' ', $this->getLang('user'));
$pagelist->column['date'] = $this->getConf('datefield');
$pagelist->column['user'] = true;
}
$pagelist->setFlags($flags);
$pagelist->addColumn('task', 'status');
if(in_array('prioritytxt', $flags)) {
$pagelist->addColumn('task', 'prioritytxt');
}
if(in_array('priorityimg', $flags)) {
$pagelist->addColumn('task', 'priorityimg');
}

// output list
$pagelist->startList();
Expand Down