Добавлено удаление эскизов, Фон страниц Белый дым
This commit is contained in:
BIN
asuzr/static/del.png
Normal file
BIN
asuzr/static/del.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
asuzr/static/rubbish.png
Normal file
BIN
asuzr/static/rubbish.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 505 B |
@@ -20,7 +20,7 @@ urlpatterns = patterns('',
|
||||
url(r'^desreport/$', 'asuzr.views.desreport'),
|
||||
url(r'^production_table/(?P<order_id>\d+)/$', 'asuzr.views.production_table'),
|
||||
url(r'^sketches/(?P<order_id>\d+)/$', 'asuzr.views.sketches'),
|
||||
url(r'^sketches/delete/$', 'asuzr.views.delete_sketch'),
|
||||
url(r'^sketches/delete/$', 'asuzr.views.delete_sketch', name = 'asuzr-del-sketch'),
|
||||
url(r'^prodplan/$', 'asuzr.views.prod_plan_view'),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^inplaceeditform/', include('inplaceeditform.urls')),
|
||||
@@ -33,4 +33,5 @@ if settings.DEBUG:
|
||||
# static files (images, css, javascript, etc.)
|
||||
urlpatterns += patterns('',
|
||||
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
||||
'document_root': settings.MEDIA_ROOT}))
|
||||
'document_root': settings.MEDIA_ROOT}))
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
.gray {
|
||||
color: lightgray;
|
||||
}
|
||||
body {
|
||||
background: #F5F5F5
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,15 +1,40 @@
|
||||
{% extends "asuzr/base.html" %}
|
||||
{% load thumbnail %}
|
||||
{% load staticfiles %}
|
||||
{% block page %}
|
||||
<style>
|
||||
#list li{
|
||||
list-style-type: none; /* Прячем исходные маркеры */
|
||||
display: inline; /* Отображать как строчный элемент */
|
||||
margin-right: 10px; /* Отступ слева */
|
||||
padding: 5px; /* Поля вокруг текста */
|
||||
}
|
||||
#sketch {
|
||||
width: 200px;
|
||||
margin: 0px;
|
||||
}
|
||||
#sketch li {
|
||||
position: relative;
|
||||
}
|
||||
.sketch_img {
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.del_icon {
|
||||
display: inline-block;
|
||||
z-index: 2;
|
||||
margin-left: -30px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
{% if sketch_list %}
|
||||
<ul id = "list">
|
||||
{% for sketch in sketch_list %}
|
||||
<li> {% thumbnail sketch.sketch_file "200x200" crop="center" as im %} <a href = {{sketch.sketch_file.url}}> <img src = "{{ im.url }}"> </a>{% endthumbnail %} </li>
|
||||
<li id="sketch"> {% thumbnail sketch.sketch_file "200x200" crop="center" as im %} <a class = "sketch_img" href = {{sketch.sketch_file.url}}> <img src = "{{ im.url }}"/> </a>{% endthumbnail %} <a class = "del_icon" title = "Удалить" href= "{% url 'asuzr-del-sketch' %}?pk={{sketch.id}}"><img src = "{% static "del.png" %}"/></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user