Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/js-fixes' into fix/fixik
Browse files Browse the repository at this point in the history
# Conflicts:
#	widgets/TaskHeader.php
  • Loading branch information
gevorgmansuryan committed Nov 26, 2024
2 parents 5592fa2 + ccf15c9 commit e524e06
Show file tree
Hide file tree
Showing 66 changed files with 116 additions and 0 deletions.
1 change: 1 addition & 0 deletions CalendarUtils.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions Events.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions controllers/ConfigContainerController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2023 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions controllers/GlobalController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Created by PhpStorm.
* User: kingb
Expand Down
1 change: 1 addition & 0 deletions controllers/ListController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions controllers/SearchController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions controllers/rest/TaskListController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2019 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions controllers/rest/TasksController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2019 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions helpers/RestDefinitions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2019 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions integration/calendar/TaskCalendar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions integration/calendar/TaskCalendarQuery.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions jobs/SendReminder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/Sortable.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Created by PhpStorm.
* User: buddha
Expand Down
1 change: 1 addition & 0 deletions models/Task.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/checklist/TaskItem.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/forms/ConfigureContainerForm.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2023 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/forms/ItemDrop.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/forms/TaskFilter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/lists/TaskList.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/lists/TaskListInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Created by PhpStorm.
* User: buddha
Expand Down
1 change: 1 addition & 0 deletions models/lists/TaskListSettings.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/scheduling/TaskReminder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/scheduling/TaskScheduling.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/search/TaskPicker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions models/user/TaskUser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/_support/AcceptanceTester.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/_support/FunctionalTester.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/_support/UnitTester.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/acceptance/TaskListCest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/acceptance/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Initialize the HumHub Application for functional testing. The default application configuration for this suite can be overwritten
* in @tests/config/functional.php
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/api/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Initialize the HumHub Application for functional testing. The default application configuration for this suite can be overwritten
* in @tests/config/functional.php
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/functional/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Initialize the HumHub Application for functional testing. The default application configuration for this suite can be overwritten
* in @tests/config/functional.php
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/unit/TaskNotificationTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/unit/TaskQueryTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/unit/TaskSortTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/unit/TaskStateTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/unit/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Initialize the HumHub Application for functional testing. The default application configuration for this suite can be overwritten
* in @tests/config/functional.php
Expand Down
1 change: 1 addition & 0 deletions tests/config/api.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Here you can overwrite your functional humhub config. The default config resiedes in @humhubTests/codeception/config/config.php
*/
Expand Down
1 change: 1 addition & 0 deletions tests/config/common.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This config is shared by all suites (unit/functional/acceptance) and can be overwritten by a suite config (e.g. functional.php)
*/
Expand Down
1 change: 1 addition & 0 deletions tests/config/functional.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Here you can overwrite the default config for the functional suite. The default config resides in @humhubTests/codeception/config/config.php
*/
Expand Down
1 change: 1 addition & 0 deletions tests/config/test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions tests/config/unit.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Here you can overwrite your functional humhub config. The default config resiedes in @humhubTests/codeception/config/config.php
*/
Expand Down
1 change: 1 addition & 0 deletions widgets/AddItemsInput.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/ContentTagDropDown.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2022 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/MyTasks.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskBadge.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskContextMenu.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskDetails.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) HumHub GmbH & Co. KG
Expand Down
51 changes: 51 additions & 0 deletions widgets/TaskHeader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2022 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/

namespace humhub\modules\tasks\widgets;

use humhub\modules\content\components\ContentContainerActiveRecord;
use humhub\modules\tasks\helpers\TaskListUrl;
use humhub\modules\tasks\models\Task;
use humhub\modules\tasks\permissions\CreateTask;
use yii\base\Widget;

/**
* Widget for rendering the Tasks header.
*/
class TaskHeader extends Widget
{
/**
* @var null|ContentContainerActiveRecord
*/
public $contentContainer;

/**
* @var bool
*/
public $displayAddTask = false;

/**
* @inheritdoc
*/
public function run()
{
return $this->render('taskHeader', [
'addTaskUrl' => $this->getAddTaskUrl(),
]);
}

private function getAddTaskUrl(): ?string
{
if ($this->displayAddTask && (new Task($this->contentContainer))->content->canEdit()) {
return TaskListUrl::addTaskListTask(null, $this->contentContainer);
}

return null;
}

}
1 change: 1 addition & 0 deletions widgets/TaskIcon.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskPercentageBar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskPicker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/TaskSubMenu.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/checklist/TaskChecklist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/checklist/TaskChecklistItem.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/lists/CompletedTaskListView.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/lists/TaskListItem.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
1 change: 1 addition & 0 deletions widgets/lists/TaskListWidget.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
Expand Down
Loading

0 comments on commit e524e06

Please sign in to comment.