mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add direct link button for dynamic destinations
Added a button that links directly to the currently selected destination's edit page if you have the permission to view or edit it.
This commit is contained in:
@@ -503,10 +503,21 @@ if (!class_exists('destinations')) {
|
||||
foreach($value as $k => $row) {
|
||||
$selected = ($row['destination'] == $destination_value) ? "selected='selected'" : '';
|
||||
$response .= " <option value='".$row['destination']."' $selected>".$row['label']."</option>\n";
|
||||
if ($row['destination'] == $destination_value) {
|
||||
$response_button = button::create([
|
||||
'type'=>'button',
|
||||
'icon'=>'external-link-alt',
|
||||
'id'=>'btn_dest_go',
|
||||
'title'=>$row['label'],
|
||||
//'style'=>'margin-left: 15px;',
|
||||
'link'=>'/app/'.$key.'/'.$this->singular($key).'_edit.php?id='.$row[$this->singular($key).'_uuid']
|
||||
])."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$response .= " </select>\n";
|
||||
$response .= " </select>".$response_button."\n";
|
||||
|
||||
|
||||
//debug information
|
||||
//echo $response;
|
||||
|
||||
Reference in New Issue
Block a user