Hello, is there anyway to edit the code in the admin panels pilot roster so I can see on the main page when the pilot has last flown a flight, without should pressing “Edit” for seeing such?
As it would do the work easier for some of us
- Emil
Hello, is there anyway to edit the code in the admin panels pilot roster so I can see on the main page when the pilot has last flown a flight, without should pressing “Edit” for seeing such?
As it would do the work easier for some of us
Hello, is there anyway to edit the code in the admin panels pilot roster so I can see on the main page when the pilot has last flown a flight, without should pressing “Edit” for seeing such?
As it would do the work easier for some of us
- Emil
Open PilotAdmin.php in root/admin/modules/PilotAdmin
Find Line 360
$edit = '<a href="'.adminurl('/pilotadmin/viewpilots?action=viewoptions&pilotid='.$row->pilotid).'">Edit</a>';
Add a blank line under it and add
$last = PIREPData::getLastReports($row->pilotid, '1', '');
Find line 375 (will be 374 if you have not done above)
$row->lastip,
Add a blank line under it and add
$last->arricao,
Open pilots_list.tpl in root/admin/templates
Find line 16
colNames: ['','First', 'Last', 'Email', 'Location', 'Status', 'Rank', 'Flights', 'Hours', 'IP', 'Edit'],
and change it to
colNames: ['','First', 'Last', 'Email', 'Location', 'Status', 'Rank', 'Flights', 'Hours', 'IP', 'Last Location', 'Edit'],
Find line 27
{index: 'lastip', name : 'lastip', sortable : true, align: 'center', searchoptions:{sopt:['in']}},
Add a blank line below it and add
{index: 'lastlocation', name : 'lastlocation', sortable : true, align: 'center', searchoptions:{sopt:['in']}},
Save everything and it should give you the last arr icao in the view all pilots table.
_ Remember: this will get overwritten in updates and will have to be done again. _