summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authordeva <deva>2009-04-30 08:50:47 +0000
committerdeva <deva>2009-04-30 08:50:47 +0000
commit9100caa95aff02de93a1b0fae5677a6fd7ac952a (patch)
tree1d913e9fe067b363679e2d7f5949c0cd9cfaf637 /utils
parent56dbde9d687c8e97156552963ff8e7496ef6fb79 (diff)
Now all member attributes are shown in the same way.
Diffstat (limited to 'utils')
-rw-r--r--utils/modules/members.php28
1 files changed, 18 insertions, 10 deletions
diff --git a/utils/modules/members.php b/utils/modules/members.php
index ac32d60..fcc627c 100644
--- a/utils/modules/members.php
+++ b/utils/modules/members.php
@@ -14,23 +14,31 @@ class Member {
public $tags;
public $tagnames;
+ private function showTag($title, $id, $value)
+ {
+ $str = "";
+ if($value != "") {
+ $str .= " <div class=\"member_tag\"><div class=\"member_tags_".$id."\">\n";
+ $str .= " <div class=\"member_tag_name\">".$title.":</div>\n";
+ $str .= " <div class=\"member_tag_value\">".Markdown($value)."</div>\n";
+ $str .= " </div></div>\n";
+ }
+ return $str;
+ }
+
public function show()
{
global $MEMBERS_DIR;
$str = "<div class=\"member_entry\">\n";
$str .= " <div class=\"member_name\">" . htmlspecialchars_decode($this->name, ENT_QUOTES) . "</div>\n";
$str .= " <img alt=\"member\" class=\"member_image\" src=\"" . $MEMBERS_DIR."/".$this->image."\"/>\n";
- $str .= " <div class=\"member_startyear\">Member since: " . $this->startyear . "</div>\n";
- if($this->stopyear) $str .= " <div class=\"member_stopyear\">Quit: " . $this->stopyear . "</div>\n";
+ $str .= $this->showTag("Member Since", "startyear", $this->startyear);
+ $str .= $this->showTag("Quit", "stopyear", $this->stopyear);
foreach($this->tags as $name => $val) {
- if($val != "") {
- $str .= " <div class=\"member_tag\"><div class=\"member_tags_".$name."\">\n";
- $str .= " <div class=\"member_tag_name\">".$this->tagnames[$name]."</div>\n";
- $str .= " <div class=\"member_tag_value\">".$val."</div>\n";
- $str .= " </div></div>\n";
- }
+ $str .= $this->showTag($this->tagnames[$name], $name, $val);
}
$str .= "</div>\n";
+ $str .= "<div class=\"member_footer\"></div>\n";
return $str;
}
@@ -118,7 +126,7 @@ class Members {
$form->addWidget(new LineEdit("Start Year", "startyear", $startyear));
$form->addWidget(new LineEdit("Stop Year (if no longer a member)", "stopyear", $stopyear));
foreach($this->tags as $id => $title) {
- $form->addWidget(new LineEdit($title, "tags_".$id, $tags[$id]));
+ $form->addWidget(new TextEdit($title, "tags_".$id, $tags[$id]));
}
$form->addWidget(new ImageComboBox("Image", "image", $image, new Icons($MEMBERS_DIR."/")));
$form->addWidget(new Button("Add member"));
@@ -187,7 +195,7 @@ class Members {
$form->addWidget(new LineEdit("Start Year", "startyear", $startyear));
$form->addWidget(new LineEdit("Stop Year (if no longer a member)", "stopyear", $stopyear));
foreach($this->tags as $id => $title) {
- $form->addWidget(new LineEdit($title, "tags_".$id, $tags[$id]));
+ $form->addWidget(new TextEdit($title, "tags_".$id, $tags[$id], 2));
}
$form->addWidget(new ImageComboBox("Image", "image", $image, new Icons($MEMBERS_DIR."/")));
$form->addWidget(new Button("Preview"));