<div class="portlets-manager" 
     tal:attributes="id string:portletmanager-${view/normalized_manager_name};"
     i18n:domain="plone">

  <div metal:use-macro="context/@@manage-portlets-macros/macros/portlet-add-form" />

  <div metal:use-macro="context/@@manage-portlets-macros/macros/current-portlets-list" />

  <div class="section">

    <h4 i18n:translate="heading_un_block_portlets">
        Block/unblock portlets
    </h4>

    <form method="post" tal:attributes="action view/blacklist_status_action">

      <input type="hidden" name="manager" tal:attributes="value view/manager_name" />

      <div tal:define="status view/context_blacklist_status">

        <span tal:omit-tag=""
              i18n:translate="label_portlets_parent_folders">
            Parent portlets:
        </span> 

        <select name="context_status:int" size="1">

            <option value="1"
                    tal:attributes="selected python:status == True and 'selected' or None"
                    i18n:translate="portlets_value_block">
                Block
            </option>

            <option value="-1"
                    tal:attributes="selected python:(status == False or status == None) and 'selected' or None"
                    i18n:translate="portlets_value_show">
                Do not block
            </option>

        </select>
      </div>

      <div tal:define="status view/group_blacklist_status">

        <span tal:omit-tag=""
              i18n:translate="label_portlets_group_portlets">Group portlets:</span>

        <select name="group_status:int" size="1">

            <option value="0"
                    tal:attributes="selected python:status == None and 'selected' or None"
                    i18n:translate="portlets_value_use_parent">
                Use parent settings
            </option>

            <option value="1"
                    tal:attributes="selected python:status == True and 'selected' or None"
                    i18n:translate="portlets_value_block">
                Block
            </option>

            <option value="-1"
                    tal:attributes="selected python:status == False and 'selected' or None"
                    i18n:translate="portlets_value_show">
                Do not block
            </option>

        </select>
      </div>

      <div tal:define="status view/content_type_blacklist_status">

        <span tal:omit-tag=""
              i18n:translate="label_portlets_content_type_portlets">
            Content type portlets:
        </span>

        <select name="content_type_status:int" size="1">

            <option value="0"
                    tal:attributes="selected python:status == None and 'selected' or None"
                    i18n:translate="portlets_value_use_parent">
                Use parent settings
            </option>

            <option value="1"
                    tal:attributes="selected python:status == True and 'selected' or None"
                    i18n:translate="portlets_value_block">
                Block
            </option>

            <option value="-1"
                    tal:attributes="selected python:status == False and 'selected' or None"
                    i18n:translate="portlets_value_show">
                Do not block
            </option>
        </select>
      </div>

      <div class="formControls">
          <input class="context"
                 type="submit"
                 value="Save settings"
                 i18n:attributes="label_save_settings"/>
      </div>

    </form>
  </div>
</div>
