~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/browser/tales.py

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
792
792
            return '/@@/meeting-mugshot'
793
793
        return None
794
794
 
795
 
    def _get_custom_icon_url(self):
 
795
    def custom_icon_url(self):
796
796
        """Return the URL for this object's icon."""
797
797
        context = self._context
798
798
        if IHasIcon.providedBy(context) and context.icon is not None:
1175
1175
    def _makeLink(self, view_name, rootsite, text):
1176
1176
        person = self._context
1177
1177
        url = self.url(view_name, rootsite)
1178
 
        custom_icon = ObjectImageDisplayAPI(person)._get_custom_icon_url()
 
1178
        custom_icon = ObjectImageDisplayAPI(person).custom_icon_url()
1179
1179
        if custom_icon is None:
1180
1180
            css_class = ObjectImageDisplayAPI(person).sprite_css()
1181
1181
            return (u'<a href="%s" class="%s">%s</a>') % (
1207
1207
    def icon(self, view_name):
1208
1208
        """Return the URL for the person's icon."""
1209
1209
        custom_icon = ObjectImageDisplayAPI(
1210
 
            self._context)._get_custom_icon_url()
 
1210
            self._context).custom_icon_url()
1211
1211
        if custom_icon is None:
1212
1212
            css_class = ObjectImageDisplayAPI(self._context).sprite_css()
1213
1213
            return '<span class="' + css_class + '"></span>'
1426
1426
        html = super(PillarFormatterAPI, self).link(view_name)
1427
1427
        context = self._context
1428
1428
        custom_icon = ObjectImageDisplayAPI(
1429
 
            context)._get_custom_icon_url()
 
1429
            context).custom_icon_url()
1430
1430
        url = self.url(view_name, rootsite)
1431
1431
        summary = self._make_link_summary()
1432
1432
        if custom_icon is None: