{% load i18n %}
{% comment %}
 Template used to generate tree by menu_builder view
{% endcomment %}
<li id="menu-item-{{ iid }}" 
    class="menu-item menu-item-edit-{{ state }} menu-item-depth-{{ level }}">
  <dl class="menu-item-bar">
    <dt class="menu-item-handle">
      <span class="item-title">{{ ilabel }}</span>
      <span class="item-controls">
        <span class="item-type"></span>
        <a href="#menu-item-settings-{{ iid }}"
           id="edit-{{ iid }}"
           title="{{ label_edit_menuitem }}"
           class="item-edit">&nbsp;</a>
      </span>
    </dt>
  </dl>
  <div id="menu-item-settings-{{ iid }}"
       class="menu-item-settings">
    <div class="ui-data" id="ui-data-{{ iid }}">
      {% if edit_form %}
        {% for field in edit_form %}
            {% if not field.is_hidden %}
                <div class="fieldWrapper">
                    {{ field.errors }}
                    {{ field.label_tag }} {{ field }}
                    {% if field.help_text %}
                        <span class="hint">{{ field.help_text }}
                            <span class="hint-pointer">&nbsp;</span>
                        </span>
                    {% endif %}
                    <div class="clear"><!-- --></div>
                </div>
            {% else %}
                {{ field }}
            {% endif %}
        {% endfor %}
      {% endif %}
    </div>
    <div class="final-data">
      <input type="hidden" class="menu-item-data-id" name="menu-item-data-id-{{iid}}" value="{{iid}}" />
      <input type="hidden" class="menu-item-data-title" name="menu-item-data-title-{{iid}}" value="{{ititle}}" />
      <input type="hidden" class="menu-item-data-label" name="menu-item-data-label-{{iid}}" value="{{ ilabel }}" />
      <input type="hidden" class="menu-item-data-label_original" name="menu-item-data-label_original-{{iid}}" value="{{ ilabel }}" />
      <input type="hidden" class="menu-item-data-description" name="menu-item-data-description-{{iid}}" value="{{idescription}}" />
      <input type="hidden" class="menu-item-data-parent_id" name="menu-item-data-parent_id-{{iid}}" value="{{iparent_id}}" />
      <input type="hidden" class="menu-item-data-position" name="menu-item-data-position-{{iid}}" value="{{iposition}}" />
      <input type="hidden" class="menu-item-data-satus" name="menu-item-data-status-{{iid}}" value="{{status}}" />
      <input type="hidden" class="menu-item-data-link_url" name="menu-item-data-link_url-{{iid}}" value="{{ilink_url}}" />
      <input type="hidden" class="menu-item-data-target_id" name="menu-item-data-target_id-{{iid}}" value="{{itarget_id}}" />
      <input type="hidden" class="menu-item-data-view_path" name="menu-item-data-view_path-{{iid}}" value="{{iview_path}}" />
      <input type="hidden" class="menu-item-data-type" name="menu-item-data-type-{{iid}}" value="{{itype}}" />
    </div>
    <div class="menu-item-actions">
      <a href="#menu-item-delete-{{ iid }}"
         id="delete-{{ iid }}"
         class="item-delete">{{label_delete_menuitem}}</a>
      <a href="#menu-item-cancel-{{ iid }}"
         class="item-cancel">{{label_cancel}}</a>
    </div>
  </div>
  <ul class="menu-item-transport"></ul>
</li>