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

@ -2,16 +2,18 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$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++;?> <td>
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>> <a href="/admin/sys/emailtext/ac/del/id/<?php echo $item['id'];?>">删除</a> |
<td class="title"> <a href="/admin/sys/emailtext/ac/edit/id/<?php echo $item['id'];?>">编辑</a> |
<div><a href="#"><b><?php echo $item['title'];?></b></a> <a href="/admin/sys/emailtext/ac/test/id/<?php echo $item['id'];?>">测试</a>
<div class="listingDetails"> </td>
<div class="pad"> </tr>
<ul> <?php endforeach; endif; ?>
<li>模板说明:<?php echo $item['description'];?></li> </tbody></table>
<li>创建时间:<?php echo date("Y-m-d H:i",$item['ts_create']);?></li> <div class="pagenavi"><?= $this->paginator; ?></div>
<li>使用次数: <?php echo $item['usetimes'];?></li>
</ul>
</div>
</div>
</div>
</td>
<td>
<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/test/id/<?php echo $item['id'];?>">发送测试</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</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">
<h3>邮件模板添加</h3>
<!-- Left column/section --> <form name="form" method="post" action="/admin/sys/emailtext/">
<section class="column width6"> <input type="hidden" name="ac" value="add" />
<input type="hidden" name="submit" value="1" />
<h3>邮件模板添加</h3> <fieldset>
<p>
<form name="form" method="post" action="/admin/sys/emailtext/"> <label class="required">模板标识文字</label>
<input type="hidden" name="ac" value="add" /> <input type="text" id="template" value="" name="template"/>
<input type="hidden" name="submit" value="1" /> </p>
<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="title" value="" name="title"/>
</p> </p>
<p> <p>
<label for="description">介绍</label><br/> <label for="body">模板内容</label><br/>
<textarea id="description" class="small half" name="description" style="width:500px;height:80px;"></textarea> <textarea id="body" class="emailtext" name="body"></textarea>
</p> </p>
<p>
<label for="body">模板内容</label><br/>
<textarea id="body" class="large full" style="width:500px;height:200px;" name="body"></textarea>
<small><a href="javascript:showhelp();">查看说明?</a></small>
</p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
</form>
</section>
<!-- End of Left column/section -->
</div>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/></p>
</fieldset>
</form>
</div> </div>

View File

@ -3,48 +3,38 @@
$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">
<h3>邮件模板编辑</h3>
<!-- Left column/section --> <form name="form" method="post" action="/admin/sys/emailtext/">
<section class="column width6"> <input type="hidden" name="ac" value="edit" />
<input type="hidden" name="submit" value="1" />
<h3>邮件模板编辑</h3> <input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
<form name="form" method="post" action="/admin/sys/emailtext/"> <fieldset>
<input type="hidden" name="ac" value="edit" /> <p>
<input type="hidden" name="submit" value="1" /> <label class="required">模板标识文字</label>
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" /> <input type="text" id="template" value="<?php echo $this->info['template'];?>" name="template"/>
<fieldset> </p>
<p>
<label class="required" for="producttitle">标题</label><br/> <p>
<input type="text" id="producttitle" class="half title" value="<?php echo $this->info['title'];?>" name="title"/> <label class="required">邮件主题</label>
</p> <input type="text" id="title" value="<?php echo $this->info['subject'];?>" name="title"/>
</p>
<p> <p>
<label for="description">介绍</label><br/> <label for="body">模板内容</label><br/>
<textarea id="description" class="small half" name="description" style="width:500px;height:80px;"><?php echo $this->info['description'];?></textarea> <textarea id="body" class="emailtext" name="body"><?php echo $this->info['body'];?></textarea>
</p> </p>
<p>
<label for="body">模板内容</label><br/>
<textarea id="body" class="large full" name="body" style="width:500px;height:200px;"><?php echo $this->info['content'];?></textarea>
<small><a href="javascript:showhelp();">查看说明?</a></small>
</p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
</form>
</section>
<!-- End of Left column/section -->
</div>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
</form>
</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->info['id'];?>" />
<input type="hidden" name="id" value="<?php echo $this->id;?>" /> <fieldset>
<fieldset> <p>
<label for="email" class="required">测试的收信地址</label>
<p> <input type="text" id="email" value="" name="email"/>
<label for="email" class="required">测试的收信地址</label><br/> </p>
<input type="text" id="producttitle" class="half title" value="" name="email"/>
</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>
<p>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p> <label for="body">模板内容</label><br/>
<textarea id="body" class="emailtext" name="body"><?php echo $this->info['body'];?></textarea>
</fieldset> </p>
</form>
</section>
</div>
<p class="box"><input type="submit" id="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
</fieldset>
</form>
</div> </div>

View File

@ -2,16 +2,16 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$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>
<div id="rightPanel"> <div id="rightPanel">
</div>
</div> </div>