|
|
@ -57,22 +57,13 @@
|
|
|
|
{% if g.user.role_upload() or g.user.role_admin()%}
|
|
|
|
{% if g.user.role_upload() or g.user.role_admin()%}
|
|
|
|
{% if g.allow_upload %}
|
|
|
|
{% if g.allow_upload %}
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
|
<form id="form-upload-multi" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
|
|
|
|
<form id="form-upload" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
<span class="btn btn-default btn-file">{{_('Upload')}} multiple books<input id="btn-upload-multi" name="btn-upload" type="file" multiple></span>
|
|
|
|
<span class="btn btn-default btn-file">{{_('Upload')}}<input id="btn-upload" name="btn-upload" type="file" multiple></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if g.allow_upload %}
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<form id="form-upload" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<span class="btn btn-default btn-file">{{_('Upload')}} a single book<input id="btn-upload" name="btn-upload" type="file"></span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if g.user.role_admin() %}
|
|
|
|
{% if g.user.role_admin() %}
|
|
|
|
<li><a id="top_admin" href="{{url_for('admin')}}"><span class="glyphicon glyphicon-dashboard"></span><span class="hidden-sm"> {{_('Admin')}}</span></a></li>
|
|
|
|
<li><a id="top_admin" href="{{url_for('admin')}}"><span class="glyphicon glyphicon-dashboard"></span><span class="hidden-sm"> {{_('Admin')}}</span></a></li>
|
|
|
@ -246,10 +237,6 @@
|
|
|
|
$("#loader").show();
|
|
|
|
$("#loader").show();
|
|
|
|
$("#form-upload").submit();
|
|
|
|
$("#form-upload").submit();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#btn-upload-multi").change(function () {
|
|
|
|
|
|
|
|
$("#loader").show();
|
|
|
|
|
|
|
|
$("#form-upload-multi").submit();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|