westdc-zf1/application/admin/views/scripts/news/catlog.phtml

135 lines
4.7 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-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$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->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目管理');
?>
<style>
.listingDetails{position:absolute;width:650px;}
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
</style>
<div id="leftPanel">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?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; ?>
<div id="tabs-controller">
<ul>
<li class="box-shadow active"><a class="text-shadow" href="/admin/news/catlog/add/1">添加新栏目</a></li>
</ul>
</div>
<table id="report" class="stylized full" style="width:650px;">
<thead>
<tr>
<th width="50%">栏目名称</th>
<th width="20%">栏目类型</th>
<th width="30%" style="vertical-align:top;">栏目管理</th>
</tr>
</thead>
<tbody>
<?php
if(is_array($this->catlogs))
{
$top = 0;
$deep = 0;
foreach($this->catlogs as $k=>$v)
{
if($v[$this->deepField]>0)
{
$style = "text-indent:". $v[$this->deepField]*12 ."px;";
}else{
$style = "";
}
echo '
<tr>
<td>
<div id="paddiv'.$v['id'].'" style="'.$style.'">
<a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
</td>
<td>
<b>'.$v['ptype'].'</b>
</td>
<td>
<a href="'.$v['url'].'" target="_blank">浏览</a>
<a href="/admin/news/newslist/type/'.$v['id'].'">文档</a>
<a href="/admin/news/catlog/edit/'.$v['id'].'"><b>编辑</b></a>
<a href="/admin/news/catlog/delete/'.$v['id'].'" onclick="return confirm(\'是否确定删除该栏目\')">删除</a></td>
</tr>';
}
}else{
echo '<tr><td>暂无数据</td><td></td></tr>';
}
?>
</tbody>
</table>
</div>
<div style="width:500px;display:none;" id="categoryForm">
<form id="category" style="width:500px;">
<p>
<label class="required" for="ctitle">栏目标题:</label><br/>
<input type="text" id="ctitle" class="half" value="" name="ctitle"/>
</p>
<p>
<label class="required" for="ctitle">栏目URL:</label><br/>
<input type="text" id="url" class="half" value="" name="url"/>(仅小写英文字母与数字)
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small>
</p>
<p>
<label class="required" for="keyword">关键字:</label><br/>
<input type="text" id="keyword" class="half" value="" name="keyword"/>
<small>e.g. 高程,气象,地理</small>
</p>
<p>
<label class="required" for="description">描述:</label><br/>
<textarea id="description" class="small half" name="description"></textarea>
<small>80个汉字以内不能使用折行</small>
</p>
<p>
<label class="required" for="displayorder">排序:</label><br/>
<input type="text" id="roders" class="half" value="" name="displayorder"/>
<small>e.g. 数字越大排序越靠前</small>
</p>
<input type="hidden" name="edit" value="" />
<p class="box"><input type="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
<p class="box">
<input type="hidden" name="id" id="categoryID" value="" />
<input type="button" onclick="" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" id="resetForm" value="重置"/>
</p>
<p id="formStatus" style="display:block;">&nbsp;</p>
</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.title').bind('click', function() {
$.colorbox({'innerWidth':'50%','html':$(this).next('.listingDetails').children('.pad').html()});
});
});
function showpad(id){
$('#titlebtn'+id).click();
}
</script>