home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / plugins / facebook / res / post.py.xml < prev    next >
Encoding:
Text File  |  2011-02-15  |  4.2 KB  |  77 lines

  1. <div class="post_row fb_filter_nf #{' '.join('fb_filter_' + f for f in feed.post_filter_keys.get(post.post_id, []))}" id="${post.post_id}" style="${'display:none;' if 'hidden' in post and post.hidden else ''}" timestamp="${post.created_time}">
  2. <div class="post_content social_background_hover">
  3. <?py
  4. from common import pref
  5. _context['profile'] = profile = feed.profiles[int(post['actor_id'])];
  6. _context['post_id'] = post_id = post.post_id;
  7. _context['do_link_block'] = do_link_block = (('likes' in post and 'count' in post.likes and post.likes.count) or
  8.                                        ('comments' in post and 'count' in post.comments and post.comments.count));
  9. _context['do_attachment'] = do_attachment = ('attachment' in post and post.attachment and
  10.                                             any([post.attachment.get(key) for key in
  11.                                             ('name', 'media', 'caption', 'description')]));
  12. _context['do_description'] = do_description = (do_attachment and 'description' in post.attachment and post.attachment.description);
  13. _context['can_like'] = can_like = 'likes' in post and ('can_like' not in post.likes or post.likes.can_like);
  14. _context['can_comment'] = can_comment = 'comments' in post and 'can_post' in post.comments and post.comments.can_post;
  15. _context['have_media'] = have_media = ('attachment' in post and 'media' in post.attachment and post.attachment.media);
  16. do_friendship = False;
  17. ?>
  18.     <div class="buddyiconcell">
  19.         <div>
  20.             <img id="${post_id}_buddyicon" class="buddyicon" src="${profile.pic_square}"/>
  21.         </div>
  22.     </div>
  23.     <div class="messagecell">
  24.         <div class="message_block">
  25.             <span class="name">
  26.                 <a href="${profile.url}" class="link namelink">${profile.name}</a>
  27.             </span>
  28. <?py if 'source_id' in post and 'actor_id' in post and 'target_id' in post and post.target_id and post.source_id and post.actor_id and int(post.target_id) != int(post.actor_id): ?>
  29.     <?py profile2 = feed.profiles[int(post['target_id'])] ?>
  30.     <span class="minor">┬╗</span> <a href="${post.permalink}" class="link namelink">${profile2.name}</a> <span class="message major" py:if="'message' in post">#{linkify(escape(to_str(post.message)))}</span>
  31.     <?py do_friendship = True ?>
  32. <?py else: ?>
  33.     <?py if 'message' in post: ?>
  34.         <span class="message major" >#{linkify(escape(to_str(post.message)))}</span>
  35.     <?py #endif ?>
  36. <?py #endif ?>
  37.         </div>
  38. <?py if do_attachment and not have_media: ?>
  39.     <div class="no_media_bar minor">
  40. <?py #endif ?>
  41.         <div class="attachment_section">
  42. <?py include(r"#{{app.resource('attachment.py.xml')}}") ?>
  43.         </div>
  44. <?py include(r"#{{app.resource('properties.py.xml')}}") ?>
  45. <?py if do_attachment and not have_media: ?>
  46.     </div>
  47. <?py #endif ?>
  48.         <div class="likes_comments_section">
  49. <?py include(r"#{{app.resource('likes.py.xml')}}") ?>
  50. <?py if pref('facebook.dislike_enabled', type=bool, default=True): include(r"#{{app.resource('dislikes.py.xml')}}") ?>
  51. <?py include(r"#{{app.resource('comments2.py.xml')}}") ?>
  52.         </div>
  53.  
  54.         <div class="error_section" style="">
  55.         </div>
  56.         <div class="bottom_row">
  57.             <span class="time minor" id="${post_id}_time" timestamp="${post.created_time}">${post.created_time}</span>
  58. <?py include(r"#{{app.resource('comment_link.py.xml')}}") ?>
  59. <?py include(r"#{{app.resource('like_link.py.xml')}}") ?>
  60. <?py if (not do_friendship) and pref('facebook.dislike_enabled', type=bool, default=True): include(r"#{{app.resource('dislike_link.py.xml')}}") ?>
  61. <?py if do_friendship: ?>
  62.         ┬╖ <!--! this line has a dot  -->
  63. <a class="link link_section" href="http://www.facebook.com/profile.php?id=${int(post['actor_id'])}&and=${int(post['target_id'])}">${{_('See Friendship')}}</a>
  64.     <?py del profile2 ?>
  65. <?py #endif ?>
  66.         </div>
  67.     </div>
  68. <?py
  69. for var in 'profile, post_id, do_link_block, do_attachment, do_description, can_like, can_comment'.split(', '):
  70.     del _context[var]
  71. #endfor
  72. del profile, post_id, do_link_block, do_attachment, do_description, can_like, can_comment, have_media, do_friendship
  73. ?>
  74. </div>
  75. <hr class="post_divider" />
  76. </div>
  77.