Changeset 707


Ignore:
Timestamp:
Nov 15, 2010, 11:06:23 AM (13 years ago)
Author:
gav
Message:

Wire start view for showTab.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/AppCoreController.groovy

    r688 r707  
    6767        def sections = Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }
    6868
     69        def showTab = [:]
     70        switch (params.showTab) {
     71            case "showReportsTab":
     72                showTab.reports =  new String("true")
     73                break
     74            case "showOptionsTab":
     75                showTab.Options =  new String("true")
     76                break
     77            case "showAboutTab":
     78                showTab.about =  new String("true")
     79                break
     80            default:
     81                showTab.quickLinks = new String("true")
     82        }
     83
    6984        return [grailsVersion: grailsVersion,
    7085                    applicationString: applicationString,
    7186                    plugins: plugins,
    72                     sections: sections]
     87                    sections: sections,
     88                    showTab: showTab]
    7389    }
    7490
  • trunk/grails-app/views/appCore/start.gsp

    r706 r707  
    2323
    2424                <richui:tabLabels>
    25                     <richui:tabLabel selected="true" title="Quick Links" />
    26                     <richui:tabLabel selected="${0}" title="Reports" />
    27                     <richui:tabLabel selected="${0}" title="Options" />
    28                     <richui:tabLabel selected="${0}" title="About" />
     25                    <richui:tabLabel selected="${showTab.quickLinks}" title="Quick Links" />
     26                    <richui:tabLabel selected="${showTab.reports}" title="Reports" />
     27                    <richui:tabLabel selected="${showTab.Options}" title="Options" />
     28                    <richui:tabLabel selected="${showTab.about}" title="About" />
    2929                </richui:tabLabels>
    3030
Note: See TracChangeset for help on using the changeset viewer.