Ticket #189 增加了附件管理的视图
This commit is contained in:
parent
f409094c0e
commit
67b25445d1
|
@ -0,0 +1,74 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$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">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?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="rightPanel">
|
||||||
|
<div><a href="/admin/data/attachments/add/1">上传新附件</a> | <a href="attachments/search/my">查看我的附件</a></div>
|
||||||
|
|
||||||
|
<div class="search">
|
||||||
|
<form action="" method="get">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<ul>
|
||||||
|
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||||
|
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
</div><!-- search DIV -->
|
||||||
|
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<table>
|
||||||
|
<thead><tr>
|
||||||
|
<th width='300'>描述</th>
|
||||||
|
<th width='100'>类型</th>
|
||||||
|
<th width='100'>上传时间</th>
|
||||||
|
<th width="150">操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $autoindex=0;?>
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<?php $autoindex++;?>
|
||||||
|
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
||||||
|
<td><?php echo $item['filedesc'] ;?></td>
|
||||||
|
<td><?php
|
||||||
|
if($item['filetype']=='image') echo '图片' ;
|
||||||
|
if($item['filetype']=='file') echo '文件' ;
|
||||||
|
if($item['filetype']=='media') echo '多媒体' ;
|
||||||
|
?></td>
|
||||||
|
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/data/attachments/edit/<?= $item['id']; ?>?">编辑</a> |
|
||||||
|
<a href="/admin/data/attachments/delete/<?= $item['id']; ?>?" onclick="return confirm('是否确定删除该附件?')">删除</a> |
|
||||||
|
<a href="/admin/data/attachments/down/<?= $item['id']; ?>?">下载</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody></table>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div style="width:50%;text-align:left;">
|
||||||
|
<?= $this->paginator; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||||
|
$this->headLink()->appendStylesheet('/js/swfupload/swfupload.css');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
|
$this->breadcrumb('数据管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->headScript()->appendFile('/js/swfupload/swfupload.js');
|
||||||
|
$this->headScript()->appendFile('/js/swfupload/handlers.js');
|
||||||
|
$this->headScript()->appendFile('/js/swfupload/fileprogress.js');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div id="divContent">
|
||||||
|
<div id="leftPanel">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?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="rightPanel">
|
||||||
|
|
||||||
|
<form action="#" method="POST" enctype='multipart/form-data'>
|
||||||
|
<input type="hidden" name="add" value="1" />
|
||||||
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
<input type="hidden" name="edit" value="<?php echo $this->info['id'];?>" />
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="100">文件描述</td>
|
||||||
|
<td><textarea name="filedesc" style="width:300px;"><?php echo $this->info['filedesc'];?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>文件类型</td>
|
||||||
|
<td>
|
||||||
|
<select name="dir" style="width:100px;" <?php if(!empty($this->info['filename'])) echo 'disabled="disabled"';?>>
|
||||||
|
<option value="image" <?php if($this->info['filetype']=='image') echo 'selected="selected"'; ?>>图片</option>
|
||||||
|
<option value="file" <?php if($this->info['filetype']=='file') echo 'selected="selected"'; ?>>文件</option>
|
||||||
|
<option value="media" <?php if($this->info['filetype']=='media') echo 'selected="selected"'; ?>>媒体</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>文件</td>
|
||||||
|
<td>
|
||||||
|
<?php if(empty($this->info['filename']))
|
||||||
|
echo '<input type="file" name="Filedata" id="file" />';
|
||||||
|
else
|
||||||
|
echo '<input style="width:300px;" type="text" readonly="readonly" value="'.$this->info['filename'].'" />';
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<input type="submit" name="submit" value="<?php if(empty($this->info['filename'])) echo "上传";else echo "修改";?>" />
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -10,4 +10,6 @@
|
||||||
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
|
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
|
||||||
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
|
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
|
||||||
<li><a href="/admin/data/feature">特色推荐</a></li>
|
<li><a href="/admin/data/feature">特色推荐</a></li>
|
||||||
|
<li><a href="/admin/data/source">项目来源管理</a></li>
|
||||||
|
<li><a href="/admin/data/attachments">附件管理</a></li>
|
||||||
</ul>
|
</ul>
|
Loading…
Reference in New Issue