1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 04:40:44 +02:00

Private Message GUI fixes.

This commit is contained in:
Cameron
2013-02-06 00:20:11 -08:00
parent d6a69a0ec3
commit 26cced27c5
4 changed files with 22 additions and 17 deletions

View File

@@ -332,7 +332,7 @@ class pm_extended extends private_message
*/ */
function post_pm() function post_pm()
{ {
print_a($_POST); // print_a($_POST);
if(!check_class($this->pmPrefs['pm_class'])) if(!check_class($this->pmPrefs['pm_class']))
@@ -628,11 +628,14 @@ if(isset($_POST['postpm']))
$action = 'outbox'; $action = 'outbox';
} }
$mes = e107::getMessage();
if($message != '') if($message != '')
{ {
$ns->tablerender('', $message);
$mes->add($message);
// $ns->tablerender('', "<div class='alert alert-block'>". $message."</div>");
} }
@@ -643,7 +646,7 @@ if($message != '')
switch ($action) switch ($action)
{ {
case 'send' : case 'send' :
$ns->tablerender(LAN_PM, $pm->show_send($pm_proc_id)); $ns->tablerender(LAN_PM, $mes->render() . $pm->show_send($pm_proc_id));
break; break;
case 'reply' : case 'reply' :
@@ -652,25 +655,25 @@ switch ($action)
{ {
if($pm_info['pm_to'] != USERID) if($pm_info['pm_to'] != USERID)
{ {
$ns->tablerender(LAN_PM, LAN_PM_56); $ns->tablerender(LAN_PM, $mes->render() . LAN_PM_56);
} }
else else
{ {
$ns->tablerender(LAN_PM, $pm->show_send($pm_info)); $ns->tablerender(LAN_PM, $mes->render() . $pm->show_send($pm_info));
} }
} }
else else
{ {
$ns->tablerender(LAN_PM, LAN_PM_57); $ns->tablerender(LAN_PM, $mes->render() . LAN_PM_57);
} }
break; break;
case 'inbox' : case 'inbox' :
$ns->tablerender(LAN_PM.' - '.LAN_PM_25, $pm->show_inbox($pm_proc_id), 'PM'); $ns->tablerender(LAN_PM.' - '.LAN_PM_25, $mes->render() . $pm->show_inbox($pm_proc_id), 'PM');
break; break;
case 'outbox' : case 'outbox' :
$ns->tablerender(LAN_PM.' - '.LAN_PM_26, $pm->show_outbox($pm_proc_id), 'PM'); $ns->tablerender(LAN_PM.' - '.LAN_PM_26, $mes->render() . $pm->show_outbox($pm_proc_id), 'PM');
break; break;
case 'show' : case 'show' :
@@ -678,7 +681,7 @@ switch ($action)
break; break;
case 'blocked' : case 'blocked' :
$ns->tablerender(LAN_PM.' - '.LAN_PM_66, $pm->showBlocked($pm_proc_id), 'PM'); $ns->tablerender(LAN_PM.' - '.LAN_PM_66, $mes->render() . $pm->showBlocked($pm_proc_id), 'PM');
break; break;
} }

View File

@@ -113,9 +113,9 @@ class pm_shortcodes extends e_shortcode
{ {
$frm = e107::getForm(); $frm = e107::getForm();
//TODO Use $frm->userpicker(); //TODO Use $frm->userpicker();
return $frm->text('pm_to','',10,'typeahead=users'); return $frm->text('pm_to','',20,'typeahead=users');
$ret = $us->select_form($type, 'pm_to', '', $this->pmPrefs['pm_class']); // $ret = $us->select_form($type, 'pm_to', '', $this->pmPrefs['pm_class']);
} }
return $ret; return $ret;
} }

View File

@@ -95,7 +95,7 @@ $PM_SEND_PM = "<div style='text-align: center'>
"; ";
$PM_INBOX_HEADER = " $PM_INBOX_HEADER = "
<table class='table fborder' style='width:95%'> <table class='table table-striped fborder>
<tr> <tr>
<td class='fcaption' style='width:1%'>&nbsp;</td> <td class='fcaption' style='width:1%'>&nbsp;</td>
<td class='fcaption' style='width:1%'>&nbsp;</td> <td class='fcaption' style='width:1%'>&nbsp;</td>
@@ -135,7 +135,7 @@ $PM_INBOX_FOOTER = "
"; ";
$PM_OUTBOX_HEADER = " $PM_OUTBOX_HEADER = "
<table class='table fborder' style='width:95%'> <table class='table table-striped fborder'>
<thead> <thead>
<tr> <tr>
<th class='fcaption' style='width:1%'>&nbsp;</th> <th class='fcaption' style='width:1%'>&nbsp;</th>
@@ -180,7 +180,7 @@ $PM_OUTBOX_FOOTER = "
$PM_BLOCKED_HEADER = " $PM_BLOCKED_HEADER = "
<table class='table fborder' style='width:95%'> <table class='table table-striped fborder'>
<tr> <tr>
<td class='fcaption' style='width:5%'>&nbsp;</td> <td class='fcaption' style='width:5%'>&nbsp;</td>
<td class='fcaption' style='width:48%'>".LAN_PM_68."</td> <td class='fcaption' style='width:48%'>".LAN_PM_68."</td>
@@ -217,7 +217,7 @@ $PM_BLOCKED_FOOTER = "
$PM_SHOW = $PM_SHOW =
"<div style='text-align: center'> "<div style='text-align: center'>
<table class='table fborder' style='width:95%'> <table class='table fborder'>
<tr> <tr>
<td class='fcaption' colspan='2'>{PM_SUBJECT}</td> <td class='fcaption' colspan='2'>{PM_SUBJECT}</td>
</tr> </tr>

View File

@@ -23,9 +23,11 @@ if(!e_QUERY)
require_once(HEADERF); require_once(HEADERF);
// $tmp = $e107CorePage->listPages(); // $tmp = $e107CorePage->listPages();
$tmp = $e107CorePage->listBooks(); $tmp = $e107CorePage->listBooks();
// $text = $tp->parseTemplate("{PAGE_NAVIGATION=book=2}",true);
if(is_array($tmp)) if(is_array($tmp))
{ {
$ns->tablerender($tmp['title'], $tmp['text'], 'cpage'); $ns->tablerender($tmp['title'], $text, 'cpage');
require_once(FOOTERF); require_once(FOOTERF);
exit; exit;
} }