OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
49
app/Domain/Blueprints/Controllers/ShowBoards.php
Normal file
49
app/Domain/Blueprints/Controllers/ShowBoards.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Leantime\Domain\Blueprints\Controllers;
|
||||
|
||||
use Leantime\Core\Auth\Permissions\RequiresPermission;
|
||||
use Leantime\Core\UI\Template;
|
||||
use Leantime\Domain\Blueprints\Permissions\BlueprintsPermissions;
|
||||
use Leantime\Domain\Blueprints\Services\Blueprints as BlueprintsService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* ShowBoards controller - displays the blueprints boards overview.
|
||||
*
|
||||
* Absorbed from the former Strategy domain (there is no longer a separate
|
||||
* "strategy" module). Native Laravel controller: a single route-bound get()
|
||||
* action that reads the active project from the session and renders the
|
||||
* recent + available boards overview.
|
||||
*/
|
||||
class ShowBoards
|
||||
{
|
||||
/**
|
||||
* @param Template $tpl Template engine
|
||||
* @param BlueprintsService $blueprintsService Blueprints service providing the boards overview
|
||||
*/
|
||||
public function __construct(
|
||||
private Template $tpl,
|
||||
private BlueprintsService $blueprintsService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* get - display the blueprints boards overview for the active project.
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
#[RequiresPermission(BlueprintsPermissions::VIEW)]
|
||||
public function get(): Response
|
||||
{
|
||||
$overview = $this->blueprintsService->getBoardsOverview((int) session('currentProject'));
|
||||
|
||||
$this->tpl->assign('recentProgressCanvas', $overview['recentProgressCanvas']);
|
||||
$this->tpl->assign('recentlyUpdatedCanvas', $overview['recentlyUpdatedCanvas']);
|
||||
$this->tpl->assign('canvasProgress', $overview['canvasProgress']);
|
||||
$this->tpl->assign('otherBoards', $overview['otherBoards']);
|
||||
|
||||
return $this->tpl->display('blueprints.showBoards');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user