clean code and redesign the format

This commit is contained in:
wlx 2011-10-12 13:46:43 +00:00
parent b2d402ee6b
commit 99cc2726ae
5 changed files with 116 additions and 165 deletions

View File

@ -3,15 +3,17 @@
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/sys">系统管理</a>');
$this->breadcrumb('邮件模板管理');
$this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="divContent">
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('sys/left.phtml'); ?> <?= $this->partial('sys/left.phtml'); ?>
</div> </div>
<div id="rightPanel"> <div id="rightPanel">
<?php if ($this->msg or $this->messages) :?> <?php if ($this->msg or $this->messages) :?>
<div class="box box-info"> <div class="box box-info">
<?php if ($this->msg) : ?> <?php if ($this->msg) : ?>
@ -25,53 +27,31 @@
</div> </div>
<?php endif; ?> <?php endif; ?>
<div id="tabs"> <a class="" href="/admin/sys/emailtext/ac/add">创建新模板</a>
<ul> <table><thead><tr>
<li><a class="corner-tl" href="#tabs-1">邮件模板</a></li> <th>模板标识</th>
<li><a class="" href="/admin/sys/emailtext/ac/add">创建新模板</a></li> <th width="30%">邮件主题</th>
<li><a class="corner-tr" href="#tabs-3" id="showhelp">模板编辑说明</a></li> <th>创建时间</th>
</ul> <th>更新时间</th>
<div id="tabs-1"> <th>操作</th>
<table id="report" class="stylized full" style=""> </tr></thead><tbody>
<thead> <?php
<tr> if (count($this->paginator)):
<th width="50%">模板名称</th> $autoindex=0;
<th width="50%">管理</th> foreach ($this->paginator as $item):
</tr> $autoindex++;?>
</thead> <tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<tbody> <td><?php echo $item['template'];?></td>
<?php if (count($this->paginator)): ?> <td><?php echo $item['subject'];?></td>
<?php $autoindex=0;?> <td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
<?php foreach ($this->paginator as $item): ?> <td><?php if (!empty($item['ts_changed'])) echo date("Y-m-d H:i",strtotime($item['ts_changed']));?></td>
<?php $autoindex++;?>
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
<td class="title">
<div><a href="#"><b><?php echo $item['title'];?></b></a>
<div class="listingDetails">
<div class="pad">
<ul>
<li>模板说明:<?php echo $item['description'];?></li>
<li>创建时间:<?php echo date("Y-m-d H:i",$item['ts_create']);?></li>
<li>使用次数: <?php echo $item['usetimes'];?></li>
</ul>
</div>
</div>
</div>
</td>
<td> <td>
<a href="/admin/sys/emailtext/ac/del/id/<?php echo $item['id'];?>">删除</a> | <a href="/admin/sys/emailtext/ac/del/id/<?php echo $item['id'];?>">删除</a> |
<a href="/admin/sys/emailtext/ac/edit/id/<?php echo $item['id'];?>">查看更改</a> | <a href="/admin/sys/emailtext/ac/edit/id/<?php echo $item['id'];?>">编辑</a> |
<a href="/admin/sys/emailtext/ac/test/id/<?php echo $item['id'];?>">发送测试</a> <a href="/admin/sys/emailtext/ac/test/id/<?php echo $item['id'];?>">测试</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; endif; ?>
<?php endif; ?> </tbody></table>
</tbody> <div class="pagenavi"><?= $this->paginator; ?></div>
</table>
<div style="width:50%;text-align:left;">
<?= $this->paginator; ?></div>
</div>
</div>
</div> </div>

View File

@ -3,49 +3,37 @@
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/sys">系统管理</a>');
$this->breadcrumb('邮件模板管理');
$this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="divContent">
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('sys/left.phtml'); ?> <?= $this->partial('sys/left.phtml'); ?>
</div> </div>
<div id="rightPanel"> <div id="rightPanel">
<!-- Left column/section -->
<section class="column width6">
<h3>邮件模板添加</h3> <h3>邮件模板添加</h3>
<form name="form" method="post" action="/admin/sys/emailtext/"> <form name="form" method="post" action="/admin/sys/emailtext/">
<input type="hidden" name="ac" value="add" /> <input type="hidden" name="ac" value="add" />
<input type="hidden" name="submit" value="1" /> <input type="hidden" name="submit" value="1" />
<fieldset> <fieldset>
<p> <p>
<label class="required" for="producttitle">标题</label><br/> <label class="required">模板标识文字</label>
<input type="text" id="producttitle" class="half title" value="" name="title"/> <input type="text" id="template" value="" name="template"/>
</p> </p>
<p> <p>
<label for="description">介绍</label><br/> <label class="required">邮件主题</label>
<textarea id="description" class="small half" name="description" style="width:500px;height:80px;"></textarea> <input type="text" id="title" value="" name="title"/>
</p> </p>
<p> <p>
<label for="body">模板内容</label><br/> <label for="body">模板内容</label><br/>
<textarea id="body" class="large full" style="width:500px;height:200px;" name="body"></textarea> <textarea id="body" class="emailtext" name="body"></textarea>
<small><a href="javascript:showhelp();">查看说明?</a></small>
</p> </p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p> <p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/></p>
</fieldset> </fieldset>
</form> </form>
</section>
<!-- End of Left column/section -->
</div>
</div> </div>

View File

@ -3,18 +3,16 @@
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/sys">系统管理</a>');
$this->breadcrumb('邮件模板管理');
$this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="divContent">
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('sys/left.phtml'); ?> <?= $this->partial('sys/left.phtml'); ?>
</div> </div>
<div id="rightPanel"> <div id="rightPanel">
<!-- Left column/section -->
<section class="column width6">
<h3>邮件模板编辑</h3> <h3>邮件模板编辑</h3>
<form name="form" method="post" action="/admin/sys/emailtext/"> <form name="form" method="post" action="/admin/sys/emailtext/">
<input type="hidden" name="ac" value="edit" /> <input type="hidden" name="ac" value="edit" />
@ -22,29 +20,21 @@
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" /> <input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
<fieldset> <fieldset>
<p> <p>
<label class="required" for="producttitle">标题</label><br/> <label class="required">模板标识文字</label>
<input type="text" id="producttitle" class="half title" value="<?php echo $this->info['title'];?>" name="title"/> <input type="text" id="template" value="<?php echo $this->info['template'];?>" name="template"/>
</p> </p>
<p> <p>
<label for="description">介绍</label><br/> <label class="required">邮件主题</label>
<textarea id="description" class="small half" name="description" style="width:500px;height:80px;"><?php echo $this->info['description'];?></textarea> <input type="text" id="title" value="<?php echo $this->info['subject'];?>" name="title"/>
</p> </p>
<p> <p>
<label for="body">模板内容</label><br/> <label for="body">模板内容</label><br/>
<textarea id="body" class="large full" name="body" style="width:500px;height:200px;"><?php echo $this->info['content'];?></textarea> <textarea id="body" class="emailtext" name="body"><?php echo $this->info['body'];?></textarea>
<small><a href="javascript:showhelp();">查看说明?</a></small>
</p> </p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p> <p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset> </fieldset>
</form> </form>
</section>
<!-- End of Left column/section -->
</div>
</div> </div>

View File

@ -4,14 +4,11 @@
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
?> ?>
<div id="divContent">
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('sys/left.phtml'); ?> <?= $this->partial('sys/left.phtml'); ?>
</div> </div>
<div id="rightPanel"> <div id="rightPanel">
<section class="column width6">
<?php if ($this->msg or $this->messages) :?> <?php if ($this->msg or $this->messages) :?>
<div class="box box-info"> <div class="box box-info">
@ -26,36 +23,32 @@
</div> </div>
<?php endif; ?> <?php endif; ?>
<h3>发送邮件发送测试</h3> <h3>邮件发送测试</h3>
<form name="form" method="post" action="/admin/sys/emailtext/"> <form name="form" method="post" action="/admin/sys/emailtext/">
<input type="hidden" name="ac" value="test" /> <input type="hidden" name="ac" value="test" />
<input type="hidden" name="submit" value="1" /> <input type="hidden" name="submit" value="1" />
<input type="hidden" name="id" value="<?php echo $this->id;?>" /> <input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
<fieldset> <fieldset>
<p> <p>
<label for="email" class="required">测试的收信地址</label><br/> <label for="email" class="required">测试的收信地址</label>
<input type="text" id="producttitle" class="half title" value="" name="email"/> <input type="text" id="email" value="" name="email"/>
</p> </p>
<p> <p>
<label class="required" for="producttitle">邮件标题</label><br/> <label class="required" for="producttitle">邮件主题</label>
<input type="text" id="producttitle" class="half title" value="测试邮件标题" name="title"/> <input type="text" id="subject" value="<?php echo $this->info['subject'];?>" name="subject"/>
</p> </p>
<p> <p>
<label for="user">收信用户名</label><br/> <label>收信用户名</label>
<input type="text" id="user" class="half title" value="张测试" name="user"/> <input type="text" id="user" value="张三" name="user"/>
</p>
<p>
<label for="body">模板内容</label><br/>
<textarea id="body" class="emailtext" name="body"><?php echo $this->info['body'];?></textarea>
</p> </p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p> <p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset> </fieldset>
</form> </form>
</section>
</div>
</div> </div>

View File

@ -3,9 +3,11 @@
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('系统管理');
$this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="divContent">
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('sys/left.phtml'); ?> <?= $this->partial('sys/left.phtml'); ?>
</div> </div>
@ -13,5 +15,3 @@
<div id="rightPanel"> <div id="rightPanel">
</div> </div>
</div>