diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index bc846292..e9fb3b0a 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -38,7 +38,7 @@ class AuthorController extends Zend_Controller_Action { $this->view->pageID = "author-index"; $archives=new Archive($this->db); - $this->view->item=$archives->getOneArchive('数据作者介绍','help'); + $this->view->item=$archives->getOneArchive('How to submit data into CARD','help'); } @@ -75,7 +75,7 @@ class AuthorController extends Zend_Controller_Action if(empty($ac) || $ac=="online" || $ac == "searchonline") { $sql = "SELECT o.id,o.userid,o.unit,o.username,o.ts_created,o.project,m.title,m.uuid FROM onlineapp as o - LEFT JOIN metadata as m ON o.uuid=m.uuid + LEFT JOIN en.metadata as m ON o.uuid=m.uuid LEFT JOIN mdauthor as a ON a.uuid=o.uuid WHERE (o.id in (SELECT distinct(onlineappid) from dataorder where status>=0)) AND a.userid = ? AND a.status=1"; if ($ac=="searchonline") @@ -117,13 +117,13 @@ class AuthorController extends Zend_Controller_Action if(!preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid)) { - echo "参数有误!";exit(); + echo "Wrong parameter!";exit(); } //如果用户已经下载过了,就无法在更改对数据申请的意见 $sql = "select md.title,d.uuid,d.status as datastatus,d.authorpermitted from dataorder d left join offlineapp o on o.id=d.offlineappid - left join metadata md on md.uuid=d.uuid + left join en.metadata md on md.uuid=d.uuid left join mdauthor a on a.uuid=d.uuid where o.ts_approved is null and o.pdflink is not null and d.uuid=? and a.userid=? and d.id=? AND a.status=1 @@ -135,12 +135,12 @@ class AuthorController extends Zend_Controller_Action if($row['datastatus']>4) { - echo "该申请已经通过并且发放数据"; + echo "Order has been approved."; exit(); } else if (empty($row) || $row['datastatus']!=4) { - echo "该数据申请存在问题,请联系数据中心!"; + echo "Problems found, please contact CARD via email."; exit(); } @@ -152,7 +152,7 @@ class AuthorController extends Zend_Controller_Action if($sth->execute(array($uuid,$oid))) { //发送相关邮件给数据中心服务人员 - $sql="select m.title,a.username from dataorder o left join metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?"; + $sql="select m.title,a.username from dataorder o left join en.metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?"; $sth = $this->db->prepare($sql); $sth->execute(array($oid)); $row = $sth->fetch(); @@ -341,10 +341,10 @@ class AuthorController extends Zend_Controller_Action $baseStyle = "btn box-shadow"; $selectedStyle = "disabled"; - $confrimText = "同意"; + $confrimText = "Agree"; $confrimFunc = 'onclick="confirm(\''.$uuid.'\',\''.$oid.'\')"'; - $objectionText = "反对"; + $objectionText = "NOT Agree"; $objectionFunc = 'onclick="objection(\''.$uuid.'\',\''.$oid.'\')"'; $btns=''; @@ -396,10 +396,10 @@ class AuthorController extends Zend_Controller_Action //列表 if(empty($ac) || $ac=='list' || $ac=='search'){ - $sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus FROM normalmetadata m + $sql = "SELECT a.*,m.title,m.description,g.id as gid,mds.status as mdstatus FROM en.normalmetadata m LEFT JOIN mdauthor a ON m.uuid=a.uuid - LEFT JOIN geonetworkmetadata g on m.uuid=g.uuid - LEFT JOIN mdstatus mds ON m.uuid=mds.uuid + LEFT JOIN en.geonetworkmetadata g on m.uuid=g.uuid + LEFT JOIN en.mdstatus mds ON m.uuid=mds.uuid WHERE a.userid=? AND a.status>=0 "; if ($ac=='search') { @@ -433,7 +433,7 @@ class AuthorController extends Zend_Controller_Action try{ $sql = "SELECT a.id,a.activation,a.ts_created,a.ts_activated,md.title,a.uuid,u.id as userid,u.realname,u.email FROM mdauthor a - LEFT JOIN metadata md ON a.uuid=md.uuid + LEFT JOIN en.metadata md ON a.uuid=md.uuid LEFT JOIN users u ON a.userid=u.id WHERE a.activation=?"; @@ -2236,8 +2236,8 @@ class AuthorController extends Zend_Controller_Action //查看属于自己的所有的未提交数据列表 else if((empty($ac) && empty($uuid))|| $ac=='list') { - $sql = "SELECT (regexp_matches(gn.data,'(.*)'))[1] as title,gn.id,gn.uuid FROM geonetworkmetadata gn - WHERE gn.uuid not in (select uuid from metadata) and gn.owner=? + $sql = "SELECT (regexp_matches(gn.data,'(.*)'))[1] as title,gn.id,gn.uuid FROM en.geonetworkmetadata gn + WHERE gn.uuid not in (select uuid from en.metadata) and gn.owner=? order by gn.id desc "; $sth = $this->db->prepare($sql); @@ -2286,8 +2286,8 @@ class AuthorController extends Zend_Controller_Action else if($ac=="add-by-data") { $keywords = $this->_request->getParam('q'); - $sql = "SELECT md.title,md.uuid,md.description,gn.id as gid FROM normalmetadata md - left join geonetworkmetadata gn on md.uuid=gn.uuid + $sql = "SELECT md.title,md.uuid,md.description,gn.id as gid FROM en.normalmetadata md + left join en.geonetworkmetadata gn on md.uuid=gn.uuid WHERE gn.id is not null"; if(!empty($keywords)) { @@ -2320,7 +2320,7 @@ class AuthorController extends Zend_Controller_Action $id = $this->_request->getParam('id'); if(empty($id) || !is_numeric($id)) { - $data = array("error"=>"参数错误"); + $data = array("error"=>"Wrong parameter"); $this->jsonexit($data); return true; } @@ -2328,15 +2328,15 @@ class AuthorController extends Zend_Controller_Action $changelog = $this->_request->getParam('changelog'); if(empty($changelog)) { - $data = array("error"=>$this->alertbox('warning','请输入变更信息')); + $data = array("error"=>$this->alertbox('warning','Please add log:')); $this->jsonexit($data); return true; } // 1. 权限认定:当前用户必须和其owner相同 // 数据应当没有评审状态,没有作者信息 - $sql="select gn.id from geonetworkmetadata gn - left join mdstatus s on gn.uuid=s.uuid + $sql="select gn.id from en.geonetworkmetadata gn + left join en.mdstatus s on gn.uuid=s.uuid left join mdauthor a on s.uuid=a.uuid where s.id is not null and a.id is not null and gn.id=?"; $sth=$this->db->prepare($sql); @@ -2349,13 +2349,13 @@ class AuthorController extends Zend_Controller_Action return true; } - $sql="select uuid,data from metadata where id=? and owner=?"; + $sql="select uuid,data from en.metadata where id=? and owner=?"; $sth=$this->wdb->prepare($sql); $sth->execute(array($id,$u_id)); $row=$sth->fetch(); if (empty($row)) { - $data = array("error"=>'无权限修改数据'); + $data = array("error"=>'No edit rights.'); $this->jsonexit($data); return true; } @@ -2364,7 +2364,7 @@ class AuthorController extends Zend_Controller_Action @$iso->loadXML($row['data']); if ($iso->validate()) { - $data=array("error"=>"元数据导入过程中发现错误。
".implode("
",$iso->error)); + $data=array("error"=>"Errors found in import metadata.
".implode("
",$iso->error)); $this->jsonexit($data); return true; } diff --git a/application/default/views/scripts/author/index.phtml b/application/default/views/scripts/author/index.phtml index 74867fcf..08e8cb9a 100755 --- a/application/default/views/scripts/author/index.phtml +++ b/application/default/views/scripts/author/index.phtml @@ -4,7 +4,7 @@ $this->headTitle($this->config->title->author); $this->headTitle()->setSeparator(' - '); $this->headScript()->appendFile('/js/jquery-1.7.min.js'); $this->headLink()->appendStylesheet('/css/author.css'); -$this->breadcrumb('首页'); +$this->breadcrumb('Home'); $this->breadcrumb($this->config->title->author); $this->breadcrumb()->setSeparator(' > '); ?> diff --git a/application/default/views/scripts/author/navi.phtml b/application/default/views/scripts/author/navi.phtml index 7aa38b97..6a630ae1 100644 --- a/application/default/views/scripts/author/navi.phtml +++ b/application/default/views/scripts/author/navi.phtml @@ -1,20 +1,22 @@ \ No newline at end of file diff --git a/application/default/views/scripts/author/newdata-add-bydata.phtml b/application/default/views/scripts/author/newdata-add-bydata.phtml index 42130ffa..2fb3a968 100644 --- a/application/default/views/scripts/author/newdata-add-bydata.phtml +++ b/application/default/views/scripts/author/newdata-add-bydata.phtml @@ -4,9 +4,9 @@ $this->headTitle($this->config->title->author); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/author.css'); $this->theme->AppendPlus($this,'colorbox'); -$this->breadcrumb('首页'); -$this->breadcrumb('数据作者'); -$this->breadcrumb('新建数据'); +$this->breadcrumb('Home'); +$this->breadcrumb('Author'); +$this->breadcrumb('Submit data'); $this->breadcrumb()->setSeparator(' > '); ?>
@@ -17,19 +17,19 @@ $this->breadcrumb()->setSeparator(' > ');
-

根据已有数据创建元数据

+

Create new metadata with existed metadata

- +
breadcrumb()->setSeparator(' > '); ?>
  • -

    以此为模板新建 - | 查看数据

    +

    [Create new metadata based on this data + | View data]

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

  • breadcrumb()->setSeparator(' > ');
    -

    根据预制元数据模板创建数据

    +

    Create new metadata with templates

    - +
    headTitle($this->config->title->author); $this->headTitle()->setSeparator(' - '); $this->theme->AppendPlus($this,'colorbox'); $this->headLink()->appendStylesheet('/css/author.css'); -$this->breadcrumb('首页'); +$this->breadcrumb('Home'); $this->breadcrumb(''.$this->config->title->author.''); -$this->breadcrumb('新建数据'); +$this->breadcrumb('Submit data'); $this->breadcrumb()->setSeparator(' > '); ?>
    @@ -17,10 +17,10 @@ $this->breadcrumb()->setSeparator(' > ');
    @@ -34,18 +34,18 @@ $this->breadcrumb()->setSeparator(' > '); ?>
  • - 【在geonetwork里查看 - | 在geonetwork里修改 - | 删除此条数据 - | FTP数据上传 - | 提交评审发布 + 【View in GeoNetwork + | Edit in GeoNetwork + | Delete + | Upload data via FTP (get account) + | Submit for review

  • "; else : - echo "

    您当前没有未提交的数据。

    "; + echo "

    No unsubmitted data now.

    "; endif; ?>
    @@ -68,12 +68,12 @@ function action(ac,id){ {$('#changelog').val('');$('#commit_submit').attr('onclick','');} } else{ - $.colorbox({'innerWidth':'50%','html':'

    出现错误,请稍候再试

    '}); + $.colorbox({'innerWidth':'50%','html':'

    Error occupied, please try again later

    '}); } }, 'timeout': 30000, 'error': function(){ - $.colorbox({'innerWidth':'50%','html':'

    处理中出现错误,请刷新页面后重试

    '}); + $.colorbox({'innerWidth':'50%','html':'

    Errors occupied in processing, please try again later.

    '}); } }); } @@ -96,21 +96,21 @@ function getFtp(uuid){ { if(data.statu > 0) { - var html = '

    临时FTP帐号信息(此帐号仅对应当前数据集!)

    ftp://ftp2.westgis.ac.cn/

    '+ - '

    用户名:'+data.user+ - '

    密码:'+data.passwd+'

    ' - +'

    或直接点击此链接

    '; + var html = '

    Your FTP account(just upload this data!)

    ftp://ftp2.westgis.ac.cn/

    '+ + '

    username:'+data.user+ + '

    password:'+data.passwd+'

    ' + +'

    Direct connect

    '; Alert(html); } } } else{ - Alert('出现错误,请稍候再试'); + Alert('errors'); } }, 'timeout': 30000, 'error': function(){ - Alert('处理中出现错误,请刷新页面后重试'); + Alert('errors'); } }); } @@ -122,11 +122,11 @@ function Alert(html){

    -
    +
    -
    请输入此数据的简要功能和特色 +
    Please describe the dataset briefly

    - +
    diff --git a/application/default/views/scripts/header.phtml b/application/default/views/scripts/header.phtml index 080f475e..3bc2110c 100755 --- a/application/default/views/scripts/header.phtml +++ b/application/default/views/scripts/header.phtml @@ -23,8 +23,8 @@