Jump to content

[SOLVED] Edit Button missing from Admin Pilot List


TennShadow

Recommended Posts

My "edit" link in the admin pilots list is gone and I need to know which files to replace to fix the issue.

Here is what happened.

Sometime ago I applied some code I got on the forum (that I can't find now) to add a column in the admin pilot list to show the last location of the pilots.

If you see the attached screenshot you see in the "Edit" column it only shows the ICAO of the last location and not the "edit" link. I've replaced the code in admin/templates/pilotlist.tpl with the below but doesn't correct the issue.

<h3>Pilots List</h3>

<table id="grid"></table>
<div id="pager"></div>
<br />

<link rel="stylesheet" type="text/css" media="screen" href="<?php echo fileurl('/lib/js/jqgrid/css/ui.jqgrid.css');?>" />
<script src="<?php echo fileurl('/lib/js/jqgrid/js/i18n/grid.locale-en.js');?>" type="text/javascript"></script>
<script src="<?php echo fileurl('/lib/js/jqgrid/js/jquery.jqGrid.min.js');?>" type="text/javascript"></script>

<script type="text/javascript">
$("#grid").jqGrid({
  url: '<?php echo adminaction('/pilotadmin/getpilotsjson');?>',
  datatype: 'json',
  mtype: 'GET',
  colNames: ['', 'First', 'Last', 'Email', 'Location', 'Status', 'Rank', 'Flights', 'Hours', 'IP', 'Edit'],
  colModel : [
               {index: 'id', name: 'id', hidden: true, search: false },                
               {index: 'firstname', name : 'firstname',sortable : true, align: 'left', search: 'true', searchoptions:{sopt:['in']}},
               {index: 'lastname', name : 'lastname',  sortable : true, align: 'left', searchoptions:{sopt:['in']}},
               {index: 'email', name : 'email', sortable : true, align: 'left',searchoptions:{sopt:['li']}},
               {index: 'location', name : 'location',  sortable : true, align: 'center',searchoptions:{sopt:['eq','ne']}},
               {index: 'retired', name : 'status', sortable : true, align: 'center',searchoptions:{sopt:['in']}},
               {index: 'rank', name : 'rank', sortable : true, align: 'center', searchoptions:{sopt:['eq','ne']}},
               {index: 'totalflights', name : 'totalflights', sortable : true, align: 'center',searchoptions:{sopt:['lt','gt']}},
               {index: 'totalhours', name : 'totalhours', sortable : true, align: 'center',searchoptions:{sopt:['lt','gt']}},
               {index: 'lastip', name : 'lastip', sortable : true, align: 'center', searchoptions:{sopt:['in']}},
               {index: '', name : '', sortable : true, align: 'center', search: false}
       ],
   pager: '#pager', rowNum: 25,
   sortname: 'pilotid', sortorder: 'asc',
   viewrecords: true, autowidth: true,
   height: '100%'
});

jQuery("#grid").jqGrid('navGrid','#pager', 
       {edit:false,add:false,del:false,search:true,refresh:true},
       {}, // edit 
       {}, // add 
       {}, //del 
       {multipleSearch:true} // search options 
); 
</script>

This leads me to believe that I must have modified another file but I can't figure out which one. I do not need the last location in the admin panel anymore and I'd like to make that like the default again. Could anyone point me to the other file that I need to default? BTW, I don't want to default the whole admin folder because I have modified a few other files.

Thanks in advanced

Keith

post-94-055873600 1288545869_thumb.jpg

Link to comment
Share on other sites

Jeff posted a fix to the sort active inactive and added pilot numbers, ill have a search and post that link.

http://forum.phpvms....dpost__p__25982

That will fix you up

That did it. Thanks!

What is funny about this ( or sad really) is I read that post 3 times before I posted this and missed it every time. I guess it is time to get out of bed and go run for a while. LOL.

Thank again Mark!

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