article images

remotes/origin/HEAD
ya_dim4ik 9 years ago
parent 5355c34362
commit 11d7e83c90
  1. 9
      static/client/css/main.css
  2. 2
      static/client/css_min/main.min.css
  3. 25
      templates/c_admin/file_list.html
  4. 49
      templates/c_admin/includes/file_form.html

@ -9856,6 +9856,10 @@ hr+.rq-note {
display: block;
padding: 3px 0 0
}
.blog_block .article_image img{
max-width: 100%;
height: auto;
}
.blog_avtor {
padding: 20px 0 0;
margin: 19px 0 0
@ -14197,8 +14201,9 @@ blockquote{
}
.new_article img{
min-width: 100%;
height: auto !important;
width: 100%;
max-width: 100%;
height: auto;
}
.white_block{

File diff suppressed because one or more lines are too long

@ -0,0 +1,25 @@
{% load thumbnail %}
{% comment %}
Uses in ajax call
Returns table with files properties
{% endcomment %}
{% for file in files %}
<tr>
<td>{{ file.id }}</td>
<td>
{% thumbnail file.file_path "100x100" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
{% endthumbnail %}
</td>
<td>{{ file.file_name }}</td>
<td>{{ file.purpose }}</td>
<td>
<button class="btn btn-danger delete_file" value="{{ file.id }}">
<i class="icon-trash icon-white"></i> Удалить
</button>
</td>
</tr>
{% endfor %}

@ -0,0 +1,49 @@
<div class="modal hide fade" id="myModal" >
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="close">&times;</button>
<h3>Добавить файл</h3>
</div>
<div id="form_body">
<form method="post" class="form-horizontal" enctype="multipart/form-data" name="file_form" id="file_form" > {% csrf_token %}
<div class="modal-body">
{{ file_form.model }}
<input type="hidden" id="obj_id" value="{{ object.id }}">
{# file_path #}
<div class="control-group{% if file_form.file_path.errors %}error{% endif %}">
<label class="control-label">{{ file_form.file_path.label }}:</label>
<div class="controls">{{ file_form.file_path }}
<span class="help-inline">{{ file_form.file_path.errors }}</span>
</div>
</div>
{# file purpose #}
<div class="control-group{% if file_form.purpose.errors %}error{% endif %}">
<label class="control-label">{{ file_form.purpose.label }}:</label>
<div class="controls">{{ file_form.purpose }}
<span class="help-inline">{{ file_form.purpose.errors }}</span>
</div>
</div>
{# file_name #}
{% with field='file_name' form=file_form languages=languages %}
{% include 'c_admin/forms/multilang.html' %}
{% endwith %}
{# file_description #}
{% with field='description' form=file_form languages=languages %}
{% include 'c_admin/forms/multilang.html' %}
{% endwith %}
</div>
<div class="modal-footer">
<div class="controls">
<input class="btn btn-primary" type="submit" value="Добавить">
<input type="reset" class="btn" value="Отменить" data-dismiss="modal">
</div>
</div>
</form>
</div>
</div>
Loading…
Cancel
Save