announcements-feed.tpl.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * @file
  4. * Template file for the theming of announcements_feed admin page.
  5. *
  6. * Available variables:
  7. * - $count: Contains the total number of announcements.
  8. * - $featured: An array of featured announcements.
  9. * - $standard: An array of non-featured announcements.
  10. *
  11. * Each $announcement in $featured and $standard contain:
  12. * - $announcement['id']: Unique id of the announcement.
  13. * - $announcement['title']: Title of the announcement.
  14. * - $announcement['teaser']: Short description of the announcement.
  15. * - $announcement['link']: Learn more link of the announcement.
  16. * - $announcement['date_published']: Timestamp of the announcement.
  17. *
  18. * @see announcements_feed_theme()
  19. *
  20. * @ingroup themeable
  21. */
  22. ?>
  23. <?php if ($count): ?>
  24. <div class="announcements">
  25. <ul class="admin-list">
  26. <?php if ($featured): ?>
  27. <div class="featured-announcements-wrapper">
  28. <?php foreach ($featured as $key => $announcement): ?>
  29. <li class="leaf">
  30. <div class="announcement-title">
  31. <h4>
  32. <?php print $announcement['title']; ?>
  33. </h4>
  34. </div>
  35. <div class="announcement-teaser">
  36. <?php print strip_tags($announcement['teaser']); ?>
  37. </div>
  38. <div class="announcement-link">
  39. <?php if($announcement['link']): ?>
  40. <a target="_blank" href="<?php print $announcement['link']; ?>">
  41. <span>
  42. <?php print t('Learn More'); ?>
  43. </span>
  44. </a>
  45. <?php endif; ?>
  46. </div>
  47. </li>
  48. <?php endforeach; ?>
  49. </div>
  50. <?php endif; ?>
  51. <?php if ($standard): ?>
  52. <?php foreach ($standard as $key => $announcement): ?>
  53. <li class="leaf">
  54. <a target="_blank" href="<?php print $announcement['link']; ?>"><?php print $announcement['title']; ?></a>
  55. <div class="description">
  56. <?php print format_date(strtotime($announcement['date_published']), 'short'); ?>
  57. </div>
  58. </li>
  59. <?php endforeach; ?>
  60. <?php endif; ?>
  61. </ul>
  62. <?php if ($feed_link): ?>
  63. <div class="announcements--view-all">
  64. <a target="_blank" href="<?php print $feed_link; ?>"><?php print t('View all announcements'); ?></a>
  65. </div>
  66. <?php endif; ?>
  67. </div>
  68. <?php else: ?>
  69. <div class="no-announcements"><span><?php print t('No announcements available'); ?></span></div>
  70. <?php endif; ?>