You can actually do it in the template (schedule_results.tpl)
The example is there, which skips the day if it’s not the current day. You can easily add code there to check any other conditions (for instance the last airport).
So you can do it in the template, that way it’s totally portable. I try to leave controllers to retrieve data, then dictate the template to display it. Then any (simple) display logic can go in the template.
You can actually do it in the template (schedule_results.tpl)
The example is there, which skips the day if it’s not the current day. You can easily add code there to check any other conditions (for instance the last airport).
So you can do it in the template, that way it’s totally portable. I try to leave controllers to retrieve data, then dictate the template to display it. Then any (simple) display logic can go in the template.
I was thinking of restricting specific airports to specific pilot levels. So for example, the newbies can fly the larger, easier airports (Kathmandu, Nepal Gunj), but not the small and very challenging ones (Lukla, Paro) so it would need to take AC/Aerodrome/and pilot level into account. So I was expecting to have to add a difficulty rating to each airport, (suppose I could modify the ICAO method) and enter that as field, I figured that AC and pilot level are there already.
Can I still do it with schedule_results.tpl? (That would be great because I was expecting to have to do the whole thing.)
You could but it wouldn’t be very clean. Probably a module would be good for it, with a call to the module function within the template. You can add a column to the db, though then you would need to edit it which is an admin panel mod