<dtml-var manage_page_header>

<main>
<div class="dropdown" id="menu_buttons">
	<a href="#" class="dropdown-toggle"
		data-toggle="dropdown"
		id="dropdownMenu1"
		title="Menu-Options"
		aria-haspopup="true"
		aria-expanded="true"
		><i class="fa fa-cog"></i>
	</a>
	<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
	  <dtml-let cp_url="Control_Panel.absolute_url()">
		<li><a id="menu_refresh" href="manage_menu">Refresh</a></li>
		<li><a id="menu_save" href="manage_menu?save_layout=1">Save layout</a></li>

		<li><a id="menu_cp" title="Control Panel"
			href="&dtml-cp_url;/manage_main" target="manage_main">Control Panel</a></li>
		<dtml-try>
			<dtml-in "Control_Panel.Database.getDatabaseNames(quote=True)">
				<li><a title="Zope Object Database Manager" target="manage_main"
					href="&dtml-cp_url;/Database/<dtml-var "_['sequence-item']">/manage_main">ZODB <dtml-var "_['sequence-item']"></a></li>
			</dtml-in>
		<dtml-except AttributeError>
		<dtml-except NameError>
		</dtml-try>
		<li><a id="menu_undo"
			href="&dtml-cp_url;/Database/main/manage_UndoForm" target="manage_main">Undo</a></li>

		<li><a id="menu_logout" href="manage_zmi_logout">Logout</a></li>
		<li role="separator" class="divider">&nbsp;</li>
		<li><a id="menu_copyright" href="zope_copyright"
			target="manage_main">&copy; Zope Foundation</a></li>
		<li><a id="menu_zope" href="https://www.zope.dev"
			target="_blank">www.zope.dev</a></li>
	  </dtml-let>
	</ul>
</div>

<table id="menu_title">
	<tr>
		<td id="menu_workspace">
			<a href="manage_workspace" target="manage_main">
				<dtml-if expr="URLPATH1==BASEPATH1">
					Root Folder
				<dtml-else>
					<i class="&dtml-zmi_icon;" title="&dtml-meta_type;"></i> &dtml-id;
				</dtml-if>
			</a>
		</td>
	</tr>
</table>

<div id="menu_tree">
	<dtml-tree nowrap=1>
		<a href="&dtml.url_quote-tree-item-url;/manage_workspace" target="manage_main"><i title="&dtml-meta_type;" class="&dtml-zmi_icon;"></i>&nbsp;&dtml-id;</a>
	</dtml-tree>
</div>

<dtml-if save_layout
	><dtml-call "RESPONSE.setCookie('tree-s', REQUEST.get('tree-s'), expires=ZopeTime('2975-05-26').rfc822())"
></dtml-if>

</main>

<script src="&dtml-BASEPATH1;/++resource++zmi/zmi.localstorage.api.js"></script>
<script>
	function menu_resize(init) {
		var key = "ZMI.manage_menu.width";
		$(window).resize(function() {
				$ZMILocalStorageAPI.set(key,window.innerWidth);
			});
		var frmwidth = $ZMILocalStorageAPI.get(key,250);
		var frmset = parent.document.getElementsByTagName('frameset');
		var colval = frmwidth + ",*";
		frmset[0].cols=colval;
	}
	function menu_toggle() {
		var menu_width = "ZMI.manage_menu.width";
		var menu_width_saved = "ZMI.manage_menu.width.saved";
		if ( $ZMILocalStorageAPI.get(menu_width,0)==0 ) {
			$ZMILocalStorageAPI.set(menu_width,$ZMILocalStorageAPI.get(menu_width_saved,250));
		} else {
			$ZMILocalStorageAPI.set(menu_width_saved,$ZMILocalStorageAPI.get(menu_width,250));
			$ZMILocalStorageAPI.set(menu_width,0);
		}
		var frmwidth = $ZMILocalStorageAPI.get(menu_width,250);
		var frmset = parent.document.getElementsByTagName('frameset');
		var colval = frmwidth + ",*";
		frmset[0].cols=colval;
	}

	$(function(){
		menu_resize();
	});
</script>

<dtml-var manage_page_footer>

