{% extends "admin/base_site.html" %}


{% block extrastyle %}{{ block.super }}
<!-- find_and_replace.html extrahead START -->
<style>
#id_find_string, #id_replace_string {
    width:80%;
    max-width:80%;
}
</style>
<!-- find_and_replace.html extrahead END -->
{% endblock extrastyle %}

{% block content %}
<form action="{{ form_url }}" method="post" id="find_and_replace_form" class="pylucid_form">
	{% csrf_token %}
    {% include "admin/pylucid/includes/form_fieldset_errorlist.html" %}
    {% include "admin/pylucid/includes/markup_preview_fieldset.html" %}
    <fieldset>
        {% include "admin/pylucid/includes/pylucid_formset.html" %}
        <div class="helper_buttons">
		    <input type="submit" name="save" value="{% trans 'find and replace' %}" />		
        </div>
    </fieldset>
</form>

{% if results %}
    <h2>{% trans 'results' %}</h2>
    <small class="search_info">{{ duration|human_duration }} - {{ total_changes }} {% trans 'changes' %}</small>
    {% for item in results %}
        <fieldset class="results">
        <legend>
            <strong>
                {% if no_link %}
                    {{ item.entry }}
                {% else %}
                    <a href="{{ item.entry.get_absolute_url }}">{{ item.entry }}</a>
                {% endif %}
            </strong>
            <small class="changes">({{ item.changes }} {% trans 'changes' %})</small>
        </legend>
        {{ item.diff_html }}
        </fieldset>
    {% endfor %}
{% endif %}

{% endblock %}
