Redigera och ta bort foton

This commit is contained in:
2017-05-19 11:35:55 +02:00
parent 0cdc75f1f9
commit d2d122fc98
4 changed files with 64 additions and 3 deletions

View File

@@ -127,7 +127,7 @@
<div class="thumbnail">
<img src="{{ photo.thumbnail }}" class="img-responsive">
<div class="panel-footer">
<a class="btn btn-default"><span class="glyphicon glyphicon-pencil"></a>
<a href="{{url_for('admin_photo', id=photo.id)}}" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></a>
{{ delete_button('photo', photo.alt, photo.id) }}
</div>
</div>
@@ -154,7 +154,7 @@ $('#deletemodal').on('show.bs.modal', function (event) {
var href = '/admin/delpage/' + id
} else {
var message = 'Vill du verkligen ta bort bilden - ' + title + '?'
var href = '##'
var href = '/admin/delphoto/' + id
}
modal.find('.modal-body p').text(message)
modal.find('.modal-footer a').attr('href', href)