diff --git a/application/views/admin/token/browse.php b/application/views/admin/token/browse.php index f11ec5e6ad5..89b97297630 100644 --- a/application/views/admin/token/browse.php +++ b/application/views/admin/token/browse.php @@ -1,6 +1,5 @@ session['adminlang']); if (Yii::app()->session['adminlang'] != 'auto') @@ -17,27 +16,22 @@ } } $langnames = implode(";", $lname); - /* Build the columnNames for the extra attributes */ - /* and, build the columnModel */ + // Build the columnNames for the extra attributes + // and, build the columnModel $names = array_keys(getTokenFieldsAndNames($surveyid, true)); - $attributes = getAttributeFieldNames($surveyid); + $attributes = getTokenFieldsAndNames($surveyid,true); + $uidNames=$columnNames=$aColumnHeader=array(); if (count($attributes) > 0) { - foreach ($names as $name) + foreach ($attributes as $sFieldname=>$aData) { - $attnames[] = '"' . $name . '"'; + $uidNames[] = '{ "name":"' . $sFieldname . '", "index":"' . $sFieldname . '", "sorttype":"string", "sortable": true, "align":"center", "editable":true, "width":75}'; + $aColumnHeaders[]=$aData['description']; } - foreach ($attributes as $row) - { - $uidNames[] = '{ "name":"' . $row . '", "index":"' . $row . '", "sorttype":"string", "sortable": true, "align":"center", "editable":true, "width":75}'; - } - $columnNames = implode(',', $attnames); //Add to the end of the standard list of columnNames + $columnNames='"'.implode('","',$aColumnHeaders).'"'; } - else - { - $columnNames = ""; - } - /* Build the javasript variables to pass to the jqGrid */ + + // Build the javasript variables to pass to the jqGrid ?>