修改后台部分模板,修改前台可视化数据列表中得bug

This commit is contained in:
Li Jianxuan 2014-06-11 01:22:47 +00:00
parent 697dbe4529
commit 3db3e3d690
7 changed files with 2685 additions and 2740 deletions

View File

@ -3,28 +3,15 @@
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js'); $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>'); $this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>'); $this->breadcrumb('<a href="/admin/news">新闻中心</a>');
?> ?>
<style> <div class="row-fluid">
.listingDetails{position:absolute;width:650px; z-index:999;} <div class="span3">
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;} <?= $this->partial('news/left.phtml'); ?>
</style> </div>
<div id="leftPanel"> <div class="span9">
<?= $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; ?>
<h3>统计</h3> <h3>统计</h3>
<hr/> <hr/>
@ -33,6 +20,7 @@
<li>栏目 <?php echo $this->typec['c'];?></li> <li>栏目 <?php echo $this->typec['c'];?></li>
</ul> </ul>
</div> </div>
</div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
$('.title').bind('click', function() { $('.title').bind('click', function() {

View File

@ -2,37 +2,28 @@
$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->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>'); $this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>'); $this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('新闻列表'); $this->breadcrumb('新闻列表');
?> ?>
<style> <div class="row-fluid">
.listingDetails{position:absolute;width:650px;} <div class="span3">
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;z-index:9999;} <?= $this->partial('news/left.phtml'); ?>
</style> </div>
<script>
$('#divFooter').css('position','absolute'); <div class="span9">
</script> <?php if ($this->msg or $this->messages) :?>
<div id="leftPanel"> <div id="message">
<?= $this->partial('news/left.phtml'); ?> <?php if ($this->msg) : ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p> <p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?> <?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p> <p><?php echo $msg; ?></p>
<?php endforeach;endif; ?> <?php endforeach;endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div> <div>
<select id="navigation"> <select id="navigation">
<option>按栏目查看</option> <option>按栏目查看</option>
<?php <?php
if(count($this->types)) if(count($this->types))
@ -49,11 +40,11 @@ $('#divFooter').css('position','absolute');
} }
} }
?> ?>
</select> </select>
&nbsp; &nbsp;
<a href="/admin/news/newslist">所有新闻列表</a> <a href="/admin/news/newslist">所有新闻列表</a>
</div> </div>
<table id="report" class="stylized full"> <table id="report" class="table table-hover">
<thead> <thead>
<tr> <tr>
<th width="50%">新闻标题</th> <th width="50%">新闻标题</th>
@ -113,20 +104,7 @@ $('#divFooter').css('position','absolute');
?> ?>
</tbody> </tbody>
</table> </table>
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div> </div>
<script type="text/javascript">
$(document).ready(function(){
$('.title').bind('click', function() {
$.colorbox({'innerWidth':'50%','html':$(this).next('.listingDetails').children('.pad').html()});
});
$("#navigation").change(function()
{
window.location.href = $(this).val();
});
});
function showpad(id){
$('#titlebtn'+id).click();
}
</script>

View File

@ -2317,9 +2317,7 @@ order by m.title";
public function visualAction() public function visualAction()
{ {
$visual = new \Westdc\Visual\Visual; $visual = new \Westdc\Visual\Visual;
view::addPaginator($visual->getVisualMetadata(),$this,10); view::addPaginator($visual->getVisualMetadata(),$this,10);
return true; return true;
} }
} }

View File

@ -13,7 +13,9 @@
请输入用户名和密码登录 请输入用户名和密码登录
</div> </div>
<? }else{ ?> <? }else{ ?>
<div class="alert alert-error">
<?= $this->error ?> <?= $this->error ?>
</div>
<?php } ?> <?php } ?>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="username">用户名</label> <label class="control-label" for="username">用户名</label>

View File

@ -7,5 +7,6 @@
<!-- <li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li> --> <!-- <li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li> -->
<li><a href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li> <li><a href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li>
<li><a href="/data/browse"><i class="icon-align-justify"></i>全部浏览</a></li> <li><a href="/data/browse"><i class="icon-align-justify"></i>全部浏览</a></li>
<li><a href="/data/browse"><i class="icon-align-justify"></i>可视化数据</a></li>
<!-- <li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li> --> <!-- <li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li> -->
</ul> </ul>

View File

@ -4,16 +4,15 @@ $this->headTitle($this->config->title->data);
if (!empty($this->codename)) $this->headTitle($this->codename); if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css'); $this->headLink()->appendStylesheet('/css/metadata.css');
$this->nav[] = array('link'=>"/data/tag",'title'=>'关键词浏览'); $this->nav[] = array('link'=>"/data/visual",'title'=>'可视化数据列表');
$this->theme->AppendPlus($this,'colorbox'); $this->theme->AppendPlus($this,'colorbox');
?> ?>
<div id='row-fluid'> <div class="row-fluid">
<?= $this->render('breadcrumbs.phtml') ?> <?= $this->render('breadcrumbs.phtml') ?>
<?= $this->partial('data/tools.phtml'); ?> <?= $this->partial('data/tools.phtml'); ?>
</div> </div>
<?php if (!empty($this->paginator)) : ?> <?php if (!empty($this->paginator)) : ?>
<div id='metacontent'> <div id='metacontent'>
<h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php echo $this->paginator; ?> <?php echo $this->paginator; ?>
<hr /> <hr />
<?php foreach($this->paginator as $md) : ?> <?php foreach($this->paginator as $md) : ?>
@ -29,27 +28,6 @@ $this->theme->AppendPlus($this,'colorbox');
<?php endforeach; ?> <?php endforeach; ?>
<?php echo $this->paginator; ?> <?php echo $this->paginator; ?>
</div> </div>
<?php else : ?>
<div id='leftnav'>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
$type='';
foreach($this->keywords as $cg) :
if ($type!=$cg['keytype']) :
if ($type!='') : ?>
</ul></fieldset>
<?php endif;
$type=$cg['keytype'];
?>
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php else : ?>
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</fieldset></div>
<?php endif; ?> <?php endif; ?>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){

View File

@ -103,9 +103,9 @@ class Visual
{ {
$sql = "SELECT * FROM metadata md $sql = "SELECT * FROM metadata md
LEFT JOIN {$this->mainTable} v ON v.uuid = md.uuid LEFT JOIN {$this->mainTable} v ON v.uuid = md.uuid
WHERE v.uuid IS NOT NULL WHERE v.uuid IS NOT NULL";
";
$rs = $this->db->query($sql); $rs = $this->db->query($sql);
return $rs->fetch(\PDO::FETCH_ASSOC); return $rs->fetchAll(\PDO::FETCH_ASSOC);
} }
} }