* code for task #89166.

This commit is contained in:
wangyidong
2023-03-30 17:36:19 +08:00
parent 0adc8a965e
commit efc419ca6e
17 changed files with 151 additions and 19 deletions
+7 -1
View File
@@ -24,7 +24,9 @@
<tr id='headerBox'>
<td width='90px'><?php echo html::a($backLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' id='backBtn'");?></td>
<td class="doc-title" colspan='3'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' id='editorTitle' class='form-control' required");?></td>
<td class="text-right">
<td class="text-right btn-tools">
<span id='savePath' class='text-gray'></span>
<?php echo html::commonButton($lang->doc->saveDraft, "id='saveDraft'", "btn btn-secondary");?>
<?php echo html::a('#modalBasicInfo', $lang->release->common, '', "data-toggle='modal' id='basicInfoLink' class='btn btn-primary'");?>
</td>
</tr>
@@ -37,6 +39,7 @@
<div class='contentmarkdown <?php echo $contentRequired;?> hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;'");?></div>
<?php echo html::hidden('contentType', 'html');?>
<?php echo html::hidden('type', 'text');?>
<?php echo html::hidden('status', 'normal');?>
</div>
</div>
</td>
@@ -145,4 +148,7 @@
<?php js::set('libNotEmpty', sprintf($lang->error->notempty, $lang->doc->lib));?>
<?php js::set('keywordsNotEmpty', sprintf($lang->error->notempty, $lang->doc->keywords));?>
<?php js::set('from', $from);?>
<?php js::set('defaultSave', $lang->doc->defaultSave);?>
<?php js::set('titleNotEmpty', sprintf($lang->error->notempty, $lang->doc->title));?>
<?php js::set('contentNotEmpty', sprintf($lang->error->notempty, $lang->doc->content));?>
<?php include '../../common/view/footer.lite.html.php';?>
+4 -3
View File
@@ -81,16 +81,17 @@ body {margin-bottom: 25px;}
<td class="c-name" title='<?php echo $doc->title;?>'>
<?php
$docType = $doc->type == 'text' ? 'wiki-file' : $doc->type;
$icon = html::image("static/svg/{$docType}.svg");
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
if(common::hasPriv('doc', 'objectLibs'))
{
echo html::a($this->createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' data-app='{$this->app->tab}'");
echo html::a($this->createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='{$this->app->tab}'");
}
else
{
echo "$icon {$doc->title}";
echo "<span class='doc-title'>$icon {$doc->title}</span>";
}
?>
<?php if($doc->status == 'draft') echo "<span class='label label-badge draft'>{$lang->doc->draft}</span>";?>
<?php if(common::canBeChanged('doc', $doc) and common::hasPriv('doc', 'collect') and $libType and $libType != 'api'):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
+4
View File
@@ -22,6 +22,10 @@
<div id="leftBar" class="btn-toolbar pull-left">
<?php echo $objectDropdown;?>
<?php if(!empty($libTree)):?>
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
<?php echo html::a($this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType"), $barName, '', "class='btn btn-link $active' id='{$barType}Tab'");?>
<?php endforeach;?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->doc->searchDoc;?></a>
<?php endif;?>
</div>