Jump to content

Last flight in admin panel


EENielsen

Recommended Posts

  • Administrators

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 :D

- 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...