主题关键词和时间关键词按照拼音进行排序;调整tag的CSS显示

This commit is contained in:
wlx 2010-07-02 07:01:07 +00:00
parent 7dbd8b5f1b
commit 591532ec43
2 changed files with 4 additions and 4 deletions

View File

@ -161,9 +161,9 @@ class WaterController extends DataController
} else { } else {
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join metadata on keyword.id=metadata.id where keyword.keytype='place' and metadata.source='0595169a-279e-4b95-819f-129d0ba4280d' group by keyword.keyword order by count desc"); $state=$this->db->query("select keyword.keyword,count(*) from keyword left join metadata on keyword.id=metadata.id where keyword.keytype='place' and metadata.source='0595169a-279e-4b95-819f-129d0ba4280d' group by keyword.keyword order by count desc");
$k1=$state->fetchAll(); $k1=$state->fetchAll();
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join metadata m on k.id=m.id where k.keytype='theme' and m.source='0595169a-279e-4b95-819f-129d0ba4280d' group by k.keyword order by count(k.keyword) desc"); $state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join metadata m on k.id=m.id where k.keytype='theme' and m.source='0595169a-279e-4b95-819f-129d0ba4280d' group by k.keyword order by k.keyword");
$k2=$state->fetchAll(); $k2=$state->fetchAll();
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join metadata on keyword.id=metadata.id where keyword.keytype='temporal' and metadata.source='0595169a-279e-4b95-819f-129d0ba4280d' group by keyword.keyword order by count desc"); $state=$this->db->query("select keyword.keyword,count(*) from keyword left join metadata on keyword.id=metadata.id where keyword.keytype='temporal' and metadata.source='0595169a-279e-4b95-819f-129d0ba4280d' group by keyword.keyword order by keyword.keyword");
$k5=$state->fetchAll(); $k5=$state->fetchAll();
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5); $this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
} }

View File

@ -15,9 +15,9 @@ $this->breadcrumb()->setSeparator(' > ');
<h1>当前浏览:<?php echo $this->codename; ?></h1> <h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php echo $this->page->getNavigation(); ?> <?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?> <?php foreach($this->metadata as $md) : ?>
<div class="mditem">
<hr /> <hr />
<div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div> <div class="thumb"><img src="/data/thumb/id/<?php echo $md['id'];?>" /></div>
<div class="mditem">
<h2><a href="/water/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a> <h2><a href="/water/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2> </h2>
@ -41,7 +41,7 @@ if (is_array($kcg) && count($kcg)>0 ) :
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend> <fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
<ul> <ul>
<?php foreach($kcg as $cg) : ?> <?php foreach($kcg as $cg) : ?>
<li><a href='/water/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li> <li><a href='/water/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>