{% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
{% endfor %}
+
+ <div class="well" style="text-align: center; display:none" id="add-button">
+ <a class="btn" href="#">
+ <i class="icon-plus"></i>
+ Add file
+ </a>
+ </div>
+
+ {% include 'edit-file.htm' with {'file': '', 'fileid': 'new'} %}
+
+
<div class="well">
<div class="row-fluid">
<div class="span6">
</div>
</form>
+<script type="application/javascript">
+$(document).ready(function() {
+ $('#add-button').show();
+ $('#filegroupnew').hide();
+ $('#add-button a').bind('click', function() {
+ $('#add-button').before("{% filter escape('js') %}
+ {% include 'edit-file.htm' with {'file': '', 'fileid': '###'} %}
+ {% endfilter %}"
+ .replace(/###/g, $('.filegroup').length)
+ );
+ return false;
+ });
+});
+</script>
{% endblock %}