back to trunk
git-svn-id: file:///home/shish/svn/shimmie2/trunk@1040 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
d5955e97a8
commit
c52cad5637
@ -20,14 +20,15 @@ class PMTheme extends Themelet {
|
|||||||
$page->add_block(new Block("Private Messages", $html, "main", 10));
|
$page->add_block(new Block("Private Messages", $html, "main", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_composer(Page $page, User $from, User $to) {
|
public function display_composer(Page $page, User $from, User $to, $subject="") {
|
||||||
$post_url = make_link("pm/send");
|
$post_url = make_link("pm/send");
|
||||||
|
$h_subject = html_escape($subject);
|
||||||
$to_id = $to->id;
|
$to_id = $to->id;
|
||||||
$html = <<<EOD
|
$html = <<<EOD
|
||||||
<form action="$post_url" method="POST">
|
<form action="$post_url" method="POST">
|
||||||
<input type="hidden" name="to_id" value="$to_id">
|
<input type="hidden" name="to_id" value="$to_id">
|
||||||
<table style="width: 400px;">
|
<table style="width: 400px;">
|
||||||
<tr><td>Subject:</td><td><input type="text" name="subject"></td></tr>
|
<tr><td>Subject:</td><td><input type="text" name="subject" value="$h_subject"></td></tr>
|
||||||
<tr><td colspan="2"><textarea style="width: 100%" rows="6" name="message"></textarea></td></tr>
|
<tr><td colspan="2"><textarea style="width: 100%" rows="6" name="message"></textarea></td></tr>
|
||||||
<tr><td colspan="2"><input type="submit" value="Send"></td></tr>
|
<tr><td colspan="2"><input type="submit" value="Send"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
@ -37,9 +38,10 @@ EOD;
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function display_message(Page $page, User $from, User $to, $pm) {
|
public function display_message(Page $page, User $from, User $to, $pm) {
|
||||||
$this->display_composer($page, $to, $from);
|
$this->display_composer($page, $to, $from, "Re: ".$pm["subject"]);
|
||||||
$page->set_title("Private Message");
|
$page->set_title("Private Message");
|
||||||
$page->set_heading(html_escape($pm["subject"]));
|
$page->set_heading(html_escape($pm["subject"]));
|
||||||
|
$page->add_block(new NavBlock());
|
||||||
$page->add_block(new Block("Message", format_text($pm["message"]), "main", 10));
|
$page->add_block(new Block("Message", format_text($pm["message"]), "main", 10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user