<span tal:replace="structure here/manage_page_header"/>
<span tal:replace="structure here/manage_tabs"/>

<script src="/misc_/Naaya/jquery.min.js"></script>
<script>
  $(function(){
    $('input[name="default"]').change(function(){
      $('select[name="subobjects"]').attr('disabled', this.checked);
      $('select[name="ny_subobjects"]').attr('disabled', this.checked);
    });
  })

</script>

<p class="page-title">Naaya Folder subobjects</p>

<div class="system-msg" tal:condition="python:request.has_key('save')">
    Saved changes. (<span tal:replace="here/ZopeTime"/>)<br />
</div>

<p class="page-description" i18n:translate="">
    The list below presents all the types of objects installed on this server.  
    Every time you install a new product and want to add instances of its objects inside Naaya Folders,
    select them from the list below and press <span i18n:name="save-changes"><strong i18n:translate="">Save changes</strong></span>.
</p>

<tal:block define="meta_types options/meta_types;
		   has_custom_value options/has_custom_value">
    <form method="post" action="manageSubobjects">
    <fieldset><legend class="form-label">Select the kinds of things that can be added inside Naaya Folders:</legend>
    <table border="0" cellspacing="2" cellpadding="2" width="100%">
	    <tr>
		    <td colspan="2" valign="top"><input type="checkbox" name="default" value="Load default"
		    tal:attributes="checked not:has_custom_value;"
		    >Use defaults defined in portal_properties</td>
	    </tr>
	    <tr>
		    <td colspan="2" valign="top"><input type="checkbox" name="subfolders" value="Recursively for subfolders">Recursively for subfolders</td>
	    </tr>
	    <tr>
		    <td align="center"><strong>Zope objects</strong></td>
		    <td align="center"><strong>Naaya objects</strong></td>
	    </tr>
	    <tr>
		    <td width="50%" align="center">
			    <select name="subobjects" size="10" multiple="true"
            tal:attributes="disabled not:has_custom_value">
            <tal:block repeat="item here/getProductsMetaTypes">
              <option tal:attributes="value item; selected python:item in meta_types" 
                tal:content="item" tal:condition="python:item not in here.get_meta_types(1)">
                  Meta type</option>
            </tal:block>
			    </select>
		    </td>
		    <td width="50%" align="center">
			    <select name="ny_subobjects" size="10" multiple="true"
             tal:attributes="disabled not:has_custom_value">
				    <option tal:repeat="item python:here.get_meta_types(1)"
						    tal:attributes="value item; selected python:item in meta_types" 
						    tal:content="item">Meta type</option>
			    </select>
		    </td>
	    </tr>
	    <tr>
		    <td colspan="2" align="center"><input type="submit" name="submit" value="Save changes" /></td>
	    </tr>
    </table>
    </fieldset>
    </form>
</tal:block>




<span tal:replace="structure here/manage_page_footer"/>
