<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToolBar?>
<?import javafx.scene.layout.AnchorPane?>

<AnchorPane maxHeight="480.0" maxWidth="640.0" minHeight="480.0" minWidth="640.0" prefHeight="480.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.chronos.admin.Controller">
    <children>
        <TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
            <tabs>
                <Tab text="connect">
                    <content>
                        <AnchorPane>
                            <children>
                                <ToolBar prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="connect_host" prefHeight="27.0" prefWidth="100.0" promptText="server" text="localhost" />
                                        <TextField fx:id="connect_port" prefHeight="27.0" prefWidth="60.0" promptText="port" text="3306" />
                                        <TextField fx:id="connect_user" prefHeight="27.0" prefWidth="120.0" promptText="username" text="root" />
                                        <TextField fx:id="connect_pass" layoutX="174.0" layoutY="11.0" prefHeight="27.0" prefWidth="120.0" promptText="password" />
                              <TextField fx:id="connect_database" layoutX="302.0" layoutY="11.0" prefHeight="27.0" prefWidth="120.0" promptText="database" text="chronos" />
                                        <Button fx:id="connect_go" mnemonicParsing="false" onAction="#connect" text="go" />
                                    </items>
                                </ToolBar>
                                <Label fx:id="connect_status" alignment="CENTER" layoutX="4.0" layoutY="214.0" text="not connected" textAlignment="CENTER" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="214.0" />
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
                <Tab text="schools">
                    <content>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                            <children>
                                <TableView fx:id="schools_table" layoutY="44.0" prefHeight="403.0" prefWidth="640.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="40.0" />
                                <ToolBar layoutX="17.0" layoutY="3.0" prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="schools_search" promptText="simple search" />
                                        <Button fx:id="schools_go" mnemonicParsing="false" onAction="#querySchools" text="go" />
                                    </items>
                                </ToolBar>
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
                <Tab text="add school">
                    <content>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                            <children>
                                <ToolBar prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="add_school_name" prefHeight="27.0" prefWidth="99.0" promptText="name" />
                                        <TextField fx:id="add_school_domain" prefHeight="27.0" prefWidth="195.0" promptText="domain" />
                                        <Button fx:id="add_school_go" mnemonicParsing="false" onAction="#addSchool" text="go" />
                                    </items>
                                </ToolBar>
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
                <Tab text="delete school">
                    <content>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                            <children>
                                <ToolBar prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="delete_school_id" prefHeight="27.0" prefWidth="99.0" promptText="id" />
                                        <Button fx:id="delete_school_go" mnemonicParsing="false" onAction="#deleteSchool" text="go" />
                                    </items>
                                </ToolBar>
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
                <Tab text="users">
                    <content>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                            <children>
                                <TableView fx:id="users_table" layoutY="44.0" prefHeight="403.0" prefWidth="640.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="40.0" />
                                <ToolBar layoutX="17.0" layoutY="3.0" prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="users_school" prefHeight="27.0" prefWidth="113.0" promptText="school id" />
                                        <Button fx:id="users_go" mnemonicParsing="false" onAction="#queryUsers" text="go" />
                                    </items>
                                </ToolBar>
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
                <Tab text="add user">
                    <content>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                            <children>
                                <ToolBar layoutX="17.0" layoutY="3.0" prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                    <items>
                                        <TextField fx:id="add_user_school" prefHeight="27.0" prefWidth="83.0" promptText="school id" />
                                        <TextField fx:id="add_user_name" layoutX="10.0" layoutY="11.0" prefHeight="27.0" prefWidth="132.0" promptText="name" />
                                        <TextField fx:id="add_user_email" layoutX="100.0" layoutY="11.0" prefHeight="27.0" prefWidth="112.0" promptText="email" />
                                        <TextField fx:id="add_user_role" prefHeight="27.0" prefWidth="65.0" promptText="role" />
                                        <Button fx:id="add_user_go" mnemonicParsing="false" onAction="#addUser" text="go" />
                                    </items>
                                </ToolBar>
                            </children>
                        </AnchorPane>
                    </content>
                </Tab>
            <Tab text="modify user">
               <content>
                  <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <ToolBar layoutX="17.0" layoutY="3.0" prefHeight="40.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                           <items>
                              <TextField fx:id="modify_user_school" prefHeight="27.0" prefWidth="83.0" promptText="school id" />
                              <TextField fx:id="modify_user_id" layoutX="10.0" layoutY="11.0" prefHeight="27.0" prefWidth="74.0" promptText="user id" />
                              <Button fx:id="modify_user_load" mnemonicParsing="false" onAction="#modifyUserLoad" text="load" />
                              <TextField fx:id="modify_user_name" layoutX="10.0" layoutY="11.0" prefHeight="27.0" prefWidth="132.0" promptText="name" />
                              <TextField fx:id="modify_user_email" layoutX="100.0" layoutY="11.0" prefHeight="27.0" prefWidth="112.0" promptText="email" />
                              <TextField fx:id="modify_user_role" prefHeight="27.0" prefWidth="65.0" promptText="role" />
                              <Button fx:id="modify_user_go" mnemonicParsing="false" onAction="#modifyUser" text="go" />
                           </items>
                        </ToolBar>
                     </children>
                  </AnchorPane>
               </content>
            </Tab>
            </tabs>
        </TabPane>
    </children>
</AnchorPane>
