Skip to content

Commit

Permalink
Merge pull request #214 from humhub/enh/210-print-assigned-users
Browse files Browse the repository at this point in the history
Print assigned users on wall stream
  • Loading branch information
luke- authored Nov 23, 2022
2 parents 51e1ee1 + ee4aed2 commit 9d65f72
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.7.1 (Unreleased)
-------------------------------
- Enh #210: Print assigned users on wall stream


1.7.0-beta.1 (November 7, 2022)
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Tasks",
"description": "Simple taskmanager for your spaces.",
"keywords": ["task", "todo"],
"version": "1.7.0-beta.1",
"version": "1.7.1",
"homepage": "https://github.com/humhub/tasks",
"humhub": {
"minVersion": "1.13"
Expand Down
22 changes: 12 additions & 10 deletions widgets/TaskRoleInfoBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ public function getTitle()

public function getValue()
{
if ( $this->task->isTaskResponsible()) {
return Icon::get('check')->color($this->view->theme->variable('success')).' '.Yii::t('TasksModule.base', 'You are responsible!');
} else if($this->task->isTaskAssigned()) {
return Icon::get('check')->color($this->view->theme->variable('success')).' '.Yii::t('TasksModule.base', 'You are assigned!');
} else if($this->task->canProcess()) {
if ($this->task->hasTaskAssigned()) {
return TaskUserList::widget(['users' => $this->task->taskAssignedUsers]);
}

if ($this->task->isTaskResponsible()) {
return Icon::get('check')->color($this->view->theme->variable('success')).' '.Yii::t('TasksModule.base', 'You are responsible!');
} else if($this->task->isTaskAssigned()) {
return Icon::get('check')->color($this->view->theme->variable('success')).' '.Yii::t('TasksModule.base', 'You are assigned!');
} else if($this->task->canProcess()) {
return Icon::get('times')->color($this->view->theme->variable('danger')).' '.Yii::t('TasksModule.base', 'Anyone can work on this task!');
} else {
return Icon::get('times')->color($this->view->theme->variable('danger')).' '.Yii::t('TasksModule.base', 'This task can only be processed by assigned and responsible users.');
}
} else {
return Icon::get('times')->color($this->view->theme->variable('danger')).' '.Yii::t('TasksModule.base', 'This task can only be processed by assigned and responsible users.');
}
}


}

0 comments on commit 9d65f72

Please sign in to comment.