/** * Show OUTBOX * @param \permag\model\RecordingArray $recordings * @param \permag\view\RecordingListNavigationView $recListNavView * @return string HTML */ public function showOutboxRecordings(\permag\model\RecordingArray $recordings, \permag\view\RecordingListNavigationView $recListNavView) { $html = "<h3 id='audioListHeader'><a href='" . $recListNavView->getOutboxLink() . "'>Audio outbox</a></h3>\n\t\t\t\t\t<div id='recordingList'>"; if (count($recordings->get()) > 0) { foreach ($recordings->get() as $r) { $toMemberId = $r->getToMemberId(); $username = $r->getUsername(); $filename = $r->getFilename(); $time = $r->getTimestamp(); $recordingId = $r->getRecordingId(); $new = $r->getNew(); $newRecoring = ''; $newRecordingText = ''; if ($new == 1) { $newRecoring = ' newRecordingSent'; $newRecordingText = "<p class='unheardMessage'>(Unheard)</p>"; } $html .= "<div class='recordingDiv{$newRecoring}'>\n\t\t\t\t\t\t\t\t<p class='from'>To: <a href='#' class='username'>{$username}</a></p>\n\t\t\t\t\t\t\t\t<span class='remove'>\n\t\t\t\t\t\t\t\t<form method='post'>\n\t\t\t\t\t\t\t\t\t<input type='hidden' name='" . self::$m_deleteId . "' value='{$recordingId}' />\n\t\t\t\t\t\t\t\t\t<input type='submit' name='" . self::$m_deleteRec . "' value='X' class='" . self::$m_deleteRecOutbox . "' />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t</span>{$newRecordingText}\n\t\t\t\t\t\t\t\t<p class='recordingTime'>{$time}</p>\n\t\t\t\t\t\t\t\t<div><audio src='/recs/{$filename}' controls></audio></div>\n\t\t\t\t\t\t\t</div>"; } } else { $html .= '<p>You have no audio messages in your outbox.</p>'; } $html .= "</div>"; return $html; }
/** * Menu * @param \permag\view\RecordingListNavigationView $recListNavView instance to create links * @return string HTML */ public function doNavigationMenu(\permag\view\RecordingListNavigationView $recListNavView) { $html = "\n\t\t\t\t<div id='sideMenu'>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href='" . $recListNavView->getInboxLink() . "'>Inbox</a></li>\n\t\t\t\t\t\t<li><a href='" . $recListNavView->getOutboxLink() . "'>Outbox</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>"; return $html; }