Call Recordings: List view updates.
This commit is contained in:
parent
40b8095e96
commit
fbd3f5adc8
|
|
@ -40,25 +40,25 @@ $text['title-call_recording']['ru-ru'] = "Запись разговора";
|
||||||
$text['title-call_recording']['sv-se'] = "";
|
$text['title-call_recording']['sv-se'] = "";
|
||||||
$text['title-call_recording']['uk-ua'] = "";
|
$text['title-call_recording']['uk-ua'] = "";
|
||||||
|
|
||||||
$text['title_description-call_recording']['en-us'] = "Shows the call recordings with name, length, date and time, and call direction.";
|
$text['title_description-call_recordings']['en-us'] = "Shows the call recordings with name, length, date and time, and call direction.";
|
||||||
$text['title_description-call_recording']['ar-eg'] = "";
|
$text['title_description-call_recordings']['ar-eg'] = "";
|
||||||
$text['title_description-call_recording']['de-at'] = "";
|
$text['title_description-call_recordings']['de-at'] = "";
|
||||||
$text['title_description-call_recording']['de-ch'] = "";
|
$text['title_description-call_recordings']['de-ch'] = "";
|
||||||
$text['title_description-call_recording']['de-de'] = "";
|
$text['title_description-call_recordings']['de-de'] = "";
|
||||||
$text['title_description-call_recording']['es-cl'] = "";
|
$text['title_description-call_recordings']['es-cl'] = "";
|
||||||
$text['title_description-call_recording']['es-mx'] = "";
|
$text['title_description-call_recordings']['es-mx'] = "";
|
||||||
$text['title_description-call_recording']['fr-ca'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
$text['title_description-call_recordings']['fr-ca'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
||||||
$text['title_description-call_recording']['fr-fr'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
$text['title_description-call_recordings']['fr-fr'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
|
||||||
$text['title_description-call_recording']['he-il'] = "";
|
$text['title_description-call_recordings']['he-il'] = "";
|
||||||
$text['title_description-call_recording']['it-it'] = "";
|
$text['title_description-call_recordings']['it-it'] = "";
|
||||||
$text['title_description-call_recording']['nl-nl'] = "Toont de gespreksopnamen met naam, lengte, datum/tijd en oproep richting.";
|
$text['title_description-call_recordings']['nl-nl'] = "Toont de gespreksopnamen met naam, lengte, datum/tijd en oproep richting.";
|
||||||
$text['title_description-call_recording']['pl-pl'] = "";
|
$text['title_description-call_recordings']['pl-pl'] = "";
|
||||||
$text['title_description-call_recording']['pt-br'] = "";
|
$text['title_description-call_recordings']['pt-br'] = "";
|
||||||
$text['title_description-call_recording']['pt-pt'] = "";
|
$text['title_description-call_recordings']['pt-pt'] = "";
|
||||||
$text['title_description-call_recording']['ro-ro'] = "";
|
$text['title_description-call_recordings']['ro-ro'] = "";
|
||||||
$text['title_description-call_recording']['ru-ru'] = "Показывает доступные записи разговоров с именем, датой, временем и направлением вызова.";
|
$text['title_description-call_recordings']['ru-ru'] = "Показывает доступные записи разговоров с именем, датой, временем и направлением вызова.";
|
||||||
$text['title_description-call_recording']['sv-se'] = "";
|
$text['title_description-call_recordings']['sv-se'] = "";
|
||||||
$text['title_description-call_recording']['uk-ua'] = "";
|
$text['title_description-call_recordings']['uk-ua'] = "";
|
||||||
|
|
||||||
$text['label-call_recording_name']['en-us'] = "Name";
|
$text['label-call_recording_name']['en-us'] = "Name";
|
||||||
$text['label-call_recording_name']['ar-eg'] = "";
|
$text['label-call_recording_name']['ar-eg'] = "";
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,6 @@
|
||||||
$sql_search = " (";
|
$sql_search = " (";
|
||||||
$sql_search .= " lower(call_recording_name) like :search ";
|
$sql_search .= " lower(call_recording_name) like :search ";
|
||||||
$sql_search .= " or lower(call_recording_path) like :search ";
|
$sql_search .= " or lower(call_recording_path) like :search ";
|
||||||
$sql_search .= " or lower(call_recording_description) like :search ";
|
|
||||||
$sql_search .= ") ";
|
$sql_search .= ") ";
|
||||||
$parameters['search'] = '%'.$search.'%';
|
$parameters['search'] = '%'.$search.'%';
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +135,7 @@
|
||||||
echo " <div style='clear: both;'></div>\n";
|
echo " <div style='clear: both;'></div>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
echo $text['description-call_recordings']."\n";
|
echo $text['title_description-call_recordings']."\n";
|
||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
|
|
||||||
echo "<form id='form_list' method='post'>\n";
|
echo "<form id='form_list' method='post'>\n";
|
||||||
|
|
@ -145,17 +144,22 @@
|
||||||
|
|
||||||
echo "<table class='list'>\n";
|
echo "<table class='list'>\n";
|
||||||
echo "<tr class='list-header'>\n";
|
echo "<tr class='list-header'>\n";
|
||||||
if (permission_exists('call_recording_add') || permission_exists('call_recording_edit') || permission_exists('call_recording_delete')) {
|
$col_count = 4;
|
||||||
|
if (permission_exists('call_recording_delete')) {
|
||||||
echo " <th class='checkbox'>\n";
|
echo " <th class='checkbox'>\n";
|
||||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($call_recordings ?: "style='visibility: hidden;'").">\n";
|
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($call_recordings ?: "style='visibility: hidden;'").">\n";
|
||||||
echo " </th>\n";
|
echo " </th>\n";
|
||||||
|
$col_count++;
|
||||||
|
}
|
||||||
|
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-40'");
|
||||||
|
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||||
|
echo "<th class='center'>".$text['label-recording']."</th>\n";
|
||||||
|
$col_count++;
|
||||||
}
|
}
|
||||||
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order);
|
|
||||||
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order);
|
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order);
|
||||||
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order);
|
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order);
|
||||||
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order);
|
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order);
|
||||||
echo " <th class='hide-sm-dn'>".$text['label-call_recording_description']."</th>\n";
|
if (permission_exists('xml_cdr_details')) {
|
||||||
if (permission_exists('call_recording_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
|
||||||
echo " <td class='action-button'> </td>\n";
|
echo " <td class='action-button'> </td>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
@ -163,31 +167,55 @@
|
||||||
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
|
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($call_recordings as $row) {
|
foreach ($call_recordings as $row) {
|
||||||
if (permission_exists('call_recording_edit')) {
|
//playback progress bar
|
||||||
$list_row_url = "call_recording_edit.php?id=".urlencode($row['call_recording_uuid']);
|
if (permission_exists('call_recording_play')) {
|
||||||
|
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n";
|
||||||
|
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||||
|
}
|
||||||
|
if (permission_exists('call_recording_play')) {
|
||||||
|
$list_row_url = "javascript:recording_play('".escape($row['call_recording_uuid'])."');";
|
||||||
}
|
}
|
||||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
echo "<tr class='list-row' href=\"".$list_row_url."\">\n";
|
||||||
if (permission_exists('call_recording_add') || permission_exists('call_recording_edit') || permission_exists('call_recording_delete')) {
|
if (permission_exists('call_recording_delete')) {
|
||||||
echo " <td class='checkbox'>\n";
|
echo " <td class='checkbox'>\n";
|
||||||
echo " <input type='checkbox' name='call_recordings[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
echo " <input type='checkbox' name='call_recordings[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||||
echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n";
|
echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
echo " <td>\n";
|
echo " <td class='overflow'>\n";
|
||||||
if (permission_exists('call_recording_edit')) {
|
if (permission_exists('xml_cdr_details')) {
|
||||||
echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['call_recording_name'])."</a>\n";
|
echo " <a href='".$list_row_url."' title=\"".$text['button-view']."\">".escape($row['call_recording_name'])."</a>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " ".escape($row['call_recording_name']);
|
echo " ".escape($row['call_recording_name']);
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td>".escape($row['call_recording_length'])."</td>\n";
|
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||||
echo " <td>".escape($row['call_recording_date'])."</td>\n";
|
echo " <td class='middle button center no-link no-wrap'>";
|
||||||
echo " <td>".escape($row['call_direction'])."</td>\n";
|
if (file_exists($row['call_recording_path'].'/'.$row['call_recording_name'])) {
|
||||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_recording_description'])."</td>\n";
|
if (permission_exists('call_recording_play')) {
|
||||||
if (permission_exists('call_recording_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
$recording_file_ext = pathinfo($row['call_recording_name'], PATHINFO_EXTENSION);
|
||||||
|
switch ($recording_file_ext) {
|
||||||
|
case "wav" : $recording_type = "audio/wav"; break;
|
||||||
|
case "mp3" : $recording_type = "audio/mpeg"; break;
|
||||||
|
case "ogg" : $recording_type = "audio/ogg"; break;
|
||||||
|
}
|
||||||
|
echo "<audio id='recording_audio_".escape($row['call_recording_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['call_recording_uuid'])."')\" onended=\"recording_reset('".escape($row['call_recording_uuid'])."');\" src='download.php?id=".urlencode($row['call_recording_uuid'])."' type='".$recording_type."'></audio>";
|
||||||
|
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['call_recording_uuid']),'onclick'=>"recording_play('".escape($row['call_recording_uuid'])."')"]);
|
||||||
|
}
|
||||||
|
if (permission_exists('call_recording_download')) {
|
||||||
|
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['call_recording_uuid']).'&t=bin']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo " </td>\n";
|
||||||
|
}
|
||||||
|
echo " <td>".($row['call_recording_length'] <= 59 ? '0:' : null).escape(str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT))."</td>\n";
|
||||||
|
$call_recording_date = explode(' ', $row['call_recording_date']);
|
||||||
|
echo " <td class='no-wrap'>".escape($call_recording_date['0'])." <span class='hide-sm-dn'>".escape($call_recording_date[1])."</span></td>\n";
|
||||||
|
echo " <td>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
|
||||||
|
if (permission_exists('xml_cdr_details')) {
|
||||||
echo " <td class='action-button'>\n";
|
echo " <td class='action-button'>\n";
|
||||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>PROJECT_PATH.'/app/xml_cdr/xml_cdr_details.php?id='.urlencode($row['call_recording_uuid'])]);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ if (!class_exists('call_recordings')) {
|
||||||
private $app_uuid;
|
private $app_uuid;
|
||||||
private $name;
|
private $name;
|
||||||
private $table;
|
private $table;
|
||||||
private $toggle_field;
|
|
||||||
private $toggle_values;
|
|
||||||
private $description_field;
|
private $description_field;
|
||||||
private $location;
|
private $location;
|
||||||
|
|
||||||
|
|
@ -29,8 +27,6 @@ if (!class_exists('call_recordings')) {
|
||||||
$this->app_uuid = '56165644-598d-4ed8-be01-d960bcb8ffed';
|
$this->app_uuid = '56165644-598d-4ed8-be01-d960bcb8ffed';
|
||||||
$this->name = 'call_recording';
|
$this->name = 'call_recording';
|
||||||
$this->table = 'call_recordings';
|
$this->table = 'call_recordings';
|
||||||
$this->toggle_field = '';
|
|
||||||
$this->toggle_values = ['true','false'];
|
|
||||||
$this->description_field = 'call_recording_description';
|
$this->description_field = 'call_recording_description';
|
||||||
$this->location = 'call_recordings.php';
|
$this->location = 'call_recordings.php';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue