* add prompt view detail block.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -28,6 +28,30 @@
|
||||
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->role?></div>
|
||||
<div class="detail-content article-content"><?php echo $prompt->role?></div>
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->characterization?></div>
|
||||
<div class="detail-content article-content"><?php echo $prompt->characterization?></div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->object?></div>
|
||||
<div class="detail-content article-content"><?php echo $this->lang->ai->dataSource[$prompt->module]['common']; ?></div>
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->field?></div>
|
||||
<div class="detail-content article-content"><?php echo $dataPreview?></div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->setPurpose?></div>
|
||||
<div class="detail-content article-content"><?php echo $prompt->purpose?></div>
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->elaboration?></div>
|
||||
<div class="detail-content article-content"><?php echo $prompt->elaboration?></div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->ai->prompts->selectTargetForm?></div>
|
||||
<div class="detail-content article-content"><?php echo $this->lang->ai->targetForm[$prompt->module][explode('.', $prompt->targetForm)[1]]; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php echo html::a(helper::createLink('ai', 'prompts'), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn'");?>
|
||||
|
||||
Reference in New Issue
Block a user