2011-09-02 02:59:49 -05:00
|
|
|
<html metal:define-macro="main"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:define="user tool/getUser;
|
|
|
|
isAnon tool/userIsAnon;
|
2011-09-18 08:00:05 -05:00
|
|
|
app tool/getApp;
|
2011-09-02 02:59:49 -05:00
|
|
|
appUrl app/absolute_url;
|
2011-11-25 11:01:20 -06:00
|
|
|
appFolder app/data;
|
|
|
|
appName tool/getAppName;
|
2011-09-02 02:59:49 -05:00
|
|
|
_ python: tool.translate;
|
|
|
|
req python: request;
|
|
|
|
resp req/RESPONSE;
|
2011-12-08 09:01:57 -06:00
|
|
|
x python: resp.setHeader('Content-Type', 'text/html;;charset=UTF-8');
|
2011-09-02 02:59:49 -05:00
|
|
|
x python: resp.setHeader('Expires', 'Thu, 11 Dec 1975 12:05:00 GMT+2');
|
2011-09-18 08:00:05 -05:00
|
|
|
x python: resp.setHeader('Content-Language', req.get('language', 'en'))">
|
2011-09-02 02:59:49 -05:00
|
|
|
|
|
|
|
<head>
|
|
|
|
<title tal:content="tool/getAppName"></title>
|
2012-03-01 10:35:23 -06:00
|
|
|
<tal:link repeat="name tool/getGlobalCssJs">
|
2012-02-18 12:48:00 -06:00
|
|
|
<link tal:condition="python: name.endswith('.css')"
|
|
|
|
rel="stylesheet" type="text/css" tal:attributes="href string:$appUrl/ui/$name"/>
|
|
|
|
<script tal:condition="python: name.endswith('.js')"
|
|
|
|
type="text/javascript" tal:attributes="src string:$appUrl/ui/$name"></script>
|
|
|
|
</tal:link>
|
2011-09-02 02:59:49 -05:00
|
|
|
</head>
|
|
|
|
|
2011-12-05 11:15:45 -06:00
|
|
|
<body tal:on-error="structure python: tool.manageError(error)">
|
2011-09-18 08:00:05 -05:00
|
|
|
<table class="main" align="center" cellpadding="0">
|
2011-09-02 02:59:49 -05:00
|
|
|
<tal:comment replace="nothing">Top banner</tal:comment>
|
|
|
|
<tr class="top" metal:define-slot="top">
|
2012-02-18 12:48:00 -06:00
|
|
|
<td tal:attributes="style python: 'background-image: url(%s/ui/banner.jpg)' % appUrl">
|
2011-09-02 02:59:49 -05:00
|
|
|
<table width="100%">
|
|
|
|
<tr valign="top">
|
2012-02-18 12:48:00 -06:00
|
|
|
<td></td>
|
2011-09-02 02:59:49 -05:00
|
|
|
<tal:comment replace="nothing">Language selector (links or listbox)</tal:comment>
|
2012-02-21 05:09:42 -06:00
|
|
|
<td align="right" tal:condition="tool/showLanguageSelector">
|
|
|
|
<tal:lgs define="languages tool/getLanguages;
|
|
|
|
defaultLanguage python: languages[0];
|
|
|
|
asLinks python: len(languages) <= 5">
|
2011-09-02 02:59:49 -05:00
|
|
|
<table tal:condition="asLinks">
|
|
|
|
<tr>
|
2011-11-25 11:01:20 -06:00
|
|
|
<td tal:repeat="lang languages">
|
2011-09-02 02:59:49 -05:00
|
|
|
<a class="lang"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="href python: req.get('ACTUAL_URL')+'/switchLanguage?set_language=%s' % lang;
|
|
|
|
title python: tool.getLanguageName(lang)"
|
|
|
|
tal:content="python: lang"></a>
|
2011-09-02 02:59:49 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<select tal:condition="not: asLinks"
|
|
|
|
tal:attributes="onchange string:window.location='${context/absolute_url}/switchLanguage?set_language=' + this.options[this.selectedIndex].value">
|
2011-11-25 11:01:20 -06:00
|
|
|
<option tal:repeat="lang languages"
|
|
|
|
tal:content="python: tool.getLanguageName(lang)"
|
|
|
|
tal:attributes="selected python:defaultLanguage == lang; value lang">
|
2011-09-02 02:59:49 -05:00
|
|
|
</option>
|
|
|
|
</select>
|
2012-02-21 05:09:42 -06:00
|
|
|
</tal:lgs>
|
2011-09-02 02:59:49 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2011-09-18 08:00:05 -05:00
|
|
|
<tal:comment replace="nothing">The message strip</tal:comment>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2012-02-18 12:48:00 -06:00
|
|
|
<div style="position: relative">
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:msg use-macro="app/ui/page/macros/message"/>
|
2011-09-18 08:00:05 -05:00
|
|
|
</div>
|
|
|
|
<tal:comment replace="nothing">Grey background shown when popups are shown</tal:comment>
|
|
|
|
<div id="grey" class="grey"></div>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Popup for confirming an action</tal:comment>
|
|
|
|
<div id="confirmActionPopup" class="popup">
|
|
|
|
<form id="confirmActionForm" method="post">
|
|
|
|
<div align="center">
|
|
|
|
<p id="appyConfirmText"></p>
|
|
|
|
<input type="hidden" name="actionType"/>
|
|
|
|
<input type="hidden" name="action"/>
|
|
|
|
<input type="button" onClick="doConfirm()"
|
|
|
|
tal:attributes="value python:_('yes')"/>
|
|
|
|
<input type="button" value="No" onClick="closePopup('confirmActionPopup')"
|
|
|
|
tal:attributes="value python:_('no')"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2011-09-15 08:52:21 -05:00
|
|
|
<tal:comment replace="nothing">The user data strip</tal:comment>
|
|
|
|
<tr>
|
2011-09-02 02:59:49 -05:00
|
|
|
<td>
|
2011-09-15 08:52:21 -05:00
|
|
|
<table class="userStrip" width="100%">
|
2011-09-02 02:59:49 -05:00
|
|
|
<tr>
|
2011-09-15 08:52:21 -05:00
|
|
|
<td>
|
|
|
|
<tal:comment replace="nothing">The user login form for anonymous users</tal:comment>
|
2012-02-16 11:13:51 -06:00
|
|
|
<table align="center" tal:condition="python: isAnon and ('/temp_folder/' not in req['ACTUAL_URL'])"
|
|
|
|
class="login">
|
2011-09-15 08:52:21 -05:00
|
|
|
<tr><td>
|
|
|
|
<form name="loginform" method="post"
|
|
|
|
tal:attributes="action python: tool.absolute_url() + '/performLogin'">
|
|
|
|
|
|
|
|
<input type="hidden" name="js_enabled" id="js_enabled" value="0"/>
|
|
|
|
<input type="hidden" name="cookies_enabled" id="cookies_enabled" value=""/>
|
|
|
|
<input type="hidden" name="login_name" id="login_name" value=""/>
|
|
|
|
<input type="hidden" name="pwd_empty" id="pwd_empty" value="0"/>
|
|
|
|
|
|
|
|
<span>Login</span>
|
2012-02-09 09:36:50 -06:00
|
|
|
<input type="text" size="25" name="__ac_name" id="__ac_name" value=""/>
|
2011-09-15 08:52:21 -05:00
|
|
|
<span>Password</span>
|
2012-02-09 09:36:50 -06:00
|
|
|
<input type="password" size="25" name="__ac_password" id="__ac_password"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
<input type="submit" name="submit" onclick="setLoginVars()"
|
|
|
|
tal:define="label python: _('Login');" tal:attributes="value label; alt label;"/>
|
|
|
|
</form>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
<tal:comment replace="nothing">User info and controls for authenticated users</tal:comment>
|
2011-09-20 12:21:48 -05:00
|
|
|
<table tal:condition="not: isAnon" class="buttons" width="99%">
|
2011-09-15 08:52:21 -05:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<!-- Go home -->
|
|
|
|
<a tal:attributes="href appUrl; title python: _('home')">
|
2011-11-25 11:01:20 -06:00
|
|
|
<img tal:attributes="src string: $appUrl/ui/home.gif"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
</a>
|
2011-09-18 08:00:05 -05:00
|
|
|
<!-- Config -->
|
2012-02-16 11:13:51 -06:00
|
|
|
<a tal:condition="python: user.has_role('Manager')"
|
2012-03-06 10:02:41 -06:00
|
|
|
tal:attributes="href python: tool.getUrl(nav='');
|
2012-02-16 11:13:51 -06:00
|
|
|
title python: _('%sTool' % appName)">
|
|
|
|
<img tal:attributes="src string:$appUrl/ui/appyConfig.gif"/>
|
|
|
|
</a>
|
2011-09-15 08:52:21 -05:00
|
|
|
<!-- Logout -->
|
|
|
|
<a tal:attributes="href python: tool.absolute_url() + '/performLogout';
|
|
|
|
title python: _('logout')">
|
2011-11-25 11:01:20 -06:00
|
|
|
<img tal:attributes="src string: $appUrl/ui/logout.gif"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
</a>
|
|
|
|
</td>
|
2012-02-16 11:13:51 -06:00
|
|
|
<td align="right" tal:define="userInfo tool/getUserLine">
|
|
|
|
<span tal:content="python: userInfo[0]"></span>
|
|
|
|
<a tal:attributes="href python: userInfo[1]">
|
|
|
|
<img tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
|
|
|
</a>
|
|
|
|
</td>
|
2011-09-15 08:52:21 -05:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
2011-09-02 02:59:49 -05:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2011-09-15 08:52:21 -05:00
|
|
|
<td>
|
2012-02-23 08:58:06 -06:00
|
|
|
<table width="100%" cellpadding="0" cellspacing="0">
|
2011-09-18 08:00:05 -05:00
|
|
|
<tr valign="top">
|
|
|
|
<tal:comment replace="nothing">Portlet</tal:comment>
|
|
|
|
<td tal:condition="python: tool.showPortlet(context)" class="portlet">
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:portlet use-macro="app/ui/portlet/macros/portlet"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
</td>
|
2011-09-18 08:00:05 -05:00
|
|
|
<tal:comment replace="nothing">Page content</tal:comment>
|
|
|
|
<td class="content"><span metal:define-slot="content"></span></td>
|
2011-09-15 08:52:21 -05:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
2011-09-02 02:59:49 -05:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|