diff --git a/application/admin/views/scripts/index/index.phtml b/application/admin/views/scripts/index/index.phtml index 05cece24..5e7557ee 100755 --- a/application/admin/views/scripts/index/index.phtml +++ b/application/admin/views/scripts/index/index.phtml @@ -23,10 +23,12 @@
  • WATER元数据处理工具
  • 数据测试管理
  • - + + \ No newline at end of file diff --git a/application/default/controllers/IndexController.php b/application/default/controllers/IndexController.php index 8603a1c2..f128ace4 100755 --- a/application/default/controllers/IndexController.php +++ b/application/default/controllers/IndexController.php @@ -85,7 +85,7 @@ class IndexController extends Zend_Controller_Action $this->view->list_news = $rows; - $sql="select * from datadoi where ts_published is not null order by ts_published desc limit 4"; + $sql="select d.*,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4"; $sth = $this->db->query($sql); $this->view->dois = $sth->fetchAll(); diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index dc2c3a05..77723fda 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1387,7 +1387,7 @@ class ServiceController extends Zend_Controller_Action $ris=''; if ($lang=='cn' && !empty($uuid)) { - $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; $row=$this->db->fetchRow($sql); $authors=explode(',',str_replace('"','',substr($row['authors'],1,-1))); $ris.='TY - JOUR'."\r\n"; @@ -1396,7 +1396,7 @@ class ServiceController extends Zend_Controller_Action { $ris.='A1 - '.$a."\r\n"; } - $ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n"; + $ris.='Y1 - '.(empty($row['publish_year'])?date('Y/m/d',strtotime($row['ts_published'])):date('Y/m/d',strtotime($row['publish_year'])))."\r\n"; $ris.='JF - '.$row['publisher']."\r\n"; $ris.='JA - '.$row['publisher']."\r\n"; $ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n"; @@ -1407,7 +1407,7 @@ class ServiceController extends Zend_Controller_Action } else if ($lang=='en' && !empty($uuid)) { - $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; $row=$this->db->fetchRow($sql); $authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1))); $ris.='TY - JOUR'."\r\n"; @@ -1416,7 +1416,7 @@ class ServiceController extends Zend_Controller_Action { $ris.='A1 - '.$a."\r\n"; } - $ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n"; + $ris.='Y1 - '.(empty($row['publish_year'])?date('Y/m/d',strtotime($row['ts_published'])):date('Y/m/d',strtotime($row['publish_year'])))."\r\n"; $ris.='JF - '.$row['publisher_en']."\r\n"; $ris.='JA - '.$row['publisher_en']."\r\n"; $ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n"; @@ -1443,30 +1443,30 @@ class ServiceController extends Zend_Controller_Action $bib=''; if ($lang=='cn' && !empty($uuid)) { - $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; $row=$this->db->fetchRow($sql); $bib.='@article{'.$row['doi'].",\r\n"; $bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['authors'])).",\r\n"; $bib.=' journal = {'.$row['publisher']."},\r\n"; $bib.=' publisher = {'.$row['publisher']."},\r\n"; $bib.=' title = {'.$row['title']."},\r\n"; - $bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n"; - $bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n"; + $bib.=' year = {'.(empty($row['publish_year'])?date('Y',strtotime($row['ts_published'])):date('Y',strtotime($row['publish_year'])))."},\r\n"; + $bib.=' month = {'.(empty($row['publish_year'])?date('m',strtotime($row['ts_published'])):date('m',strtotime($row['publish_year'])))."},\r\n"; $bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n"; $bib.=' doi = {'.$row['doi']."}\r\n"; $bib.="}\r\n"; } else if ($lang=='en' && !empty($uuid)) { - $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; $row=$this->db->fetchRow($sql); $bib.='@article{'.$row['doi'].",\r\n"; $bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['author_en'])).",\r\n"; $bib.=' journal = {'.$row['publisher_en']."},\r\n"; $bib.=' publisher = {'.$row['publisher_en']."},\r\n"; $bib.=' title = {'.$row['title']."},\r\n"; - $bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n"; - $bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n"; + $bib.=' year = {'.(empty($row['publish_year'])?date('Y',strtotime($row['ts_published'])):date('Y',strtotime($row['publish_year'])))."},\r\n"; + $bib.=' month = {'.(empty($row['publish_year'])?date('m',strtotime($row['ts_published'])):date('m',strtotime($row['publish_year'])))."},\r\n"; $bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n"; $bib.=' doi = {'.$row['doi']."}\r\n"; $bib.="}\r\n"; diff --git a/application/default/views/scripts/data/category.phtml b/application/default/views/scripts/data/category.phtml index 9f7ec15f..f84f0b4d 100755 --- a/application/default/views/scripts/data/category.phtml +++ b/application/default/views/scripts/data/category.phtml @@ -26,15 +26,17 @@ $this->nav[] = array('link'=>"/data/category",'title'=>'分类浏览');

    当前浏览:codename; ?>

    page->getNavigation(); ?>
    - page->getNavigation(); ?> diff --git a/application/default/views/scripts/data/offlinelist.phtml b/application/default/views/scripts/data/offlinelist.phtml index 3d5e04bc..b5dbd864 100755 --- a/application/default/views/scripts/data/offlinelist.phtml +++ b/application/default/views/scripts/data/offlinelist.phtml @@ -1,25 +1,27 @@ headTitle($this->config->title->site); $this->headTitle($this->config->title->data); -$this->headTitle('离线数据清单'); +$this->headTitle('离线数据浏览'); $this->headTitle($this->codename); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/metadata.css'); -$this->breadcrumb('首页'); -$this->breadcrumb(''.$this->config->title->data.''); -$this->breadcrumb('离线数据清单'); -$this->breadcrumb()->setSeparator(' > '); +$this->nav[] = array('link'=>"/data/offline",'title'=>'离线数据浏览'); ?>
    +render('breadcrumbs.phtml'); ?> partial('data/tools.phtml'); ?>
    page->getNavigation(); ?>
    metadata as $md) : ?> -
    - escape($md['title']);?> - - +
    + + + +
    +

    escape($md['title']);?>

    +
    ',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?>
    +

    diff --git a/application/default/views/scripts/data/onlinelist.phtml b/application/default/views/scripts/data/onlinelist.phtml index 3455d55e..8ef5b45b 100755 --- a/application/default/views/scripts/data/onlinelist.phtml +++ b/application/default/views/scripts/data/onlinelist.phtml @@ -1,25 +1,27 @@ headTitle($this->config->title->site); $this->headTitle($this->config->title->data); -$this->headTitle('在线数据清单'); +$this->headTitle('在线数据浏览'); $this->headTitle($this->codename); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/metadata.css'); -$this->breadcrumb('首页'); -$this->breadcrumb(''.$this->config->title->data.''); -$this->breadcrumb('在线数据清单'); -$this->breadcrumb()->setSeparator(' > '); +$this->nav[] = array('link'=>"/data/offline",'title'=>'在线数据浏览'); ?>
    +render('breadcrumbs.phtml'); ?> partial('data/tools.phtml'); ?>
    page->getNavigation(); ?>
    metadata as $md) : ?> -
    - escape($md['title']);?> - - +
    + + + +
    +

    escape($md['title']);?>

    +
    ',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?>
    +

    diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 8312db23..1e22c420 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -37,7 +37,7 @@ if ($md->title_en) echo '
    '.$this->escape($md->title_en);?>

    datadoi) && !strpos($md->citation,$md->datadoi)) : ?>

    数据的引用authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi; + echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi; echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']'; ?> (下载引用:RIS格式 | RIS英文格式 | Bibtex格式 | Bibtex英文格式)

    ref) : ?> diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 2b524848..aa89ad72 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -69,12 +69,17 @@ +

    数据服务

    + 最近20条离线数据服务记录(共offlinenum; ?>)
    + 如何申请数据 + 如何发布数据 +
    -

    最新DOI数据

    +

    最新注册DOI数据

    -

    数据服务

    - -最近20条离线数据服务记录(共offlinenum; ?>)
    - -联系我们 - 如何申请数据 - 如何发布数据

    统计