* add quick switcher and title to prompt details.
This commit is contained in:
@@ -437,6 +437,7 @@ $config->objectTables['privlang'] = TABLE_PRIVLANG;
|
||||
$config->objectTables['privmanager'] = TABLE_PRIVMANAGER;
|
||||
$config->objectTables['privrelation'] = TABLE_PRIVRELATION;
|
||||
$config->objectTables['scene'] = TABLE_SCENE;
|
||||
$config->objectTables['prompt'] = TABLE_PROMPT;
|
||||
|
||||
$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions');
|
||||
$config->disabledFeatures = '';
|
||||
|
||||
@@ -147,7 +147,8 @@ class ai extends control
|
||||
$prompt = $this->ai->getPromptById($id);
|
||||
|
||||
$this->view->prompt = $prompt;
|
||||
$this->view->title = $this->lang->ai->prompts->common;
|
||||
$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();
|
||||
|
||||
+3
-1
@@ -373,13 +373,15 @@ class aiModel extends model
|
||||
*/
|
||||
public function getPrompts($module = '', $status = '', $order = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PROMPT)
|
||||
$prompts = $this->dao->select('*')->from(TABLE_PROMPT)
|
||||
->where('1=1')
|
||||
->beginIF(!empty($module))->andWhere('module')->eq($module)->fi()
|
||||
->beginIF(!empty($status))->andWhere('status')->eq($status)->fi()
|
||||
->orderBy($order)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'prompt');
|
||||
return $prompts;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<?php common::printPreAndNext($preAndNext, helper::createLink('ai', 'promptview', 'id=%d'));?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user