2012-05-08 07:49:45 -05:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
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;
|
2012-06-27 06:27:24 -05:00
|
|
|
lang tool/getUserLanguage;
|
|
|
|
dir python: tool.getLanguageDirection(lang);
|
|
|
|
dleft python: (dir == 'ltr') and 'left' or 'right';
|
|
|
|
dright python: (dir == 'ltr') and 'right' or 'left';
|
2012-05-08 07:49:45 -05: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');
|
2012-06-27 06:27:24 -05:00
|
|
|
x python: resp.setHeader('Content-Language', lang)"
|
|
|
|
tal:attributes="dir python: tool.getLanguageDirection(lang)">
|
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-06-27 06:27:24 -05:00
|
|
|
<link tal:condition="python: name.endswith('.css') and not ((dir == 'ltr') and (name == 'appyrtl.css'))"
|
2012-02-18 12:48:00 -06:00
|
|
|
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-06-27 06:27:24 -05:00
|
|
|
<td tal:define="bannerName python: (dir == 'ltr') and 'banner' or 'bannerrtl'"
|
|
|
|
tal:attributes="style python: 'background-image: url(%s/ui/%s.jpg)' % (appUrl, bannerName)">
|
2011-09-02 02:59:49 -05:00
|
|
|
<table width="100%">
|
2012-06-27 06:27:24 -05:00
|
|
|
<tr valign="top" tal:define="pages tool/getMainPages">
|
2012-03-26 12:09:45 -05:00
|
|
|
<tal:comment replace="nothing">Links to main pages</tal:comment>
|
2012-06-27 06:27:24 -05:00
|
|
|
<td tal:condition="pages"><a tal:repeat="page pages" class="pageLink"
|
2012-03-26 12:09:45 -05:00
|
|
|
tal:content="page/title" tal:attributes="href page/absolute_url"></a>
|
|
|
|
</td>
|
2011-09-02 02:59:49 -05:00
|
|
|
<tal:comment replace="nothing">Language selector (links or listbox)</tal:comment>
|
2012-06-27 06:27:24 -05:00
|
|
|
<td tal:condition="tool/showLanguageSelector" tal:attributes="align dright">
|
2012-02-21 05:09:42 -06:00
|
|
|
<tal:lgs define="languages tool/getLanguages;
|
|
|
|
defaultLanguage python: languages[0];
|
2012-05-29 13:50:18 -05:00
|
|
|
asLinks python: len(languages) <= 8">
|
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"
|
2012-05-29 13:50:18 -05:00
|
|
|
tal:attributes="href string: $appUrl/config/changeLanguage?language=$lang;
|
2011-11-25 11:01:20 -06:00
|
|
|
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"
|
2012-06-27 06:27:24 -05:00
|
|
|
tal:attributes="onchange string:window.location='$appUrl/config/changeLanguage?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>
|
2012-07-09 08:47:38 -05:00
|
|
|
<div id="confirmActionPopup" class="popup">
|
2011-09-18 08:00:05 -05:00
|
|
|
<form id="confirmActionForm" method="post">
|
|
|
|
<div align="center">
|
|
|
|
<p id="appyConfirmText"></p>
|
|
|
|
<input type="hidden" name="actionType"/>
|
|
|
|
<input type="hidden" name="action"/>
|
2012-06-27 06:27:24 -05:00
|
|
|
<div id="commentArea" tal:attributes="align dleft"><br/>
|
2012-06-03 11:34:56 -05:00
|
|
|
<span tal:content="python: _('workflow_comment')" class="discreet"></span>
|
2012-03-19 11:00:44 -05:00
|
|
|
<textarea name="comment" cols="30" rows="3"></textarea>
|
|
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
<br/>
|
2011-09-18 08:00:05 -05:00
|
|
|
<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>
|
2012-07-09 08:47:38 -05:00
|
|
|
</div>
|
2012-07-27 04:01:35 -05:00
|
|
|
<tal:comment replace="nothing">Popup for reinitializing the password</tal:comment>
|
|
|
|
<div id="askPasswordReinitPopup" class="popup" tal:condition="python: isAnon and tool.showForgotPassword()">
|
2012-07-09 08:47:38 -05:00
|
|
|
<form id="askPasswordReinitForm" method="post"
|
|
|
|
tal:attributes="action python: tool.absolute_url() + '/askPasswordReinit'">
|
|
|
|
<div align="center">
|
|
|
|
<p tal:content="python: _('app_login')"></p>
|
|
|
|
<input type="text" size="35" name="login" id="login" value=""/>
|
|
|
|
<br/><br/>
|
|
|
|
<input type="button" onClick="doAskPasswordReinit()"
|
|
|
|
tal:attributes="value python:_('ask_password_reinit')"/>
|
|
|
|
<input type="button" value="No" onClick="closePopup('askPasswordReinitPopup')"
|
|
|
|
tal:attributes="value python:_('object_cancel')"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2011-09-18 08:00:05 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
2012-05-29 13:50:18 -05:00
|
|
|
<tal:comment replace="nothing">The user strip</tal:comment>
|
2011-09-15 08:52:21 -05:00
|
|
|
<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">
|
2012-07-09 08:47:38 -05:00
|
|
|
<tr>
|
|
|
|
<td class="userStripText">
|
|
|
|
<form name="loginform" method="post"
|
2011-09-15 08:52:21 -05:00
|
|
|
tal:attributes="action python: tool.absolute_url() + '/performLogin'">
|
|
|
|
|
2012-07-09 08:47:38 -05:00
|
|
|
<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"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
|
2012-07-09 08:47:38 -05:00
|
|
|
<span tal:replace="python: _('app_login')"/>
|
|
|
|
<input type="text" size="25" name="__ac_name" id="__ac_name" value=""/>
|
|
|
|
<span tal:replace="python: _('app_password')"/>
|
|
|
|
<input type="password" size="25" name="__ac_password" id="__ac_password"/>
|
|
|
|
<input type="submit" name="submit" onclick="setLoginVars()"
|
|
|
|
tal:define="label python: _('app_connect')" tal:attributes="value label; alt label;"/>
|
|
|
|
</form>
|
|
|
|
</td>
|
2012-07-27 04:01:35 -05:00
|
|
|
<td class="lostPassword" tal:condition="tool/showForgotPassword">
|
2012-07-09 08:47:38 -05:00
|
|
|
<a href="javascript: openPopup('askPasswordReinitPopup')"
|
|
|
|
tal:content="python: _('forgot_password')"></a></td>
|
|
|
|
</tr>
|
2011-09-15 08:52:21 -05:00
|
|
|
</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 -->
|
2012-06-03 11:34:56 -05:00
|
|
|
<a tal:attributes="href appUrl; title python: _('app_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>
|
2012-06-03 11:34:56 -05:00
|
|
|
<tal:comment replace="nothing">Additional icons can be added here by redefining icons.pt</tal:comment>
|
|
|
|
<metal:call use-macro="app/ui/icons/macros/icons"/>
|
2011-09-15 08:52:21 -05:00
|
|
|
<!-- Logout -->
|
|
|
|
<a tal:attributes="href python: tool.absolute_url() + '/performLogout';
|
2012-06-03 11:34:56 -05:00
|
|
|
title python: _('app_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-06-27 06:27:24 -05:00
|
|
|
<td class="userStripText" tal:define="userInfo tool/getUserLine" tal:attributes="align dright">
|
2012-02-16 11:13:51 -06:00
|
|
|
<span tal:content="python: userInfo[0]"></span>
|
2012-06-01 08:57:19 -05:00
|
|
|
<a tal:condition="python: userInfo[1]"
|
|
|
|
tal:attributes="href python: userInfo[1]">
|
2012-02-16 11:13:51 -06:00
|
|
|
<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>
|
2012-05-29 13:50:18 -05:00
|
|
|
<tr><tal:comment replace="nothing">Footer</tal:comment>
|
|
|
|
<td><metal:call use-macro="app/ui/footer/macros/footer"/></td>
|
|
|
|
</tr>
|
2011-09-02 02:59:49 -05:00
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|