/[drupal]/contributions/modules/birthdays/birthdays-page.tpl.php
ViewVC logotype

Contents of /contributions/modules/birthdays/birthdays-page.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Oct 8 15:59:24 2008 UTC (13 months, 2 weeks ago) by maartenvg
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-0-RC1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Added preprocessed template for the birthdays page, to help customizing.
1 <?php
2 // $Id$
3
4 /**
5 * @file birthdays-page.tpl.php
6 * Display a page listing users and their birthdays. Depending on the settings
7 * it will be sorted by date of birth or by username. Users without an
8 * birthday can be filtered from the listing.
9 *
10 * Available variables:
11 * - $show_starsigns: Boolean indication whether to show the star sign.
12 * - $show_year: Global Boolean indicating whether year & age are enabled.
13 * - $show_user_picture: Boolean indicating whether user pictures are enabled.
14 * - $show_filter: Boolean for toggling the page filter form.
15 * - $filter_form: Form to filter by year and month.
16 * - $pager: The pager to browser through the pages.
17 * - $birthdays: Associative array with the following data for each user:
18 * - 'username': Themed username with link to account.
19 * - 'age': Current age shown depending on the settings of the
20 * module or the user's preference.
21 * - 'show_age': Boolean indicating whether the age should be shown.
22 * - 'date': Date of birth for this user.
23 * - 'account': Entire account, for user pictures and other ways to
24 * improve the birthdays block.
25 * - 'starsign': Themed star sign.
26 * - 'user_picture': Themed user picture.
27 * - 'zebra': Odd or even, for alternating table rows.
28 * -
29 */
30 ?>
31 <?php if ($show_filter): ?>
32 <div class="container-inline birthdays-filter"><?php print $filter_form ?></div>
33 <?php endif ?>
34 <table class="sticky-enabled">
35 <thead><tr>
36 <th><?php print t('User') ?></th>
37 <th><?php print t('Birthday') ?></th>
38 <?php if ($show_year): ?>
39 <th><?php print t('Age') ?></th>
40 <?php endif; ?>
41 <?php if ($show_starsign): ?>
42 <th><?php print t('Starsign'); ?></th>
43 <?php endif; ?>
44 <?php if ($show_user_picture): ?>
45 <th>&nbsp;</th>
46 <?php endif; ?>
47 </tr></thead>
48 <tbody>
49 <?php foreach ($birthdays as $birthday): ?>
50 <tr class="<?php print $birthday['zebra'] ?>">
51 <td><?php print $birthday['username'] ?></td>
52 <td><?php print $birthday['date'] ? $birthday['date'] : '&nbsp;' ?></td>
53 <?php if ($show_year): ?>
54 <td><?php print $birthday['show_age'] ? $birthday['age'] : '&nbsp;' ?></td>
55 <?php endif; ?>
56 <?php if ($show_starsign): ?>
57 <td><?php print $birthday['starsign'] ? $birthday['starsign'] : '&nbsp;' ?></td>
58 <?php endif; ?>
59 <?php if ($show_user_picture): ?>
60 <td><?php print $birthday['picture'] ?></td>
61 <?php endif; ?>
62 </tr>
63 <?php endforeach; ?>
64 </tbody>
65 </table>
66 <?php print $pager ?>

  ViewVC Help
Powered by ViewVC 1.1.2