修改简化元数据提交的操作步骤

This commit is contained in:
Li Jianxuan 2013-01-25 09:34:52 +00:00
parent ebb2731619
commit 385404e47c
3 changed files with 87 additions and 25 deletions

View File

@ -37,12 +37,34 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div class="">
<?php if(empty($this->error)) { ?>
<div class="step_ctl">
<ul>
<li>
<a href="javascript:void(0);" onclick="jumpstep(1)">
<div class="title">Step1</div>
<div class="description">元数据基本信息</div>
</a>
</li>
<li>
<a href="javascript:void(0);" onclick="jumpstep(2)">
<div class="title">Step2</div>
<div class="description">时空范围</div>
</a>
</li>
<li>
<a href="javascript:void(0);" onclick="jumpstep(3)">
<div class="title">Step3</div>
<div class="description">元数据基本信息</div>
</a>
</li>
</ul>
</div>
<?php if(!empty($this->uuid)) {
$F = array();
}?>
<form class="form-horizontal well" id="metadata_temp_value" action="/author/metadata/ac/save" method="post">
<input type="hidden" id="temp_uuid" name="uuid" value="<?= empty($this->uuid) ? "":$this->uuid ?>" />
<div class="stepy_content" id="step_content_1">
<fieldset>
<p class="f_legend">元数据基本信息</p>
<div class="control-group">
@ -69,16 +91,14 @@ $this->breadcrumb()->setSeparator(' > ');
<span class="help-block">概括元数据内容</span>
</div>
</div>
<?php if(empty($this->uuid)) { ?>
<div class="control-group" id="next_step_button" >
<div class="controls">
<button type="button" onclick="save()" class="btn btn-green">下一步</button>
</div>
</div>
<?php } ?>
</fieldset>
<div id="form_part_b" <?= empty($this->uuid) ? 'style="display:none;"':"" ?>>
</div>
<div class="stepy_content" id="step_content_2" style="display:none;">
<fieldset>
<p class="f_legend">时间范围</p>
<div class="control-group">
@ -140,7 +160,8 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
</fieldset>
</div>
<div class="stepy_content" id="step_content_3" style="display:none;">
<fieldset>
<p class="f_legend">数据引用方式</p>
<div class="control-group">
@ -280,8 +301,13 @@ $(function() {
InputTextSet();
});
// Metadata Commit Part
//FormStep
function jumpstep(id){
$('.stepy_content').css('display','none');
$('#step_content_'+id).css("display","block");
}
// Metadata Commit Part
function getValue(){
return $('#metadata_temp_value').serialize();
}

View File

@ -29,29 +29,15 @@ class Users extends Zend_Controller_Plugin_Abstract
'action'=> 'authority'
);
//所有权限
public $AuthResource = NULL; //资源
function __construct($db,Zend_Auth $auth=NULL)
{
$this->db = $db;
$this->auth = $auth;
}
//获取用户的组ID
public function getGroup($uid=0){
if(!empty($uid) && is_numeric($uid))
{
$sql = "SELECT gid FROM ".$this->tbl_userToGroup." WHERE uid=$uid";
$rs = $this->db->query($sql);
$row = $rs->fetch();
return $row['gid'];
}else{
$select = $this->db->select();
return $select ->from($this->tbl_group)
->order('groups.id desc');
}
}
//检查权限仅在MVC模式中使用
public function CheckInMvc(Zend_Auth $auth,Zend_Controller_Request_Abstract $request,$special=""){
@ -256,6 +242,23 @@ class Users extends Zend_Controller_Plugin_Abstract
}
//获取用户的组ID
public function getGroup($uid=0){
if(!empty($uid) && is_numeric($uid))
{
$sql = "SELECT gid FROM ".$this->tbl_userToGroup." WHERE uid=$uid";
$rs = $this->db->query($sql);
$row = $rs->fetch();
return $row['gid'];
}else{
$select = $this->db->select();
return $select ->from($this->tbl_group)
->order('groups.id desc');
}
}
//获取组名
public function getGroupName($gid){
@ -320,6 +323,33 @@ class Users extends Zend_Controller_Plugin_Abstract
);
return $this->db->insert($this->tbl_userToGroup,$data);
}
}
//初始化所有权限
public function _initAuth()
{
$this->AuthResource = array(
"default" => array(
"data"=> array(
"index","view"
)
),
"admin"=>array(
"data"=>array("index"),
"user"=>array("index","auth","group")
)
);
}
//给用户添加权限
public function UAuthAdd($uid,$options)
{
}
//给用户组添加权限
public function GAuthAdd($gid,$options)
{
}

View File

@ -75,3 +75,9 @@ textarea {resize: none}
.auto-complete-elements ul li{line-height:18px; cursor:pointer;height:18px; overflow:hidden;border:1px solid #FFF;}
.auto-complete-elements ul li:hover{height:18px;line-height:18px; border:1px solid #dedede;}
.auto-complete-elements .close-btn{height:18px;line-height:18px;border:1px solid #ccc;cursor:pointer; text-align:center}
.step_ctl{width:100%;overflow:hidden;}
.step_ctl ul{width:100%;overflow:hidden;}
.step_ctl ul li{float:left;height:60px;width:160px;overflow:hidden;cursor:pointer;}
.step_ctl ul li .title{text-align:left;height:40px;line-height:40px;font-size:26px;}
.step_ctl ul li .description{height:20px;line-height:20px;font-size:16px;}