javascript: function confirmFileDelete(name) { $('#deleteFileName').html(name); $('#deleteConfirmModal').modal(); } function fileDelete() { $('#deleteFilenameInput').val($('#deleteFileName').html()); $('#deleteFilenameForm').submit(); } .row .span8.offset4 h1 Your home page - current_site.file_list.each do |file| .row .span4 - if file.ext == 'html' || file.ext == 'htm' || file.ext == 'txt' || file.ext == 'js' || file.ext == 'css' || file.ext == 'md'    #{file.filename} div style="margin-bottom: 30px" span i class="icon-globe"    a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
span i class="icon-edit"    a href="#" Edit with visual editor
span i class="icon-edit"    a href="#" Edit with text editor
span i class="icon-trash"    a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete - else    #{file.filename} div style="margin-bottom: 30px" a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete Upload New File form method="POST" action="/site_files/delete" id="deleteFilenameForm" input type="hidden" id="deleteFilenameInput" name="filename" .modal.hide.fade id="deleteConfirmModal" tabindex="-1" role="dialog" aria-labelledby="deleteConfirmModalLabel" aria-hidden="true" .modal-header button.close type="button" data-dismiss="modal" aria-hidden="true" x h3 id="deleteConfirmModalLabel" Confirm delete of file .modal-body p You are about to delete the file . Are you sure? .modal-footer button.btn data-dismiss="modal" aria-hidden="true" Cancel button.btn.btn-danger onclick="fileDelete()" Delete