diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php
index a8f1883c..f32f16e9 100755
--- a/application/admin/controllers/DataController.php
+++ b/application/admin/controllers/DataController.php
@@ -2389,11 +2389,11 @@ class Admin_DataController extends Zend_Controller_Action
$this->view->url='metadata.show?id='.$id;
$this->_helper->viewRenderer('newdata-view');
}
- //查看属于自己的所有的未提交数据列表
+ //查看所有的未提交数据列表
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=?
+ WHERE gn.uuid not in (select uuid from metadata)
order by gn.id desc
";
$sth = $this->db->prepare($sql);
@@ -2491,23 +2491,8 @@ class Admin_DataController extends Zend_Controller_Action
// 1. 权限认定:当前用户必须和其owner相同
// 数据应当没有评审状态,没有作者信息
- $sql="select gn.id from geonetworkmetadata gn
- left join 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);
- $sth->execute(array($id));
- $row=$sth->fetch();
- if (!empty($row))
- {
- $data = array("error"=>'错误的入口');
- $this->jsonexit($data);
- return true;
- }
// 保存数据作者信息
- $sql="insert into mdauthor (uuid,userid,ts_activated,status) values(?,?,now(),1)";
- $this->db->query($sql,array($row['uuid'],$u_id));
// 2. 保存变化记录 save changelog & userid for the latest version
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid=? order by ts_created desc limit 1)";
@@ -2540,30 +2525,7 @@ class Admin_DataController extends Zend_Controller_Action
$mail->addTo($this->debug_email);
}
$mail->send();
-
- unset($mail);
- unset($mailtp);
- //email to author
- $mail=new WestdcMailer($this->view->config->smtp);
- $mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
- $mailtp=new EmailText($this->db,"metadata-new-author",array(
- 'user' => $user->username,
- 'uuid' => $iso->uuid,
- 'email'=> $user->email,
- //元数据标题
- 'title'=> $iso->resTitle,
- ));
- $mail->setBodyText($mailtp->getBody());
- $mail->setSubject($mailtp->getSubject());
- if($this->debug==0)
- {
- $mail->addTo($user->email);
- $mail->addCc($this->view->config->service->email);
- }else{
- $mail->addTo($this->debug_email);
- }
- @$mail->send();
-
+
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!'));
$this->jsonexit($data);
return true;
diff --git a/application/admin/views/scripts/data/newdata-add-bydata.phtml b/application/admin/views/scripts/data/newdata-add-bydata.phtml
new file mode 100644
index 00000000..769bc74c
--- /dev/null
+++ b/application/admin/views/scripts/data/newdata-add-bydata.phtml
@@ -0,0 +1,63 @@
+headTitle($this->config->title->site);
+$this->headTitle('后台管理');
+$this->headTitle()->setSeparator(' - ');
+$this->headScript()->appendFile('/js/jquery-1.7.min.js');
+$this->headLink()->appendStylesheet('/css/author.css');
+$this->headLink()->appendStylesheet('/css/admin.css');
+$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
+$this->headLink()->appendStylesheet('/css/colorbox.css');
+$this->breadcrumb('首页');
+$this->breadcrumb('后台首页');
+$this->breadcrumb('数据管理');
+$this->breadcrumb('新建元数据');
+$this->breadcrumb()->setSeparator(' > ');
+?>
+
+
+ = $this->partial('data/left.phtml'); ?>
+
+
+
+
+
+
+
+
+
根据已有数据创建元数据
+
+ paginator)):
+ echo "
";
+ $autoindex=0;
+ foreach ($this->paginator as $item):
+ $autoindex++;
+ ?>
+ -
+
+ 【以此为模板新建
+ | 查看数据】
+ 400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?>
+
+ ";
+ endif; ?>
+
+
= $this->paginator; ?>
+
+
+
\ No newline at end of file
diff --git a/application/admin/views/scripts/data/newdata-add.phtml b/application/admin/views/scripts/data/newdata-add.phtml
new file mode 100644
index 00000000..4d5f7fd1
--- /dev/null
+++ b/application/admin/views/scripts/data/newdata-add.phtml
@@ -0,0 +1,64 @@
+headTitle($this->config->title->site);
+$this->headTitle('后台管理');
+$this->headTitle()->setSeparator(' - ');
+$this->headScript()->appendFile('/js/jquery-1.7.min.js');
+$this->headLink()->appendStylesheet('/css/author.css');
+$this->headLink()->appendStylesheet('/css/admin.css');
+$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
+$this->headLink()->appendStylesheet('/css/colorbox.css');
+$this->breadcrumb('首页');
+$this->breadcrumb('后台首页');
+$this->breadcrumb('数据管理');
+$this->breadcrumb('新建元数据');
+$this->breadcrumb()->setSeparator(' > ');
+?>
+
+
+ = $this->partial('data/left.phtml'); ?>
+
+
+
+
+
+
+
+
+
根据预制元数据模板创建数据
+
+ paginator)):
+ echo "
+
= $this->paginator; ?>
+
+
+
\ No newline at end of file
diff --git a/application/admin/views/scripts/data/newdata.phtml b/application/admin/views/scripts/data/newdata.phtml
new file mode 100644
index 00000000..9e232652
--- /dev/null
+++ b/application/admin/views/scripts/data/newdata.phtml
@@ -0,0 +1,107 @@
+headTitle($this->config->title->site);
+$this->headTitle('后台管理');
+$this->headTitle()->setSeparator(' - ');
+$this->headScript()->appendFile('/js/jquery-1.7.min.js');
+$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
+$this->headLink()->appendStylesheet('/css/author.css');
+$this->headLink()->appendStylesheet('/css/admin.css');
+$this->headLink()->appendStylesheet('/css/colorbox.css');
+$this->breadcrumb('首页');
+$this->breadcrumb('后台首页');
+$this->breadcrumb('数据管理');
+$this->breadcrumb('新建元数据');
+$this->breadcrumb()->setSeparator(' > ');
+?>
+
+
+ = $this->partial('data/left.phtml'); ?>
+
+
+
+
+
+
+
+
+
= $this->paginator; ?>
+
+
+
+
\ No newline at end of file