97 lines
4.4 KiB
PHTML
97 lines
4.4 KiB
PHTML
<div class="row">
|
|
<div class="col-md-12">
|
|
<?php if(!empty($this->error)) { ?>
|
|
<?= $this->error ?>
|
|
<?php } ?>
|
|
<form class="form-horizontal" method="post">
|
|
<div class="control-group">
|
|
<label class="control-label" for="title">标题</label>
|
|
<div class="controls">
|
|
<input type="text" id="title" name="title" value="<?= (isset($this->data['title'])&&!empty($this->data['title'])) ? $this->data['title']:"" ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="code">code</label>
|
|
<div class="controls">
|
|
<input type="text" id="code" name="code" value="<?= isset($this->data['code']) ? $this->data['code']:"" ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="code">url</label>
|
|
<div class="controls">
|
|
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="keywords">关键词</label>
|
|
<div class="controls">
|
|
<input type="text" id="keywords" name="keywords" value="<?= isset($this->data['keywords']) ? $this->data['keywords']:"" ?>" class="span12" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="description">描述</label>
|
|
<div class="controls">
|
|
<input type="text" id="description" name="description" value="<?= isset($this->data['description']) ? $this->data['description']:"" ?>" class="span12" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="title_en">父级栏目</label>
|
|
<div class="controls">
|
|
<select name="tid">
|
|
<option value="0">无</option>
|
|
<?php if(!empty($this->categories)) :?>
|
|
<?php foreach($this->categories as $v) : ?>
|
|
<?php if(empty($this->data['tid'])) {?>
|
|
<option value="<?= $v['id'];?>">
|
|
<?php if(!empty($v[$this->deepField])) {echo str_repeat('-',$v[$this->deepField]);} ?>
|
|
<?= $v['title']; ?>
|
|
</option>
|
|
<?php }else{
|
|
if($this->data['tid'] == $v['id'])
|
|
{ ?>
|
|
<option value="<?= $v['id'];?>" selected="selected">
|
|
<?php if(!empty($v[$this->deepField])) {echo str_repeat('-',$v[$this->deepField]);} ?>
|
|
<?= $v['title'];?>
|
|
</option>
|
|
<?php }else{?>
|
|
<option value="<?= $v['id'];?>"><?= $v['title'];?></option>
|
|
<?php }
|
|
}?>
|
|
<?php endforeach;?>
|
|
<?php endif; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="is_pub">是否显示</label>
|
|
<div class="controls">
|
|
<label class="radio inline">
|
|
<input type="radio" name="is_pub" value="1" <?= (isset($this->data['is_pub']) && $this->data['is_pub']==1) ? 'checked="checked"':"" ?> />显示
|
|
</label>
|
|
<label class="radio inline">
|
|
<input type="radio" name="is_pub" value="0" <?= (isset($this->data['is_pub']) && $this->data['is_pub']==0) ? 'checked="checked"':"" ?>/>不显示
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label for="template" class="control-label">模板</label>
|
|
<div class="controls">
|
|
<select id="template" class="full" name="template">
|
|
<option value="category-default">默认模板</option>
|
|
<?php if(!empty($this->templates)) {?>
|
|
<?php foreach($this->templates as $k=>$v) {?>
|
|
<option value="<?= $v ?>" <?= (isset($this->data['template']) && $this->data['template']==$v) ? 'selected="selected"':''?>><?= $v ?></option>
|
|
<?php } } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="control-group form-actions">
|
|
<input type="hidden" name="submit" value="1" />
|
|
<?php if(!empty($this->id)) { ?>
|
|
<input type="hidden" name="id" value=" <?=$this->id?> " />
|
|
<?php } ?>
|
|
<button type="submit" class="btn btn-primary">提交</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|