diff --git a/module/ai/control.php b/module/ai/control.php index fc0fc6df64..f3fb476927 100644 --- a/module/ai/control.php +++ b/module/ai/control.php @@ -146,10 +146,11 @@ class ai extends control { $prompt = $this->ai->getPromptById($id); - $this->view->prompt = $prompt; - $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('prompt', $id); - $this->view->title = "{$this->lang->ai->prompts->common}#{$prompt->id} $prompt->name"; - $this->view->position[] = $this->lang->ai->prompts->common; + $this->view->dataPreview = $this->ai->generateDemoDataPrompt($prompt->module, $prompt->source); + $this->view->prompt = $prompt; + $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('prompt', $id); + $this->view->title = "{$this->lang->ai->prompts->common}#{$prompt->id} $prompt->name"; + $this->view->position[] = $this->lang->ai->prompts->common; $this->display(); } diff --git a/module/ai/css/promptview.css b/module/ai/css/promptview.css new file mode 100644 index 0000000000..e76c90f814 --- /dev/null +++ b/module/ai/css/promptview.css @@ -0,0 +1,14 @@ +.detail-title { + font-weight: normal; + color:#838a9d; +} +.detail-title::before { + content: '['; +} +.detail-title::after { + content: ']'; +} + +.detail-content + .detail-title { + margin-top: 10px; +} diff --git a/module/ai/view/promptview.html.php b/module/ai/view/promptview.html.php index 874ba7d2b7..a5e9a4d15f 100644 --- a/module/ai/view/promptview.html.php +++ b/module/ai/view/promptview.html.php @@ -28,6 +28,30 @@