-
Notifications
You must be signed in to change notification settings - Fork 0
/
view-person.inc
85 lines (71 loc) · 1.7 KB
/
view-person.inc
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!-- BEGIN view/person -->
<?php $Moar = ($View == "person"); ?>
<div class="box content">
<h2>Personal</h2>
<p>
<span class="label">Real name:</span>
<?php
if ($Name)
echo "\t<span class=\"value important\">{$Name}</span>\n";
else
echo "\t<span class=\"value comment\">unknown</span>\n";
?>
</p>
<p>
<span class="label">IRC nick:</span>
<?php
if (has("clueIrcNick"))
echo "\t<span class=\"value important\">{$Entry["clueircnick"]}</span>\n";
else
echo "\t<span class=\"value comment\">unknown</span>\n";
?>
</p>
<?php if ($Moar) { ?>
</div>
<?php } ?>
<?php
// contact info box
$totalHidden = 0;
list ($sections, $numHidden, $numDisplayed) = checkDisplaySections(array(
// basic contact information
$displayMail
? array("mail", "pgpkeyid", "altemail")
: array(),
// websites and other URLs
array("labeleduri"),
// IM addresses, &c.
array("contactinfo"),
));
if ($numDisplayed + $numHidden > 0) {
if ($Moar) {
echo "<div class=\"box content\">\n";
echo "<h3>Contact information</h3>\n";
}
foreach ($sections as $section => $attributes) {
if (count($attributes) == 0)
continue;
include "box-singlesection.inc";
}
if (!$Moar and has("contactinfo"))
$numHidden++;
$totalHidden += $numHidden;
if ($Moar) echo "</div>\n";
}
// postal addresses box
list ($attributes, $numHidden, $numDisplayed) = checkDisplaySection(
array("postaladdress", "l", "st", "c")
);
if (count($attributes) > 0) {
if ($Moar) {
echo "<div class=\"box content\">\n";
echo "<h3>Postal address</h3>\n";
}
include "box-singlesection.inc";
$totalHidden += $numHidden;
if ($Moar) echo "</div>\n";
}
if ($totalHidden > 0)
moreLink($totalHidden, "person");
if (!$Moar) echo "</div>\n";
?>
<!-- END single/person -->