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

150 lines
4.8 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('/static/js/jquery.dataTables.min.js');
?>
<!-- Page title -->
<div id="pagetitle">
<div class="wrapper">
<h1>新闻中心</h1>
<!-- Quick search box -->
<form action="" method="get"><input class="" type="text" id="q" name="q" /></form>
</div>
</div>
<!-- End of Page title -->
<!-- Page content -->
<div id="page">
<!-- Wrapper -->
<div class="wrapper">
<!-- Right column/section -->
<aside class="column width2 first">
<?= $this->partial('news/left.phtml'); ?>
</aside>
<!-- End of Right column/section -->
<!-- Left column/section -->
<section class="column width6">
<h3>栏目管理</h3>
<hr/>
<?php if ($this->msg or $this->messages) :?>
<div class="box box-info">
<?php if ($this->msg) : ?>
<?php echo $this->msg; ?>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<?php echo $msg; ?>
<?php endforeach;endif; ?>
<script language="javascript">
setTimeout('$(".box-info").remove()',5000);
</script>
</div>
<?php endif; ?>
<table id="report" class="stylized full" style="">
<thead>
<tr>
<th width="50%">栏目名称</th>
<th width="50%">栏目管理</th>
</tr>
</thead>
<tbody>
<?php
if(is_array($this->catlogs))
{
foreach($this->catlogs as $k=>$v)
{
echo '
<tr>
<td class="title">
<div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'"><b>'.$v['title'].'</b></a>
<div class="listingDetails">
<div class="pad">
<b>编辑栏目</b>
<form id="editform'.$v['id'].'" method="post" action="#">
<fieldset>
<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="keyword">关键字:</label><br/>
<input type="text" id="keyword" class="half" value="'.$v['keyword'].'" name="keyword"/>
<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="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>
<hr/>
<a href="/admin/news/catlog/add/1" class="btn"><span class="icon icon-add">&nbsp;</span>添加新栏目</a>
</section>
<!-- End of Left column/section -->
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript">
$('#nav_news').addClass("current");
$(document).ready(function(){
/* setup navigation, content boxes, etc... */
Administry.setup();
/* expandable rows */
Administry.expandableRows();
});
function showpad(id){
$('#titlebtn'+id).click();
}
</script>