From f091f6557b987a31499ec8657ca700de08aa4afb Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 17 Nov 2023 14:40:29 +0800 Subject: [PATCH] * Adjust copy project pop-window style when the system haven't any project. --- module/project/ui/create.html.php | 42 +++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/module/project/ui/create.html.php b/module/project/ui/create.html.php index 9233e615e8..94e6d88789 100644 --- a/module/project/ui/create.html.php +++ b/module/project/ui/create.html.php @@ -236,7 +236,7 @@ formPanel set::control(array('type' => 'radioList', 'inline' => true)), set::items($lang->project->multipleList), set::disabled($copyProjectID), - set::value($copyProject ? $copyProject->multiple : 1) + set::value($copyProjectID ? $copyProject->multiple : 1) ) : null, formGroup ( @@ -541,20 +541,36 @@ formPanel ); $copyProjectsBox = array(); -foreach($copyProjects as $id => $name) +if(!empty($copyProjects)) { - $copyProjectsBox[] = btn( - setClass('project-block justify-start'), - setClass($copyProjectID == $id ? 'primary-outline' : ''), - set('data-id', $id), - set('data-pinyin', zget($copyPinyinList, $name, '')), - icon + foreach($copyProjects as $id => $name) + { + $copyProjectsBox[] = btn( + setClass('project-block justify-start'), + setClass($copyProjectID == $id ? 'primary-outline' : ''), + set('data-id', $id), + set('data-pinyin', zget($copyPinyinList, $name, '')), + icon + ( + setClass('text-gray'), + $lang->icons['project'] + ), + span($name) + ); + } +} +else +{ + $copyProjectsBox[] = div ( - setClass('text-gray'), - $lang->icons['project'] - ), - span($name) - ); + setClass('inline-flex items-center w-full bg-lighter h-12 mt-2 mb-8'), + icon('exclamation-sign icon-2x pl-2 text-warning'), + span + ( + set::className('font-bold ml-2'), + $lang->project->copyNoProject + ) + ); } modalTrigger