Redigera och ta bort foton
This commit is contained in:
@@ -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)
|
||||
|
||||
31
app/templates/admin_photo.html
Normal file
31
app/templates/admin_photo.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "bootstrap/wtf.html" as wtf %}
|
||||
{% block navbar %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<form class="form-horizontal" method="post" role="form">
|
||||
|
||||
{{ wtf.form_field(form.alt, form_type="horizontal") }}
|
||||
|
||||
{{ wtf.form_field(form.link, form_type="horizontal") }}
|
||||
|
||||
{{ wtf.form_field(form.submit, form_type="horizontal") }}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="thumbnail">
|
||||
<img src="{{photo.slide}}" class="img-responsive">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user