mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
55 lines
No EOL
2.3 KiB
Text
55 lines
No EOL
2.3 KiB
Text
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'
|
|
<i class="icon-file-alt icon-3x"></i> <font style="font-size: 20pt">#{file.filename}</font>
|
|
div style="margin-bottom: 30px"
|
|
span
|
|
i class="icon-globe"
|
|
|
|
a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View <br>
|
|
span
|
|
i class="icon-edit"
|
|
a href="#" Edit with visual editor <br>
|
|
span
|
|
i class="icon-edit"
|
|
a href="#" Edit with text editor <br>
|
|
span
|
|
i class="icon-trash"
|
|
a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete
|
|
- else
|
|
<i class="icon-picture icon-3x"></i> <font style="font-size: 20pt">#{file.filename}</font>
|
|
div style="margin-bottom: 30px"
|
|
a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View <br>
|
|
a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete
|
|
|
|
<a href="/site_files/new" class="btn btn-large btn-success">Upload New File</a>
|
|
|
|
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 <span id="deleteFileName"></span>. Are you sure?
|
|
.modal-footer
|
|
button.btn data-dismiss="modal" aria-hidden="true" Cancel
|
|
button.btn.btn-danger onclick="fileDelete()" Delete |