forked from aadl/sopac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sopac-pat-overview.tpl.php
71 lines (70 loc) · 2.74 KB
/
sopac-pat-overview.tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* SOPAC is The Social OPAC: a Drupal module that serves as a wholly integrated web OPAC for the Drupal CMS
* This file contains the Drupal include functions for all the SOPAC admin pieces and configuration options
* This file is called via hook_user
*
* @package SOPAC
* @version 2.1
* @author John Blyberg
*/
global $user;
?>
<table width="100%">
<tr>
<td width="50%">
<div class="overview-title"><?php print t("Top %n Ratings", array('%n' => count($ratings_chunk['top']['ratings']) ? count($ratings_chunk['top']['ratings']) : NULL)); ?></div>
<table class="overview-ratings">
<?php
if (count($ratings_chunk['top']['ratings'])) {
foreach ($ratings_chunk['top']['ratings'] as $rating) {
print '<tr><td style="width: 100px;">';
print theme_sopac_get_rating_stars($rating['bnum'], $rating['rating'], FALSE, TRUE, 'top') . ' ';
print '</td><td>';
print '<a href="/' . variable_get('sopac_url_prefix', 'cat/seek') . '/record/' . $rating['bnum'] . '">' .
$ratings_chunk['bibs'][$rating['bnum']]['title'] . '</a>';
print '</td></tr>';
}
} else {
print $ratings_chunk['nodata'];
}
?>
</table>
</td>
<td>
<div class="overview-title"><?php print t("Latest %n Ratings", array('%n' => count($ratings_chunk['latest']['ratings']) ? count($ratings_chunk['latest']['ratings']) : NULL)); ?></div>
<table class="overview-ratings">
<?php
if (count($ratings_chunk['latest']['ratings'])) {
foreach ($ratings_chunk['latest']['ratings'] as $rating) {
print '<tr><td style="width: 100px;">';
print theme_sopac_get_rating_stars($rating['bnum'], $rating['rating'], FALSE, TRUE, 'latest') . ' ';
print '</td><td>';
print '<a href="/' . variable_get('sopac_url_prefix', 'cat/seek') . '/record/' . $rating['bnum'] . '">' .
$ratings_chunk['bibs'][$rating['bnum']]['title'] . '</a>';
print '</td></tr>';
}
} else {
print $ratings_chunk['nodata'];
}
?>
</table>
<div class="overview-more-info">[<?php print l(t('See All Your Ratings'), "user/{$user->uid}/library/ratings"); ?>]</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="overview-title"><?php print t('Top Tags'); ?></div>
<?php print '<div class="overview-tag-cloud">' . $tag_cloud . '</div>'; ?>
<br />
<div class="overview-more-info">[<?php print l(t('See All Your Tags'), "user/{$user->uid}/library/tags"); ?>]</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="overview-title"><?php print t('Recent Reviews'); ?></div>
<?php print $review_display; ?>
<div class="overview-more-info">[<?php print l(t('See All Your Reviews'), "user/{$user->uid}/library/reviews"); ?>]</div>
</td>
</tr>
</table>