westdc-zf1/application/admin/views/scripts/news/category-edit.phtml

120 lines
6.6 KiB
PHTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目管理');
?>
<div class="row">
<div class="hidden-sm hidden-xs col-md-2">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div class="col-md-10 col-sm-12">
<?php if ($this->msg or $this->messages) :?>
<div id="message" class="alert alert-info">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<h4>栏目修改</h4>
<hr />
<form id="sampleform" method="post" action="#" class="form-horizontal">
<div class="form-group">
<label for="ctitle" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="ctitle" class="half form-control" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</div>
</div>
<div class="form-group">
<label for="ptype" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目类型:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="ptype" class="form-control">
<?php if(!empty($this->ptype)) :?>
<?php foreach($this->ptype as $k=>$v) : ?>
<?php if(empty($this->info['ptype'])) {?>
<option value="<?= $v ?>"><?= $k ?></option>
<?php }else{
if($this->info['ptype'] == $v)
{ ?>
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
<?php }else{?>
<option value="<?= $v ?>"><?= $k ?></option>
<?php }
}?>
<?php endforeach;?>
<?php endif; ?>
</select>
</div>
</div>
<div class="form-group">
<label for="code" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目URL</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="code" class="half form-control" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>
<h5>(仅小写英文字母与数字)</h5>
<h5><small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small></h5>
</div>
</div>
<div class="form-group">
<label for="title_en" class="required col-md-2 col-sm-2 col-xs-2 control-label">英文标题:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="text" id="title_en" class="half form-control" value="<?php if(!empty($this->info['title_en'])) echo $this->info['title_en'];?>" name="title_en" />
</div>
</div>
<div class="form-group">
<label for="is_pub" class="required col-md-2 col-sm-2 col-xs-2 control-label">是否显示:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="is_pub" id="display" class="form-control">
<option value="true" <?php if(empty($this->info['is_pub']) || $this->info['is_pub']==true)echo 'selected="selected"'; ?>>显示</option>
<option value="false" <?php if(!empty($this->info['is_pub'])) if($this->info['is_pub'] == false )echo 'selected="selected"'; ?>>隐藏</option>
</select>
</div>
</div>
<div class="form-group">
<label for="fid" class="required col-md-2 col-sm-2 col-xs-2 control-label">父级栏目:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<select name="fid" class="form-control">
<option value="0"></option>
<?php if(!empty($this->categories)) :?>
<?php foreach($this->categories as $v) : ?>
<?php if(empty($this->info['fid'])) {?>
<option value="<?= $v['id'];?>">
<?php if(!empty($v[$this->deepField])) {echo str_repeat('-',$v[$this->deepField]);} ?>
<?=$v['title'];?>
</option>
<?php }else{
if($this->info['fid'] == $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="form-group">
<label for="is_pub" class="required col-md-2 col-sm-2 col-xs-2 control-label">是否显示:</label>
<div class="col-md-4 col-sm-4 col-xs-4">
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="edit" value="<?= $this->info['id']?>"? />
<input type="submit" class="btn btn-primary" value="提交"/>
<input type="reset" class="btn btn-danger" value="重置"/>
</div>
</div>
</form>
</div>
</div>