{% extends "layout.html" %}

{% block main %}

    {% block configure %}
    <h1>Configure</h1>
    <p>Please select feed to configure</p>
    {% endblock %}

{% endblock %}

{% block menu %}

<dl id="cat">
    {% for category in manager.config.iterkeys() %}
    <dt><div{% if category == root|default('') %} class="selected"{% endif %}>{{ category }}</div></dt>
    <dd>
        <ul>
            {% for a_name in manager.config[category].iterkeys() %}
                <li>
                    <div class="item{% if a_name == name|default('') %} selected{% endif %}">
                        <a href="/configure/edit/text/{{ category }}/{{ a_name }}">{{ a_name }}</a>
                        <div class="actions">
                            <a href="/configure/delete/{{ category }}/{{ a_name }}"><img src="/static/img/fatcow-icons/16x16/delete.png" alt="Delete"/></a>
                        </div>
                    </div>
                </li>
            {% endfor %}
            <li class="new">
                <div class="item">
                    <a href="">Create new</a>
                </div>
            </li>
        </ul>
    </dd>
    {% endfor %}
</dl>

{% endblock %}

{% extends "layout.html" %}

{% block head %}
    <script type="text/javascript">
        function on_delete(root, name){
            var ans = confirm("Really delete "+name+"?")
            if(ans){
                location.href = "/configure/delete/"+root+"/"+name;
            }
        }
    </script>
{% endblock %}

{% block main %}

    {% block configure %}
    <h1>Configure</h1>
    <p>Please select feed to configure</p>
    {% endblock %}

{% endblock %}

{% block menu %}

<dl id="cat">
    {% for category in manager.config.iterkeys() %}
    <dt><div{% if category == root|default('') %} class="selected"{% endif %}>{{ category }}</div></dt>
    <dd>
        <ul>
            {% for a_name in manager.config[category].iterkeys() %}
                <li>
                    <div class="item{% if a_name == name|default('') %} selected{% endif %}">
                        <a href="/configure/edit/text/{{ category }}/{{ a_name }}">{{ a_name }}</a>
                        <div class="actions">
                            <a href="#" onclick="on_delete('{{ category }}','{{ a_name }}')"><img src="/static/img/fatcow-icons/16x16/delete.png" alt="Delete"/></a>
                        </div>
                    </div>
                </li>
            {% endfor %}
            <li class="new">
                <div class="item">
                    <a href="">Create new</a>
                </div>
            </li>
        </ul>
    </dd>
    {% endfor %}
</dl>

{% endblock %}

Add confirmation dialog before deleting feed/preset
Add confirmation dialog before deleting feed/preset

git-svn-id: 555d7295f8287ebc42f8316c6775e40d702c4756@1745 3942dd89-8c5d-46d7-aeed-044bccf3e60c
