* [task#131071] show question card for the thinkansoff widget.
This commit is contained in:
@@ -6,6 +6,17 @@ requireWg('thinkModel');
|
||||
|
||||
class thinkAnsoff extends thinkModel
|
||||
{
|
||||
protected function buildAreaCard(int $order): array
|
||||
{
|
||||
$blocks = $this->prop('blocks');
|
||||
$area = array();
|
||||
foreach($blocks as $block)
|
||||
{
|
||||
if($order == $block->id && !empty($block->steps)) $area[] = $this->buildResultCard($block->steps, $block->id + 1);
|
||||
}
|
||||
return $area;
|
||||
}
|
||||
|
||||
protected function buildItem(int $order, string|object $block): node
|
||||
{
|
||||
global $app, $lang, $config;
|
||||
@@ -21,7 +32,7 @@ class thinkAnsoff extends thinkModel
|
||||
(
|
||||
setClass('relative col justify-between py-2 px-2.5 bg-canvas model-block', "bg-$blockColor-100", "block-$order"),
|
||||
setStyle($blockStyle),
|
||||
div(setClass('h-full flex flex-wrap gap-2.5')),
|
||||
div(setClass('h-full flex flex-wrap gap-2.5'), $mode == 'view' ? $this->buildAreaCard($order) : null),
|
||||
div(setClass('item-step-title text-center', "text-$blockColor"), $blockName)
|
||||
);
|
||||
}
|
||||
@@ -41,7 +52,7 @@ class thinkAnsoff extends thinkModel
|
||||
setClass('w-full flex items-stretch gap-4'),
|
||||
div
|
||||
(
|
||||
setClass('flex items-center justify-center text-gray-400 font-medium item-step-title'),
|
||||
setClass('flex items-center justify-center text-gray-400 font-medium item-step-title item-vertical-title'),
|
||||
setStyle(array('writing-mode' => 'vertical-rl')),
|
||||
$lang->thinkwizard->ansoff->titles[$titleKey]
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user