Make a link for a module or package to display in an index.
(self, modpkginfo)
| 711 | return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__) |
| 712 | |
| 713 | def modpkglink(self, modpkginfo): |
| 714 | """Make a link for a module or package to display in an index.""" |
| 715 | name, path, ispackage, shadowed = modpkginfo |
| 716 | if shadowed: |
| 717 | return self.grey(name) |
| 718 | if path: |
| 719 | url = '%s.%s.html' % (path, name) |
| 720 | else: |
| 721 | url = '%s.html' % name |
| 722 | if ispackage: |
| 723 | text = '<strong>%s</strong> (package)' % name |
| 724 | else: |
| 725 | text = name |
| 726 | return '<a href="%s">%s</a>' % (url, text) |
| 727 | |
| 728 | def filelink(self, url, path): |
| 729 | """Make a link to source file.""" |