| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- {% extends 'admin/a_admindefault.html' %}
- {% block mycss%}
- <script src="//cdn.ckeditor.com/4.4.6/full/ckeditor.js"></script>
- <script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript">
- //选择图片
- $(function(){
- $("#file_proimg").change(function(){
- //alert($(this).val());
- $("#txt_RTImage").val($(this).val());
- var objUrl=getObjectURL(this.files[0]);
- //console.log("objUrl="+objUrl);
- if(objUrl){
- $("#img_proimg").attr("src",objUrl);
- $("#file_proimg").attr("src",objUrl);
- }
- })
- //建立一個可存取到該file的url
- function getObjectURL(file) {
- var url = null ;
- if (window.createObjectURL!=undefined) {
- url = window.createObjectURL(file) ;
- } else if (window.URL!=undefined) {
- url = window.URL.createObjectURL(file) ;
- } else if (window.webkitURL!=undefined) {
- url = window.webkitURL.createObjectURL(file) ;
- }
- return url ;
- }
- })
- </script>
- {% endblock %}
- {% block middle %}
- <div class="content">
- <div class="page-inner">
- <div class="page-header">
- <h4 class="page-title">
- {% if status=='add' %}
- 添加论文信息
- {% elif status=='edit' %}
- 编辑论文信息
- {% endif %}</h4>
- </div>
- <div class="row">
- <div class="col-md-12">
- {% with messages = get_flashed_messages() %}
- {% if messages %}
- {% for message in messages %}
- <p>{{ message }}</p>
- {% endfor %}
- {% endif %}
- {% endwith %}
- <form action="/editpaperinfo.do" method="post" enctype="multipart/form-data">
- <div class="modal-body">
- <input type="hidden" name="lbl_status" value="{{ status }}"/>
- <input type="hidden" name="lbl_PaperID" {% if status=='edit' %} value="{{paperinfo[0]}}"
- {%endif%}/>
- <div class="row">
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 所属课题</label>
- {% if status=='add' %}
- <select name="txt_RTID" class="form-control">
- {% for row in researchtopic %}
- <option value="{{row[0]}}">{{row[2]}}</option>
- {% endfor %}
- </select>
- {% elif status=='edit' %}
- <select name="txt_RTID" class="form-control">
- {% for row in researchtopic %}
- <option value="{{row[0]}}" {% if paperinfo[1]== row[0] %} selected {% else%}
- {%endif%}>{{row[2]}}
- </option>
- {% endfor %}
- </select>
- {% endif %}
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 论文标题: </label>
- <input name="txt_PTitle" type="text" class="form-control" placeholder="填写论文标题" {% if
- status=='edit' %} value="{{paperinfo[2]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 论文摘要: </label>
- <textarea name="txt_PAbstract" rows="8" cols="20" style="width: 100%" >{% if status=='edit' %} {{paperinfo[3]}} {%endif%}</textarea>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 论文封面图片: </label>
- <input id="file_proimg" name="file_proimg" type="file" size="30"/>
- <input id="txt_PImage" name="txt_PImage" type="text" class="form-control" placeholder="请上传论文摘要图片"
- {% if status =='add' %} value="" {% else %} value="{{paperinfo[4]}}" {% endif %}/>
- <img id="img_proimg" name="img_proimg" style="height:100px; width:200px" {% if status =='add' %} src="" {% else %} src="/{{paperinfo[4]}}"{% endif %}/>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 论文内容: </label>
- <textarea name="txt_PContent" id="txt_PConent" class="ckeditor" rows="10" cols="80">
- {% if status=='edit' %} {{paperinfo[5]}} {%endif%}
- </textarea>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>发表类型</label>
- <input name="txt_PubType" type="radio" value="1" checked {% if status=='edit' %} {%
- if paperinfo[6]==1 %} checked {%endif %} {%endif %}>期刊论文
- <input name="txt_PubType" type="radio" value="2" {% if status=='edit' %} {% if
- paperinfo[6]==2 %} checked {%endif %} {%endif %}>会议论文
- <input name="txt_PubType" type="radio" value="3" {% if status=='edit' %} {% if
- paperinfo[6]==3 %} checked {%endif %} {%endif %}>学术专著
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 发表期刊/会议名称: </label>
- <input name="txt_Publisher" type="text" class="form-control" placeholder="填写发表期刊/会议"
- {% if status=='edit' %} value="{{paperinfo[7]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 期刊/会议简称: </label>
- <input name="txt_Publisher2" type="text" class="form-control" placeholder="例如:IEEE TPDS">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 卷号期号页码: </label>
- <input name="txt_Pages" type="text" class="form-control" placeholder="填写卷号、期号、页码信息"
- {% if status=='edit' %} value="{{paperinfo[8]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 发表年份: </label>
- <input name="txt_PubYear" type="text" class="form-control" placeholder="填写发表年份" {%
- if status=='edit' %} value="{{paperinfo[9]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 作者列表: </label>
- <input name="txt_Authors" type="text" class="form-control"
- placeholder="填写作者列表,用英文逗号隔开" {% if status=='edit' %}
- value="{{paperinfo[10]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 全文链接: </label>
- <input name="txt_PubLink" type="text" class="form-control" placeholder="请填写论文全文链接地址"
- {% if status=='edit' %} value="{{paperinfo[11]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- arXiv链接: </label>
- <input name="txt_ArxivLink" type="text" class="form-control"
- placeholder="请填写arXiv地址" {% if status=='edit' %} value="{{paperinfo[12]}}"
- {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 代码链接: </label>
- <input name="txt_CodeLink" type="text" class="form-control" placeholder="请填写代码链接地址"
- {% if status=='edit' %} value="{{paperinfo[13]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>论文发表状态:</label>
- <select id="txt_PubStatus" name="txt_PubStatus" class="form-control">
- <option value="1" {% if status=='edit' %} {% if paperinfo[14]==1 %} selected {%
- else %} {% endif%} {% endif%}>已发表
- </option>
- <option value="2" {% if status=='edit' %} {% if paperinfo[14]==2 %} selected {%
- else %} {% endif%} {% endif%}>已录用
- </option>
- <option value="3" {% if status=='edit' %} {% if paperinfo[14]==3 %} selected {%
- else %} {% endif%} {% endif%}>已投稿
- </option>
- </select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>显示状态:</label>
- <select id="txt_PStatus" name="txt_PStatus" class="form-control">
- <option value="1" {% if status=='edit' %} {% if paperinfo[15]==1 %} selected {%
- else %} {% endif%} {% endif%}>显示
- </option>
- <option value="0" {% if status=='edit' %} {% if paperinfo[15]==0 %} selected {%
- else %} {% endif%} {% endif%}>不显示
- </option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer no-bd">
- <button type="submit" class="btn btn-primary">
- 保存
- </button>
- <a href="/paperinfomanage">
- <button type="button" class="btn btn-danger" data-dismiss="modal">
- 返回
- </button>
- </a>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
|