Make a link for a module or package to display in an index.
(self, modpkginfo)
| 756 | return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__) |
| 757 | |
| 758 | def modpkglink(self, modpkginfo): |
| 759 | """Make a link for a module or package to display in an index.""" |
| 760 | name, path, ispackage, shadowed = modpkginfo |
| 761 | if shadowed: |
| 762 | return self.grey(name) |
| 763 | if path: |
| 764 | url = '%s.%s.html' % (path, name) |
| 765 | else: |
| 766 | url = '%s.html' % name |
| 767 | if ispackage: |
| 768 | text = '<strong>%s</strong> (package)' % name |
| 769 | else: |
| 770 | text = name |
| 771 | return '<a href="%s">%s</a>' % (url, text) |
| 772 | |
| 773 | def filelink(self, url, path): |
| 774 | """Make a link to source file.""" |