You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
2.4 KiB

{% extends 'base.html' %}
{% load static %}
{# Displays article form #}
{% block scripts %}
<script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
{# selects #}
<link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/>
<script src="{% static 'js/select/select2.js' %}"></script>
<script src="{% static 'custom_js/make_select.js' %}"></script>
{# ajax #}
<script src="{% static 'custom_js/file_post_ajax.js' %}"></script>
<script src="{% static 'custom_js/select_tag.js' %}"></script>
{% endblock %}
{% block body %}
<form method="post" class="form-horizontal" name="form" enctype="multipart/form-data"> {% csrf_token %}
<fieldset>
<legend><i class="icon-edit"></i>{% if object %} Изменить {% else %} Добавить {% endif %}статью</legend>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-pencil"></i> Основная информация</h2>
</div>
<div class="box-content">
{# description #}
{% include 'admin/forms/multilang.html' with field='description' form=form languages=languages %}
{# title #}
{% include 'admin/forms/multilang.html' with field='title' form=form languages=languages %}
</div>
</div>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-pencil"></i> Фотографии</h2>
</div>
<div class="box-content">
<a href="#myModal" id="file_add" role="button" class="btn btn-info" data-toggle="modal">Добавить фото</a>
<hr>
{# image #}
{% for photo in object.photos.all %}
<div class="photo" style="float: left;margin-right: 15px;">
<img src="{{ photo.get_admin_thumbnail_url }}" class="thumbnail" alt="{{ photo.title }}">
</div>
{% endfor %}
</div>
</div>
<div class="controls">
<input class="btn btn-large btn-primary" type="submit" value="{% if article %}Изменить{% else %}Добавить{% endif %}">
<input class="btn btn-large" type="reset" value="Отмена">
</div>
</fieldset>
</form>
{% endblock %}