home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 October / maximum-cd-2011-10.iso / DiscContents / digsby_setup.exe / lib / plugins / twitter / res / alerts.tenjin next >
Encoding:
Text File  |  2011-02-05  |  773 b   |  30 lines

  1. <div class="alerts">
  2.     <ul>
  3. <?py
  4. def feed_label(feed):
  5.     if feed['type'] == 'search':
  6.         prefix = _(u'Search: ')
  7.     elif feed['type'] == 'group':
  8.         prefix = _(u'Group: ')
  9.     else:
  10.         prefix = ''
  11.  
  12.     return prefix + feed['label']
  13.  
  14. did_show = False
  15. for feed in counts:
  16.     if feed['count'] == 0: continue
  17.     elif feed['type'] in ('search', 'user') and not feed.get('save'): continue # don't show unsaved searches
  18.     elif feed.get('noCount', False): continue
  19.     else: did_show = True
  20. ?>
  21. <li><a href="javascript: (function() { changeView('${feed['name']}');})();">${feed_label(feed)} (${feed['count']})</a></li>
  22. <?py #endfor ?>
  23.  
  24. <?py if not did_show: ?>
  25.     <li>(${{_('No alerts')}})</li>
  26. <?py #endif ?>
  27.     </ul>
  28.  
  29. </div>
  30.