<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Admin</title>
        <nav:resources override="true"/>
    </head>
    <body>
        <div class="nav">
            <nav:renderSubItems group="nav"/>
        </div>
        <div class="body">
            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>

                        <tr class="prop">
                            <td valign="top" class="name">
                                <label>Log:</label>
                            </td>
                            <td valign="top" class="value">
                                <g:link action="appLog">View</g:link> - The application log file.
                            </td>
                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name">
                                <label>Create:</label>
                            </td>
                            <td valign="top" class="value">

                                <g:if test="${offerBaseDataCreation}">
                                    <g:link action="createBaseData">Base</g:link> - Create the base data required for the application to function.
                                </g:if>
                                <g:else>
                                    <g:if test="${baseDataCreated}">
                                        Base data has been created.
                                    </g:if>
                                </g:else>

                                <br />

                                <g:if test="${demoDataCreationDisabled}">
                                    Demo data creation has been disabled.
                                </g:if>
                                <g:else>
                                    <g:if test="${offerDemoDataCreation}">
                                        <g:link action="createDemoData">Demo</g:link> - Create demo data for some example sites.
                                        <br />
                                        <g:link action="disableDemoDataCreation">Disable</g:link> - Disable demo data creation.
                                    </g:if>
                                    <g:else>
                                        <g:if test="${demoDataCreated}">
                                            Demo data has been created.
                                        </g:if>
                                    </g:else>
                                </g:else>

                            </td>
                        </tr>

                        <g:if env="development">
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label>Test:</label>
                                </td>
                                <td valign="top" class="value">
                                    <g:link action="createBulkTestData">Bulk</g:link> - Create a large volume of test data.
                                </td>
                            </tr>
                        </g:if>

                    </tbody>
                </table>
            </div> <!--End dialog-->
            <br />
            <br />
            <div class="errors">
                Warning!<br />
                The pages bellow this line are for use by the application admin only and NOT for daily use.<br />
                They allow direct administration of the back-end data, uncontrolled cascade deletion and updates may occur.<br />
                The manager authorisation and pages should be used for normal daily use.<br />
            </div>
            <br/>
            <div class="dialog">
                <ul>
                <g:each var="c" in="${grailsApplication.controllerClasses.sort { p1, p2 -> p1.fullName.compareToIgnoreCase(p2.fullName) } }">
                        <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.logicalPropertyName[0].toUpperCase() + c.logicalPropertyName[1..-1]}</g:link></li>
                </g:each>
                </ul>
            </div>
        </div>
    </body>
</html>
