Alphanumeric order for Track Types in dropdown menu
This commit is contained in:
parent
c4a79d8d3e
commit
febbe6233a
|
@ -144,6 +144,11 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
|||
|
||||
$track_type_options = array();
|
||||
$track_types = Application_Model_Tracktype::getTracktypes();
|
||||
|
||||
array_multisort(array_map(function($element) {
|
||||
return $element['type_name'];
|
||||
}, $track_types), SORT_ASC, $track_types);
|
||||
|
||||
foreach ($track_types as $key => $tt) {
|
||||
$track_type_options[$tt['code']] = $tt['type_name'];
|
||||
}
|
||||
|
|
|
@ -94,6 +94,11 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
// Add track type dropdown
|
||||
$track_type_options = array();
|
||||
$track_types = Application_Model_Tracktype::getTracktypes();
|
||||
|
||||
array_multisort(array_map(function($element) {
|
||||
return $element['type_name'];
|
||||
}, $track_types), SORT_ASC, $track_types);
|
||||
|
||||
$track_type_options[""] = _('Select a Type');
|
||||
foreach ($track_types as $key => $tt) {
|
||||
$track_type_options[$tt['code']] = $tt['type_name'];
|
||||
|
|
|
@ -61,6 +61,11 @@ class Application_Model_Library
|
|||
{
|
||||
$track_type_options = array(NULL => _("None"));
|
||||
$track_types = Application_Model_Tracktype::getTracktypes();
|
||||
|
||||
array_multisort(array_map(function($element) {
|
||||
return $element['type_name'];
|
||||
}, $track_types), SORT_ASC, $track_types);
|
||||
|
||||
foreach ($track_types as $key => $tt) {
|
||||
$track_type_options[$tt['code']] = $tt['type_name'];
|
||||
}
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
$used = $disk->totalSpace-$disk->totalFreeSpace;
|
||||
$total = $disk->totalSpace;
|
||||
$tracktypes = Application_Model_Tracktype::getTracktypes();
|
||||
|
||||
array_multisort(array_map(function($element) {
|
||||
return $element['type_name'];
|
||||
}, $tracktypes), SORT_ASC, $tracktypes);
|
||||
|
||||
if(count($tracktypes) == 0) {
|
||||
$hasTracktypes = "disabled";
|
||||
$showTracktypesDropdown = false;
|
||||
|
|
Loading…
Reference in New Issue