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

132 lines
4.7 KiB
PHTML
Raw Normal View History

2011-09-23 07:34:40 +00:00
<?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');
2012-04-12 04:04:23 +00:00
$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('栏目管理');
2011-09-23 07:34:40 +00:00
?>
<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="60%">栏目名称</th>
<th width="40%" style="vertical-align:top;">栏目管理</th>
</tr>
</thead>
<tbody>
<?php
if(is_array($this->catlogs))
{
foreach($this->catlogs as $k=>$v)
{
echo '
<tr>
<td>
<div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
<div class="listingDetails">
<div class="pad">
<b>编辑栏目</b> <a href="javascript:;" class="closepad" style="float:right">关闭</a>
<form id="editform'.$v['id'].'" method="post" action="#">
<fieldset>
2011-09-23 07:34:40 +00:00
<legend>栏目信息</legend>
<p>
<label class="required" for="ctitle">栏目标题:</label><br/>
<input type="text" id="ctitle" class="half" value="'.$v['title'].'" name="ctitle"/>
</p>
<p>
<label class="required" for="ctitle">栏目URL:</label><br/>
<input type="text" id="url" class="half" value="'.$v['url'].'" name="url"/>(仅小写英文字母与数字)
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small>
</p>
2011-09-23 07:34:40 +00:00
<p>
<label class="required" for="keyword">关键字:</label><br/>
<input type="text" id="keyword" class="half" value="'.$v['keywords'].'" name="keyword"/>
2011-09-23 07:34:40 +00:00
<small>e.g. 高程,气象,地理</small>
</p>
<p>
2011-09-28 08:29:01 +00:00
<label class="required" for="description">描述:</label><br/>
<textarea id="description" class="small half" name="description">'.$v['description'].'</textarea>
2011-09-23 07:34:40 +00:00
<small>80个汉字以内不能使用折行</small>
</p>
<p>
2011-09-28 08:29:01 +00:00
<label class="required" for="displayorder">排序:</label><br/>
<input type="text" id="roders" class="half" value="'.$v['displayorder'].'" name="displayorder"/>
2011-09-23 07:34:40 +00:00
<small>e.g. 数字越大排序越靠前</small>
</p>
<input type="hidden" name="edit" value="'.$v['id'].'" />
<p class="box"><input type="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
</form>
</div>
</div></div>
</td>
<td>
<a href="/news/'.$v['url'].'" target="_blank">浏览</a>
<a href="/admin/news/newslist/type/'.$v['id'].'">文档</a>
2011-09-23 07:34:40 +00:00
<a href="javascript:showpad('.$v['id'].');"><b>编辑</b></a>
2011-09-30 03:13:01 +00:00
<a href="/admin/news/catlog/delete/'.$v['id'].'" onclick="return confirm(\'是否确定删除该栏目\')">删除</a></td>
2011-09-23 07:34:40 +00:00
</tr>
';
}
}
else
{
echo '
<tr><td>暂无数据</td><td></td></tr>
';
}
?>
</tbody>
</table>
</div>
2011-09-23 07:34:40 +00:00
<script type="text/javascript">
$(document).ready(function(){
$('.title').bind('click', function() {
$.colorbox({'innerWidth':'50%','html':$(this).next('.listingDetails').children('.pad').html()});
});
2011-09-23 07:34:40 +00:00
});
function showpad(id){
$('#titlebtn'+id).click();
}
</script>