doi add page js code update

This commit is contained in:
Li Jianxuan 2013-04-22 15:12:11 +00:00
parent 01caf6d884
commit 113682bfb7
2 changed files with 3767 additions and 3739 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +1,118 @@
<?php <?php
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author); $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/admin.css'); //$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>'); $this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('DOI'); $this->breadcrumb('DOI');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox'); $this->theme->AppendPlus($this,'colorbox');
?> ?>
<div class="row-fluid"> <div class="row-fluid">
<div class="span2"> <div class="span2">
<?= $this->partial('data/left.phtml'); ?> <?= $this->partial('data/left.phtml'); ?>
</div> </div>
<div class="span10"> <div class="span10">
<div> <div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="/admin/data/doi">浏览所有</a></li> <li><a href="/admin/data/doi">浏览所有</a></li>
<?php if(!empty($this->uuid)) {?> <?php if(!empty($this->uuid)) {?>
<li class="active"><a href="javascript:void(0);">编辑DOI</a></li> <li class="active"><a href="javascript:void(0);">编辑DOI</a></li>
<?php }else{ ?> <?php }else{ ?>
<li class="active"><a href="/admin/data/doi/ac/add">添加新DOI</a></li> <li class="active"><a href="/admin/data/doi/ac/add">添加新DOI</a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</div> </div>
<div class=""> <div class="">
<?php if(!empty($this->error)) { ?> <?php if(!empty($this->error)) { ?>
<?= $this->error ?> <?= $this->error ?>
<?php } ?> <?php } ?>
<?php if(!empty($this->msg)) { ?> <?php if(!empty($this->msg)) { ?>
<?= $this->msg ?> <?= $this->msg ?>
<?php } else{ ?> <?php } else{ ?>
<form class="form-horizontal" method="post"> <form class="form-horizontal" method="post">
<div class="control-group"> <div class="control-group">
<label class="control-label" for="title">doi</label> <label class="control-label" for="doi">doi</label>
<div class="controls"> <div class="controls">
<input type="text" id="title" name="title" value="<?= isset($this->data['doi']) ? $this->data['doi']:"doi:10.3972/..db" ?>" /> <input type="text" id="doi" name="doi" value="<?= isset($this->data['doi']) ? $this->data['doi']:"doi:10.3972/..db" ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="fund_id">uuid</label> <label class="control-label" for="uuid">uuid</label>
<div class="controls"> <div class="controls">
<input type="text" id="fund_id" name="fund_id" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" /> <input type="text" id="uuid" name="uuid" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="fund_type">发布者</label> <label class="control-label" for="publisher">发布者</label>
<div class="controls"> <div class="controls">
<input type="text" id="fund_type" name="fund_type" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" /> <input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="title_en">url</label> <label class="control-label" for="url">url</label>
<div class="controls"> <div class="controls">
<input type="text" id="title_en" name="title_en" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" /> <input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="fund_type_en">title</label> <label class="control-label" for="title">title</label>
<div class="controls"> <div class="controls">
<input type="text" id="fund_type_en" name="fund_type_en" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" /> <input type="text" id="title" name="title" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
</div> </div>
</div> </div>
<?php if(empty($this->data['info'])) {?> <?php if(empty($this->data['info'])) {?>
<div class="control-group" id="info1"> <div class="control-group infocontrol" id="info1">
<label class="control-label" for="fund_type_en">info</label> <label class="control-label" for="">info</label>
<div class="controls"> <div class="controls">
<input type="text" name="info[1][author]" value="" placeholder="作者" /> <input type="text" name="info[1][author]" value="" placeholder="作者" />
<input type="text" name="info[1][organization]" value="" placeholder="单位" /> <input type="text" name="info[1][organization]" value="" placeholder="单位" />
<input type="text" name="info[1][order]" value="" placeholder="排序" /> <input type="text" name="info[1][order]" value="" placeholder="排序" />
</div> </div>
</div> </div>
<?php } ?> <?php }else{ ?>
<div class="control-group">
<div class="controls"> <?php } ?>
<input type="hidden" name="submit" value="1" /> <div class="control-group">
<?php if(!empty($this->id)) { ?> <div class="controls">
<input type="hidden" name="id" value=" <?=$this->id?> " /> <a href="javascript:void(0);" onclick="addinput()">+添加一条</a>
<?php } ?> </div>
<?php if(!empty($this->uuid)) { ?> </div>
<input type="hidden" name="uuid" value=" <?=$this->uuid?> " /> <div class="control-group">
<?php } ?> <div class="controls">
<button type="submit" class="btn btn-primary">提交</button> <input type="hidden" name="submit" value="1" />
</div> <?php if(!empty($this->id)) { ?>
</div> <input type="hidden" name="id" value=" <?=$this->id?> " />
</form> <?php } ?>
<?php } ?> <?php if(!empty($this->uuid)) { ?>
</div> <input type="hidden" name="uuid" value=" <?=$this->uuid?>" />
</div> <?php } ?>
</div> <button type="submit" class="btn btn-primary">提交</button>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<script>
function addinput(){
var now_index = $('.infocontrol').length;
var index = now_index + 1;
html = '<div class="control-group infocontrol"><div class="controls">'
+ '<input type="text" name="info[' + index + '][author]" placeholder="作者" /> '
+ '<input type="text" name="info[' + index + '][organization]" placeholder="单位" /> '
+ '<input type="text" name="info[' + index + '][order]" placeholder="排序" /> '
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
+ '</div></div>';
now_index = null;
index = null;
$('.infocontrol').last().after(html);
}
function RmInput(e){
$e = $(e);
$e.parent('div').parent('div.infocontrol').remove();
}
</script>
<!-- //页面内容 --> <!-- //页面内容 -->