You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
5.6 KiB

12 years ago
  1. <div class="tabelem divided" title="{$c->__('page.feed')}" id="blog" >
  2. <ul class="thick">
  3. <li class="action">
  4. <div class="action">
  5. <a
  6. href="{$c->route('feed', array($contact->jid))}"
  7. target="_blank"
  8. >
  9. <i class="md md-wifi-tethering"></i> Atom
  10. </a>
  11. </div>
  12. <span class="icon gray">
  13. <i class="md md-edit"></i>
  14. </span>
  15. <span>
  16. {if="$contact"}
  17. <h2>
  18. <a href="{$c->route('blog', array($contact->jid))}">
  19. {$c->__('blog.title', $contact->getTrueName())}
  20. </a>
  21. </h2>
  22. {else}
  23. <h2>
  24. <a href="{$c->route('blog', array($contact->jid))}">
  25. {$c->__('page.blog')}
  26. </a>
  27. </h2>
  28. {/if}
  29. </span>
  30. </li>
  31. </ul>
  32. {loop="$posts"}
  33. <article>
  34. <header>
  35. <ul class="thick">
  36. <li class="condensed">
  37. {$url = $value->getContact()->getPhoto('s')}
  38. {if="$url"}
  39. <span class="icon bubble">
  40. <img src="{$url}">
  41. </span>
  42. {else}
  43. <span class="icon bubble color {$value->getContact()->jid|stringToColor}">
  44. <i class="md md-person"></i>
  45. </span>
  46. {/if}
  47. <h2>
  48. <a href="{$c->route('blog', array($value->origin, $value->nodeid))}">
  49. {if="$value->title != null"}
  50. {$value->title}
  51. {else}
  52. {$c->__('post.default_title')}
  53. {/if}
  54. </a>
  55. </h2>
  56. <p>
  57. {if="$value->node == 'urn:xmpp:microblog:0' && $value->getContact()->getTrueName() != ''"}
  58. {$value->getContact()->getTrueName()} -
  59. {/if}
  60. {$value->published|strtotime|prepareDate}
  61. </p>
  62. </li>
  63. </ul>
  64. </header>
  65. <section>
  66. {$value->contentcleaned}
  67. </section>
  68. <footer>
  69. <ul class="thin">
  70. {if="isset($value->getAttachements().links)"}
  71. {loop="$value->getAttachements().links"}
  72. <li>
  73. <span class="icon small"><img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/></span>
  74. <a href="{$value.href}" class="alternate" target="_blank">
  75. <span>{$value.href|urldecode}</span>
  76. </a>
  77. </li>
  78. {/loop}
  79. {/if}
  80. {if="isset($value->getAttachements().files)"}
  81. {loop="$value->getAttachements().files"}
  82. <li>
  83. <a
  84. href="{$value.href}"
  85. class="enclosure"
  86. type="{$value.type}"
  87. target="_blank">
  88. <span class="icon small gray">
  89. <span class="md md-attach-file"></span>
  90. </span>
  91. <span>{$value.href|urldecode}</span>
  92. </a>
  93. </li>
  94. {/loop}
  95. {/if}
  96. </ul>
  97. </footer>
  98. {$comments = $c->getComments($value)}
  99. {if="$comments"}
  100. <ul class="spaced middle">
  101. <li class="subheader">
  102. {$c->__('post.comments')}
  103. <span class="info">{$comments|count}</span>
  104. </li>
  105. {loop="$comments"}
  106. <li class="condensed">
  107. {$url = $value->getContact()->getPhoto('s')}
  108. {if="$url"}
  109. <span class="icon bubble">
  110. <img src="{$url}">
  111. </span>
  112. {else}
  113. <span class="icon bubble color {$value->getContact()->jid|stringToColor}">
  114. <i class="md md-person"></i>
  115. </span>
  116. {/if}
  117. <span class="info">{$value->published|strtotime|prepareDate}</span>
  118. <span>
  119. {$value->getContact()->getTrueName()}
  120. </span>
  121. <p>
  122. {$value->content}
  123. </p>
  124. </li>
  125. {/loop}
  126. </ul>
  127. {/if}
  128. </article>
  129. {/loop}
  130. {if="$posts == null"}
  131. <ul class="simple thick">
  132. <li>
  133. <span>{$c->__('blog.empty')}</span>
  134. </li>
  135. </ul>
  136. {/if}
  137. </div>