Rev 107 | Rev 141 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 106 | jblyberg | 1 | <?php |
| 2 | /* |
||
| 3 | * Theme template for SOPAC RSS hitlist entry |
||
| 4 | * |
||
| 5 | */ |
||
| 6 | |||
| 7 | // Prep some stuff here |
||
| 8 | |||
| 9 | $new_author_str = sopac_author_format($locum_result['author'], $locum_result['addl_author']); |
||
| 10 | $url_prefix = variable_get('sopac_url_prefix', 'cat/seek'); |
||
| 11 | if (module_exists('covercache')) { |
||
| 12 | $cover_img_url = covercache_image_url($locum_result['bnum']); |
||
| 13 | } |
||
| 14 | if (!$cover_img_url) { |
||
| 15 | $cover_img_url = '/' . drupal_get_path('module', 'sopac') . '/images/nocover.png'; |
||
| 16 | } |
||
| 17 | ?> |
||
| 18 | |||
| 107 | jblyberg | 19 | <entry> |
| 20 | <title><?php print $locum_result['title'];?></title> |
||
| 21 | <id>http://<?php print $_SERVER['SERVER_NAME'] . '/'. $url_prefix . '/record/' . $locum_result['bnum'] ?></id> |
||
| 22 | <link rel="alternate" href="http://<?php print $_SERVER['SERVER_NAME'] . '/'. $url_prefix . '/record/' . $locum_result['bnum'] ?>"/> |
||
| 23 | <updated><?php print date('Y-m-d'); ?>T00:00:00-05:00</updated> |
||
| 24 | <published><?php print $locum_result['bib_created']; ?>T00:00:00-05:00</published> |
||
| 25 | <author> |
||
| 26 | <name><?php print $new_author_str; ?></name> |
||
| 27 | <uri>http://<?php print $_SERVER['SERVER_NAME'] . $url_prefix . '/search/author/' . urlencode($new_author_str) ?></uri> |
||
| 28 | </author> |
||
| 29 | <content type="xhtml" xml:lang="en" xml:base="http://<?php print $_SERVER['SERVER_NAME']; ?>/"> |
||
| 30 | <div xmlns="http://www.w3.org/1999/xhtml"> |
||
| 119 | jblyberg | 31 | <p><img class="hitlist-cover" width="100" src="<?php print $cover_img_url ?>" /></p> |
| 107 | jblyberg | 32 | <ul> |
| 33 | <li id="publisher">Publisher: <?php print $locum_result['pub_info'] . ', ' . $locum_result['pub_year']; ?></li> |
||
| 34 | <li id="added">Added on <?php print $locum_result['bib_created']; ?></li> |
||
| 119 | jblyberg | 35 | <?php if ($locum_result['callnum']) { ?><li>Call number: <strong><?php print $locum_result['callnum']; ?></strong></li> <?php } ?> |
| 107 | jblyberg | 36 | <li> |
| 37 | <?php |
||
| 38 | print $locum_result['status']['avail'] . t(' of ') . $locum_result['status']['total'] . ' '; |
||
| 39 | print ($locum_result['status']['total'] == 1) ? t('copy available') : t('copies available'); |
||
| 40 | ?> |
||
| 41 | </li> |
||
| 42 | <li id="item-request">ยป <a href="/<?php print $url_prefix . '/record/' . $locum_result['bnum'] ?>">Request this item</a></li> |
||
| 43 | </ul> |
||
| 44 | </div> |
||
| 45 | </content> |
||
| 46 | </entry> |