#184 Mods to option open reports new Tab

Tony McCormick

This is an possible way to make opening reports in the frame or a separate tab. Seems like an easy way to do it. I only implemented the change on two menu entries for this review. I am interested in thought about this method. I think the funtion (genNewTab) may need some of the 'disabled' checking like gneMiscLink as well


left_nav.php is the worst tangled up pile of stuff now... so I don't want to add anything too complicated...


  • Brady Miller
    Brady Miller

    Placed comments on github.

  • Kevin Yeh
    Kevin Yeh

    Something to consider is that rather than create a new function and have to duplicate the "disabled" checking that you add a new optional parameter to genMiscLink which specifies that the menu item can be opened in a new tab.
    Also genMiscLink returns the link wrapped in <li></li> tags so your new function may not format the same.
    Because of the "tangled pile" issue I think that adding a new function makes it worse. Better to extend/modify the existing function and keep things together. I couldn't see the li tag issue/difference in github.

  • Tony McCormick
    Tony McCormick

    I actually tried doing this originally as an if block inside the genMiscLink function but it broke the menu entirely and after a while I gave up and made it a separate function. I might try it again...