Make a link for a module or package to display in an index.
(self, modpkginfo)
| 692 | return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__) |
| 693 | |
| 694 | def modpkglink(self, modpkginfo): |
| 695 | """Make a link for a module or package to display in an index.""" |
| 696 | name, path, ispackage, shadowed = modpkginfo |
| 697 | if shadowed: |
| 698 | return self.grey(name) |
| 699 | if path: |
| 700 | url = '%s.%s.html' % (path, name) |
| 701 | else: |
| 702 | url = '%s.html' % name |
| 703 | if ispackage: |
| 704 | text = '<strong>%s</strong> (package)' % name |
| 705 | else: |
| 706 | text = name |
| 707 | return '<a href="%s">%s</a>' % (url, text) |
| 708 | |
| 709 | def filelink(self, url, path): |
| 710 | """Make a link to source file.""" |