-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apidoc used to crash if no default skin was set. This was because it
always expected the favicon to be available. Conditionalizing the lookup fixed the problem. --This line, and those below, will be ignored-- M apidoc/browser/menu_macros.pt M apidoc/browser/details_macros.pt
- Loading branch information
Showing
2 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<metal:block define-macro="details"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block> | ||
|
||
<html | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xml:lang="en" | ||
lang="en" | ||
i18n:domain="zope"> | ||
|
||
<head> | ||
<title metal:define-slot="title" i18n:translate="">Z3 UI</title> | ||
|
||
<style type="text/css" | ||
media="all" | ||
tal:content= | ||
"string: @import url(${context/++resource++apidoc.css});" | ||
> | ||
@import url(/++resource++apidoc.css); | ||
</style> | ||
|
||
<metal:block define-slot="headers" /> | ||
<metal:block define-slot="style_slot" /> | ||
<metal:block define-slot="ecmascript_slot" /> | ||
|
||
<link rel="icon" type="image/png" | ||
tal:attributes="href context/++resource++favicon.png|default" /> | ||
</head> | ||
|
||
<head> | ||
|
||
<body metal:define-slot="contents"> | ||
|
||
</body> | ||
</html> | ||
</metal:block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<metal:block define-macro="menu"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block> | ||
|
||
<html | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xml:lang="en" | ||
lang="en" | ||
i18n:domain="zope"> | ||
|
||
<head> | ||
<!-- Waaa --> | ||
<title metal:define-slot="title" i18n:translate="">Z3 UI</title> | ||
|
||
|
||
<style type="text/css" | ||
media="all" | ||
tal:content= | ||
"string: @import url(${context/++resource++apidoc.css});" | ||
> | ||
@import url(/++resource++apidoc.css); | ||
</style> | ||
|
||
<metal:block define-slot="headers" /> | ||
<metal:block define-slot="style_slot" /> | ||
<metal:block define-slot="ecmascript_slot" /> | ||
|
||
<link rel="icon" type="image/png" | ||
tal:attributes="href context/++resource++favicon.png|default" /> | ||
</head> | ||
|
||
<head> | ||
|
||
<body> | ||
|
||
<div class="menu" i18n:translate="">Menu</div> | ||
|
||
<metal:block define-slot="pre_menu" /> | ||
|
||
<metal:block define-slot="menu"> | ||
|
||
<table cellspacing="0" cellpadding="0" class="menu" border="0" | ||
tal:define="root context/@@cookie_tree; | ||
result root/getFlatDicts; | ||
nodeDictList python:result[0]; | ||
maxDepth python:result[1]"> | ||
|
||
<tr tal:repeat="nodeInfo nodeDictList"> | ||
<tal:block tal:define="node nodeInfo/node"> | ||
|
||
<td style="width:16px" tal:repeat="state nodeInfo/row-state"> | ||
<img tal:attributes="src context/++resource++tree_images/vline.png" | ||
tal:condition="state" alt="|" border="0" /> | ||
</td> | ||
|
||
<td style="width:16px"> | ||
<a href="" | ||
tal:attributes="href | ||
string:${request/getURL}?tree-state=${nodeInfo/tree-state}" | ||
tal:condition="node/hasChildren"> | ||
<tal:block condition="not:nodeInfo/last-level-node"> | ||
<img tal:attributes="src context/++resource++tree_images/plus_vline.png" | ||
tal:condition="not:node/expanded" alt="+" border="0" /> | ||
<img tal:attributes="src context/++resource++tree_images/minus_vline.png" | ||
tal:condition="node/expanded" alt="-" border="0" /> | ||
</tal:block> | ||
<tal:block condition="nodeInfo/last-level-node"> | ||
<img tal:attributes="src context/++resource++tree_images/plus.png" | ||
tal:condition="not:node/expanded" alt="+" border="0" /> | ||
<img tal:attributes="src context/++resource++tree_images/minus.png" | ||
tal:condition="node/expanded" alt="-" border="0" /> | ||
</tal:block> | ||
</a> | ||
|
||
<tal:block condition="not:node/hasChildren"> | ||
<img tal:attributes="src context/++resource++tree_images/tline.png" | ||
tal:condition="not:nodeInfo/last-level-node" alt="T" border="0" /> | ||
<img tal:attributes="src context/++resource++tree_images/lline.png" | ||
tal:condition="nodeInfo/last-level-node" alt="L" border="0" /> | ||
</tal:block> | ||
</td> | ||
|
||
<td colspan="1" class="list-item" | ||
tal:attributes="colspan python:maxDepth-len(nodeInfo['row-state'])+1"> | ||
<a href="" target="main" | ||
tal:attributes="href python: view.getMenuLink(node)" | ||
tal:content="python: view.getMenuTitle(node)" | ||
tal:condition="python: view.getMenuLink(node) is not None"> | ||
node/id | ||
</a><tal:block | ||
replace="python: view.getMenuTitle(node)" | ||
condition="python: view.getMenuLink(node) is None" /> | ||
</td> | ||
|
||
</tal:block> | ||
</tr> | ||
|
||
</table> | ||
|
||
</metal:block> | ||
|
||
<metal:block define-slot="post_menu" /> | ||
|
||
</body> | ||
</html> | ||
</metal:block> |