From ed0548786bff9d2446eb235bb6ea92f0cb98d1b4 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 20 Jul 2023 02:26:12 +0000 Subject: [PATCH] * Adjust the style for waterfall project. --- module/block/ui/recentprojectblock.html.php | 47 ++------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/module/block/ui/recentprojectblock.html.php b/module/block/ui/recentprojectblock.html.php index eb841bb17d..22599070de 100644 --- a/module/block/ui/recentprojectblock.html.php +++ b/module/block/ui/recentprojectblock.html.php @@ -14,30 +14,8 @@ namespace zin; $cards = array(); foreach($projects as $projectID => $project) { - $viewLink = $this->createLink('project', 'index', "projectID=$project->id"); - - if($project->model == 'waterfall') - { - $stages = array(); - foreach($project->executions as $stage) - { - if($stage->grade == 1) $stages[] = $stage; - } - - $stageItems = array(); - foreach($stages as $stage) - { - $stageItems[] = div - ( - set::class("project-stage-item is-{$stage->status}" . ($stage->status != 'wait' ? ' is-going' : '')), - div($stage->name) - ); - } - } - else - { - $execution = empty($project->executions) ? '' : end($project->executions); - } + $viewLink = $this->createLink('project', 'index', "projectID=$project->id"); + $execution = empty($project->executions) ? '' : end($project->executions); $cards[] = cell ( @@ -53,26 +31,7 @@ foreach($projects as $projectID => $project) $project->name ) ), - $project->model == 'waterfall' && empty($stages) ? label - ( - zget($lang->project->statusList, $project->status), - setClass('label-outline') - ) : null, - $project->model == 'waterfall' && !empty($stages) ? p - ( - set::class('text-gray'), - $lang->project->ongoingStage - ) : null, - $project->model == 'waterfall' && !empty($stages) ? div - ( - set::class('project-stages-container'), - div - ( - set::class('project-stages-row'), - $stageItems, - ) - ) : null, - ($project->model != 'waterfall' && $project->multiple && $execution) ? div + ($project->multiple && $execution) ? div ( set('class', 'card-body py-1.5'), div