File: transitions.html

package info (click to toggle)
python-authkit 0.4.1~r143-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 740 kB
  • ctags: 703
  • sloc: python: 4,643; makefile: 39; sh: 33
file content (29 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0"?>
<?python
import pudge.peruser
import pudge.generator
?>
<py:transitions 
   xmlns:py="http://purl.org/kid/ns#"
   py:extends="pudge.generator.Page">
  
  <py:transition py:match="item.tag == 'cite'" py:strip="">
    <?python
    name = item.text.strip()
    if hasattr(self, 'subject') and self.subject:
        # check the current subject first
        o = self.subject.find(name)
        if not o and not self.subject.ismodule():
            o = self.subject.parent.find(name)
    if not o:
       o = browser.find(name, contained=1)
    link = link_to(o)
    ?>
    <a py:if="link" href="${link}" 
       class="obj-link ${o.type_name}"
       title="${o.qualified_name()} - ${o.blurb()}">
      <tt>${name}</tt></a>
    <cite py:if="not link" py:replace="item" />
  </py:transition>
  
</py:transitions>