@import helper.CSRF
@(rootAccountName: String)(controller: String)(pageHeader: String)(pageContent: Html)(pagePlugins: Html)(implicit request: play.api.mvc.Request[Any], requestHeader: RequestHeader, customLinks: models.CustomLinks, meta: models.Meta)

<!DOCTYPE html>
<html lang="en">
    <head>
        <!-- META SECTION -->
        <title>@pageHeader | VinylDNS</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta name="google" content="notranslate" />
        <meta id="csrf" content="@CSRF.getToken.value" />
        <link rel="icon" href="/public/images/favicon.ico" type="image/x-icon" />
        <!-- END META SECTION -->

        <!-- CSS INCLUDE -->
        <link rel="stylesheet" type="text/css" id="theme" href="/public/css/bootstrap.min.css"/>
        <link rel="stylesheet" type="text/css" href="/public/css/font-awesome.min.css">
        <link rel="stylesheet" type="text/css" href="/public/css/ui.css" />
        <link rel="stylesheet" type="text/css" id="custom" href="/public/css/theme-overrides.css"/>
        <link rel="stylesheet" type="text/css" id="custom" href="/public/css/vinyldns.css"/>
        <link rel="stylesheet" type="text/css" href="/public/css/angular-cron-jobs.min.css">
        <link rel="stylesheet" type="text/css" href="/public/css/jquery-ui.css">
        <!-- EOF CSS INCLUDE -->
    </head>

    <body class="nav-md" ng-app="vinyldns" ng-controller="AppController">
        <div class="container body">

            <div class="alert-wrapper">
                <div ng-repeat="alert in alerts">
                    <notification ng-model="alert"></notification>
                </div>
            </div>
            <!-- START PAGE CONTAINER -->
            <div class="main_container" ng-cloak ng-controller="@controller">

            <!-- START PAGE SIDEBAR -->
                <div class="col-md-3 left_col" id="fixed-side-menu">
                    <div class="left_col scroll-view">
                        <div class="navbar nav_title vinyldns-nav-title">
                            <a href="/index"><span><img src="/assets/images/vinyldns-portal.png" class="vinyldns-logo"/></span></a>
                            <a href="/index"><img src="/assets/images/vinyldns-logo.png" class="vinyldns-logo vinyldns-logo-small"/></a>
                        </div>
                        <div class="clearfix"></div>
                        <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                            <div class="menu_section">
                                <ul class="nav side-menu vinyldns-side-menu">
                                  @if(controller == "DnsChangesController" || controller == "DnsChangeNewController" || controller == "DnsChangeDetailController") {
                                    <li class="active">
                                        } else {
                                    <li>
                                        }
                                        <a href="/dnschanges"><i class="fa fa-list-ol"></i>DNS Changes</a>
                                    </li>
                                    @if(controller == "RecordSetsController") {
                                    <li class="active">
                                        } else {
                                    <li>
                                        }
                                        <a href="/recordsets"><i class="fa fa-search"></i>RecordSet Search</a>
                                    </li>
                                  @if(controller == "GroupsController" || controller == "MembershipController") {
                                    <li class="active">
                                        } else {
                                    <li>
                                        }
                                        <a href="/groups"><i class="fa fa-group"></i>Groups</a>
                                    </li>
                                  @if(controller == "RecordsController" || controller == "ZonesController") {
                                    <li class="active">
                                  } else {
                                    <li>
                                  }
                                    <a href="/zones"><i class="fa fa-table"></i>Zones</a>
                                  </li>
                                  @*****************************************
                                   * Custom links from application config *
                                   *****************************************@
                                    @for(link <- customLinks.links) {
                                      @if(link.displayOnSidebar) {
                                        <li>
                                          <a href='@{link.href}' target="_blank" rel="noopener noreferrer">
                                              <i class='@{link.icon}'></i><!--
                                              -->@{link.title}
                                          </a>
                                        </li>
                                      }
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>

                @header(rootAccountName)(request)
                @pageContent

                <footer><p class="main-footer-text text-right">VinylDNS (version @{meta.version})</p></footer>
            </div>
            <!-- END PAGE CONTAINER -->

            <!-- MESSAGE BOX-->
            <div class="fade in modal" id="mb-signout" data-sound="alert">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                            <h4>Log Out?</h4>
                        </div>
                        <div class="modal-body">
                            <p>Are you sure you want to log out?</p>
                            <p>Press No if you want to continue work. Press Yes to logout current user.</p>
                        </div>
                        <div class="modal-footer">
                            <div class="pull-right">
                                <a href="/logout" class="btn btn-info">Yes</a>
                                <button class="btn btn-primary" data-dismiss="modal">No</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
            <!-- END MESSAGE BOX-->

        <!-- CREDS BOX -->
        <div class="fade in modal" id="mb-creds" data-sound="alert">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                        <h4>Regenerate Credentials?</h4>
                    </div>
                    <div class="modal-body">
                        <p>If you regenerate your credentials you will receive new credentials and your existing
                            credentials will be invalidated. If you use any VinylDNS tools beyond this portal you will
                            need to provide those tools with your new credentials.</p>
                    </div>
                    <div class="modal-footer">
                        <span class="text-danger">Are you sure you want to regenerate your credentials?&nbsp;</span>
                        <button class="btn btn-danger pull-right" ng-click="regenerateCredentials()">Yes</button>
                        <button class="btn btn-primary" data-dismiss="modal">No</button>
                    </div>
                </div>
            </div>
        </div>


        <script src="/public/js/moment.min.js"></script>
        <script src="/public/js/jquery.min.js"></script>
        <script src="/public/js/jquery-ui.js"></script>
        <script src="/public/js/bootstrap.min.js"></script>
        <script src="/public/js/angular.min.js"></script>
        <script src="/public/js/ui.js"></script>
        <script src="/public/js/vinyldns.js"></script>
        <script src="/public/app.js"></script>
        <script src="/public/js/custom.js"></script>
        <script src="/public/js/angular-cron-jobs.min.js"></script>

        @pagePlugins

    </body>
</html>
