使所有用户都可以查看所有项目,修改doi中作者信息的表单样式

This commit is contained in:
Li Jianxuan 2013-05-27 02:35:41 +00:00
parent 5b8b5082b1
commit 91c5223eef
2 changed files with 66 additions and 22 deletions

View File

@ -1,6 +1,5 @@
<?php <?php
/* /*
@version $Id: AuthorController.php 2012-2-29 15:01 Z @version $Id: AuthorController.php 2012-2-29 15:01 Z
@package author @package author
@copyright Copyright (c) 2012, CAREERI. @copyright Copyright (c) 2012, CAREERI.
@ -2484,8 +2483,8 @@ class AuthorController extends Zend_Controller_Action
//ftp路径 //ftp路径
$homedir = "/disk1/WestDC/upload/".$uuid."/"; $homedir = "/disk1/WestDC/upload/".$uuid."/";
//ftp用户表 //ftp用户表
$ftptable=' pureftp ';//ftp2.westgis.ac.cn $ftptable=' pureftp ';//ftp2.westgis.ac.cn
$uid = 1002; $uid = 1002;
$gid = 1002; $gid = 1002;
@ -3820,7 +3819,7 @@ class AuthorController extends Zend_Controller_Action
$uuid = $this->_getParam('uuid'); $uuid = $this->_getParam('uuid');
if(empty($uuid)) if(empty($uuid))
{ {
$rows = $fund->fetch(0,true,$uid); $rows = $fund->fetch("",true);
view::addPaginator($rows,$this->view,$this->_request); view::addPaginator($rows,$this->view,$this->_request);
}else{ }else{
include('data/Metadata.php'); include('data/Metadata.php');
@ -3846,7 +3845,7 @@ class AuthorController extends Zend_Controller_Action
$this->view->q = $q = $this->_getParam('q'); $this->view->q = $q = $this->_getParam('q');
$id = $this->_getParam('id'); $id = $this->_getParam('id');
$this->view->fund = $fund->view($id); $this->view->fund = $fund->view($id);
$rows = $fund->fetchFormData($id,$uid,$q); $rows = $fund->fetchFormData($id,$q);
view::addPaginator($rows,$this->view,$this->_request); view::addPaginator($rows,$this->view,$this->_request);
return true; return true;
} }

View File

@ -74,13 +74,28 @@ $this->headLink()->appendStylesheet('/css/author.css');
</div> </div>
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?> <?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
<div class="control-group infocontrol" id="info1"> <div class="control-group infocontrol" id="info1">
<label class="control-label" for="">info</label> <label class="control-label" for="">数据作者信息</label>
<div class="controls"> <div class="controls">
<input type="text" name="info[1][author]" value="" placeholder="作者" /> <div class="input-prepend">
<input type="text" name="info[1][organization]" value="" placeholder="单位" /> <span class="add-on">作者</span>
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" /> <input type="text" name="info[1][author]" value="" placeholder="作者" />
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" /> </div>
<input type="text" name="info[1][order]" value="" placeholder="排序" /> <div class="input-prepend">
<span class="add-on">单位</span>
<input type="text" name="info[1][organization]" value="" placeholder="单位" />
</div>
<div class="input-prepend">
<span class="add-on">作者英文</span>
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" />
</div>
<div class="input-prepend">
<span class="add-on">单位英文</span>
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" />
</div>
<div class="input-prepend">
<span class="add-on">排序</span>
<input type="text" name="info[1][order]" value="" placeholder="排序" />
</div>
</div> </div>
</div> </div>
<?php }else{ ?> <?php }else{ ?>
@ -90,13 +105,28 @@ $this->headLink()->appendStylesheet('/css/author.css');
$index ++; $index ++;
?> ?>
<div class="control-group infocontrol"> <div class="control-group infocontrol">
<label class="control-label">info</label> <label class="control-label">数据作者信息</label>
<div class="controls"> <div class="controls">
<input type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" /> <div class="input-prepend">
<input type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" /> <span class="add-on">作者</span>
<input type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" /> <input type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" />
<input type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" /> </div>
<input type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" /> <div class="input-prepend">
<span class="add-on">单位</span>
<input type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" />
</div>
<div class="input-prepend">
<span class="add-on">作者英文</span>
<input type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" />
</div>
<div class="input-prepend">
<span class="add-on">单位英文</span>
<input type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" />
</div>
<div class="input-prepend">
<span class="add-on">排序</span>
<input type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" class="span3" />
</div>
<?php if($index>1){ ?> <?php if($index>1){ ?>
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a> <a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
<?php }?> <?php }?>
@ -131,11 +161,26 @@ function addinput(){
var now_index = $('.infocontrol').length; var now_index = $('.infocontrol').length;
var index = now_index + 1; var index = now_index + 1;
html = '<div class="control-group infocontrol"><div class="controls">' html = '<div class="control-group infocontrol"><div class="controls">'
+ '<input type="text" name="info[' + index + '][author]" placeholder="作者" /> ' + '<div class="input-prepend">'
+ '<input type="text" name="info[' + index + '][organization]" placeholder="单位" /> ' + ' <span class="add-on">作者</span>'
+ '<input type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /> ' + ' <input type="text" name="info[' + index + '][author]" value="" placeholder="作者" />'
+ '<input type="text" name="info[' + index + '][organization_en]" placeholder="单位英文" /> ' + '</div>'
+ '<input type="text" name="info[' + index + '][order]" placeholder="排序" /> ' + '<div class="input-prepend">'
+ ' <span class="add-on">单位</span>'
+ ' <input type="text" name="info[' + index + '][organization]" value="" placeholder="单位" />'
+ '</div>'
+ '<div class="input-prepend">'
+ ' <span class="add-on">作者英文</span>'
+ ' <input type="text" name="info[' + index + '][author_en]" value="" placeholder="作者英文" />'
+ '</div>'
+ '<div class="input-prepend">'
+ ' <span class="add-on">单位英文</span>'
+ ' <input type="text" name="info[' + index + '][organization_en]" value="" placeholder="单位英文" />'
+ '</div>'
+ '<div class="input-prepend">'
+ ' <span class="add-on">排序</span>'
+ ' <input type="text" name="info[' + index + '][order]" value="" placeholder="排序" />'
+ '</div>'
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>' + '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
+ '</div></div>'; + '</div></div>';
now_index = null; now_index = null;