/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/templates/error.pt

  • Committer: Colin Watson
  • Date: 2022-08-08 16:33:50 UTC
  • mto: This revision was merged to the branch mainline in revision 528.
  • Revision ID: cjwatson@canonical.com-20220808163350-xd8ilh0u5m1kiylb
Port from SimpleTAL to Chameleon.

SimpleTAL is a painful dependency, because it has no download files on
PyPI: the only way to depend on it properly is therefore using a direct
URL reference, and as I understand it packages with such references
those can't be uploaded to PyPI.

Porting to Chameleon (Zope's default TAL implementation nowadays) turns
out not to be too difficult.  The main work involved is because it
doesn't support path expressions.  It would be possible to add those
using `z3c.pt`, and I considered that, but that has a significant
dependency tree for packages that don't already use the Zope Toolkit,
and it would have also required extra startup complexity to register
`ITraversable` adapters.  It's easier to convert path expressions to the
equivalent Python expressions, although the process of doing so was
unfortunately quite error-prone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
2
<tal:block define="onload string:load()">
3
 
  <html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="macros/main">
 
3
  <html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="macros.main">
4
4
    <head>
5
5
      <title metal:fill-slot="title"
6
 
             tal:content="string:${branch/friendly_name} : error"></title>
 
6
             tal:content="string:${branch.friendly_name} : error"></title>
7
7
    </head>
8
8
    <body>
9
9
        <tal:block metal:fill-slot="heading">
10
10
        <h1>
11
 
           <tal:has-link condition="branch/branch_link">
12
 
            <a tal:attributes="href branch/branch_link"
13
 
               tal:content="branch/friendly_name">
 
11
           <tal:has-link condition="branch.branch_link">
 
12
            <a tal:attributes="href branch.branch_link"
 
13
               tal:content="branch.friendly_name">
14
14
               nice/branch/name
15
15
            </a>
16
16
           </tal:has-link>
17
 
            <tal:no-link condition="not: branch/branch_link">
18
 
                <span metal:use-macro="breadcrumbs/directory"></span>
 
17
            <tal:no-link condition="not: branch.branch_link">
 
18
                <span metal:use-macro="breadcrumbs.directory"></span>
19
19
            </tal:no-link>
20
20
           : error
21
21
        </h1>