Skip to content

Commit

Permalink
Merge r27112 from trunk:
Browse files Browse the repository at this point in the history
  Acquire the standard_macros view using TALES view
  traversal (context/@@standard_macros) instead of
  through views
  • Loading branch information
philikon committed Aug 13, 2004
1 parent d002ffa commit bf01f6c
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 0 deletions.
57 changes: 57 additions & 0 deletions browser/runtimeinfo.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<html metal:use-macro="context/@@standard_macros/view">
<head>
<title i18n:translate="">Zope Runtime Information</title>
</head>
<body>
<div metal:fill-slot="body">

<ul tal:define="runtime_info view/runtimeInfo">
<li>
<span i18n:translate="">Zope version</span>:
<span tal:replace="runtime_info/ZopeVersion" />
</li>
<li>
<span i18n:translate="">Python version</span>:
<span tal:replace="runtime_info/PythonVersion" />
</li>
<li>
<span i18n:translate="">System platform</span>:
<span tal:replace="runtime_info/SystemPlatform" />
</li>
<li>
<span i18n:translate="">Preferred encoding</span>:
<span tal:replace="runtime_info/PreferredEncoding" />
</li>
<li>
<span i18n:translate="">FileSytem encoding</span>:
<span tal:replace="runtime_info/FileSystemEncoding" />
</li>
<li>
<span i18n:translate="">Command line</span>:
<span tal:replace="runtime_info/CommandLine" />
</li>
<li>
<span i18n:translate="">Process id</span>:
<span tal:replace="runtime_info/ProcessId" />
</li>
<li>
<span i18n:translate="">Uptime</span>:
<span tal:replace="runtime_info/Uptime" />
</li>
<li>
<span i18n:translate="">Python path</span>:
<ul>
<li tal:repeat="path runtime_info/PythonPath"
tal:content="path">path</li>
</ul>
</li>

<!-- # XXX UI folks: following line wants special attention. The
hardcoding should be removed someday. -->
<li tal:condition="runtime_info/Hint | nothing" style="color:red;"
tal:content="runtime_info/Hint" i18n:translate="" />
</ul>

</div>
</body>
</html>
27 changes: 27 additions & 0 deletions browser/server-control.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html metal:use-macro="context/@@standard_macros/view" i18n:domain="zope">
<head>
<title i18n:translate="">Zope Stub Server Controller</title>
</head>
<body>
<div metal:fill-slot="body">

<form name="servercontrol" action="ServerControl.html" method="post">
<span i18n:translate="">Shutdown time:</span>&nbsp;
<input type="text" name="time:int" size="5" value="0" />
&nbsp;<span i18n:translate="">seconds</span>

<p i18n:translate="">
If you specify a time of 0 seconds, then the server will do a hard
shutdown.
</p>

<input type="submit" name="restart" value="Restart server"
i18n:attributes="value" />
&nbsp;
<input type="submit" name="shutdown" value="Shutdown server"
i18n:attributes="value" />
</form>

</div>
</body>
</html>
38 changes: 38 additions & 0 deletions browser/translationdomaincontrol.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<html metal:use-macro="context/@@standard_macros/view">
<head>
<title i18n:translate="">Translation Domains</title>
</head>
<body>
<div metal:fill-slot="body">

<p tal:define="status view/reloadCatalogs"
tal:condition="status"
tal:content="status" />

<table>

<tr>
<th i18n:translate="">Domain</th>
<th i18n:translate="">Language</th>
<th i18n:translate="">Files</th>
<th>&nbsp;</th>
</tr>

<tr tal:repeat="catalogInfo view/getCatalogsInfo">
<td tal:content="catalogInfo/domain"></td>
<td tal:content="catalogInfo/language"></td>
<td>
<div tal:repeat="fileName catalogInfo/fileNames"
tal:content="fileName"></div>
</td>
<td>
<a tal:attributes="href string:?RELOAD=&domain=${catalogInfo/domain}&language=${catalogInfo/language}"
i18n:translate="reload-button">Reload</a>
</td>
</tr>

</table>

</div>
</body>
</html>
41 changes: 41 additions & 0 deletions browser/zodbcontrol.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<html metal:use-macro="context/@@standard_macros/view">
<head>
<title i18n:translate="">ZODB Controller</title>
</head>
<body>
<div metal:fill-slot="body">

<div style="font-size: 120%" i18n:translate="">
Name of database: <em tal:content="view/getName"
i18n:name="name">My Database</em>
</div>

<div style="font-size: 120%" i18n:translate="">
Size of database: <em tal:content="view/getSize"
i18n:name="size">1.1 MB</em>
</div>

<p tal:define="status view/pack"
tal:condition="status"
tal:content="status" />

<form action="." method="POST" tal:attributes="action request/URL">
<div class="row">
<div class="label" i18n:translate="">Keep up to:</div>
<div class="view">
<input type="text" size="4" name="days" value="0"
tal:attributes="value request/days|string:0" />
<span tal:omit-tag="" i18n:translate="">days</span>
</div>
</div>
<div class="row">
<div class="control">
<input type="submit" name="PACK" value="Pack"
i18n:attributes="value pack-button"/>
</div>
</div>
</form>

</div>
</body>
</html>

0 comments on commit bf01f6c

Please sign in to comment.