OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
40
app/Domain/Tickets/Controllers/ShowAllMilestones.php
Normal file
40
app/Domain/Tickets/Controllers/ShowAllMilestones.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Tickets\Controllers;
|
||||
|
||||
use Leantime\Core\Controller\Controller;
|
||||
use Leantime\Domain\Tickets\Services\Tickets as TicketService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ShowAllMilestones extends Controller
|
||||
{
|
||||
private TicketService $ticketService;
|
||||
|
||||
public function init(
|
||||
TicketService $ticketService
|
||||
): void {
|
||||
$this->ticketService = $ticketService;
|
||||
|
||||
session(['lastPage' => CURRENT_URL]);
|
||||
session(['lastMilestoneView' => 'milestonetable']);
|
||||
session(['lastFilterdMilestoneView' => CURRENT_URL]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function get($params): Response
|
||||
{
|
||||
|
||||
$params = $this->ticketService->normalizeRoadmapParams($params);
|
||||
|
||||
// Sets the filter module to show a quick toggle for task types
|
||||
$this->tpl->assign('enableTaskTypeToggle', true);
|
||||
$this->tpl->assign('showTasks', $params['showTasks'] ?? 'false');
|
||||
|
||||
$template_assignments = $this->ticketService->getTicketTemplateAssignments($params);
|
||||
array_map([$this->tpl, 'assign'], array_keys($template_assignments), array_values($template_assignments));
|
||||
|
||||
return $this->tpl->display('tickets.showAllMilestones');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user