Merge branch 'SketchControls'

This commit is contained in:
Anastasia
2015-07-16 10:07:35 +05:00
5 changed files with 32 additions and 3 deletions

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -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'^log/$', 'asuzr.views.log_view'),
@@ -35,3 +35,4 @@ if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT}))

View File

@@ -37,6 +37,9 @@
.gray {
color: lightgray;
}
body {
background: #F5F5F5
}
</style>
</head>
<body>

View File

@@ -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 %}