<%@ Page Language="C#" AutoEventWireup="true" UICulture="auto" Culture="auto" meta:resourcekey="PageResource1" %>

<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Globalization" %>

<script runat="server">
    String version = WebAppVersion.GetWebAppVersion();

    //@Override this is suggested by Microsoft, overriding the initialize culture function (that is
    //automatically called by the aspx.
    //Checks if the cookie exists and sets the language correctly, otherwise will fall-back to the default language
    //(English).
    protected override void InitializeCulture()
    {
        HttpCookie lang = Request.Cookies["siteLanguage"];

        String selectedLanguage = (lang != null) ? lang.Value : "en";
        UICulture = selectedLanguage;
        Culture = selectedLanguage;

        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
        Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedLanguage);
        base.InitializeCulture();
    }
</script>

<%  
    //this prevents the browser from caching templates. (on IE the templates where cached with the old language
    //too, so the change language was not working, this is a workaround for that).

    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetExpires(DateTime.Now.AddMinutes(-30)); %>

<%--view template starts here (will be appended inside a row-fluid)--%>

<link href="<%= ResolveUrl("~/assets/libs/js/backgrid-0.3.5/lib/backgrid.css")%>" rel="stylesheet" />
<link href="<%= ResolveUrl("~/assets/libs/js/backgrid-0.3.5/extensions/valid-limit-cell/backgrid-valid-limit-cell.css") %>" rel="stylesheet" />
<link href="<%= ResolveUrl("~/app/custom-screens/" + Path.GetFileNameWithoutExtension(this.Request.PhysicalPath) + "/" + Path.GetFileNameWithoutExtension(this.Request.PhysicalPath) + ".css")%>" rel="stylesheet" />

<div class="row-fluid subnavbar fixed-subnavbar" id="subnavbar_controls" style="margin-bottom: 0px;height:18px !important;">
    <div class="row-fluid form-inline">
        <div class="span10">
            <label class="control-label" for="dateStartTbx">
                <asp:localize runat="server" meta:resourcekey="date_start_tbx_label" />
            </label>
            <label class="input-prepend">
                <span class="add-on"><i class="icon-calendar"></i></span>
                <input type="text" id="dateStartTbx" class="input-date" style="z-index:1000;" data-bind="value: momentFormat(start$, 'YYYY-MM-DD', '<asp:Localize runat=server meta:resourcekey=mmddyyyy_format />')">
            </label>
             <button id="refreshBtn" class="btn btn-primary" style="" title="<asp:localize runat=server meta:resourcekey=refresh_btn_title />">
                <i class="fa fa-refresh"></i>
            </button>
            
        </div>
    </div>
</div>
<div class="row-fluid screen-content">
    <div class="pull-left" style="width:100%;margin-left:0;margin-top:-30px">  
        <div class="processes-grid-container" style="margin-top:20px" data-bind="classes: { hide: any(not(hasData), isLoading), }" ></div>
        <div class="auto-fill-grid-container" style="margin-top:20px" data-bind="classes: { hide: any(not(hasData), isLoading), }" id="autofill"></div>

        <div class="row-fluid" style="margin-top:0px !important;text-align:center" data-bind="classes: { hide: any(not(hasData), isLoading, readOnlyPermission), }">
            <div class="span3"></div>
        <div class="span6 row-fluid form-inline">
            <label style="display:inline-block;margin: 0 0 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio1" value='NONE' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                    None
            </label>
            <label style="display:inline-block;margin: 0 10px 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio2" value='ALL' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                All
            </label>
            <label style="display:inline-block;margin: 0 0 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio3" value='WEEK1' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                Week 1
            </label>
            <label style="display:inline-block;margin: 0 10px 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio4" value='WEEK2' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                Week 2
            </label>
            <label style="display:inline-block;margin: 0 10px 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio5" value='WEEK3' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                Week 3
            </label>
            <label style="display:inline-block;margin: 0 10px 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio6" value='WEEK4' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                Week 4
            </label>
            <label style="display:inline-block;margin: 0 10px 0 50px";>
                <input class="big-radio" data-bind="checked: filterGroup" type="radio" name="radio" id="radio7" value='WEEK5' style="margin-bottom: 5px;" />
            </label>
            <label style="font-weight: bold;font-size:10px">
                Week 5
            </label>
        </div>
            <div class="span3"></div>
        </div>
        <div class="row-fluid" data-bind="classes: { hide: any(not(hasData), isLoading,readOnlyPermission), }" style="margin-top:0px !important;text-align:center;">
            <div class="span3"></div>
            <div class="span6">
                 <div class="row-fluid form-inline">
                     <button class="btn btn-primary" style="width:100px;height:30px;font-size:12px;"  id="clearBtn">
                         Clear
                     </button>
                    <button class="btn btn-primary" style="width:100px;height:30px;font-size:12px;;"  id="saveBtn">
                         Save
                     </button>
                    <button class="btn btn-primary" style="width:100px;height:30px;font-size:12px;"  id="submitBtn">
                         Submit
                     </button>
                 
                 </div>

            </div>
            <div class="span3"></div>
        </div>

        <%--<div class="no-data-poster row-fluid text-center animated fadeIn" data-bind="classes: { hide: any(hasData, isLoading), }" style="height:500px;">
            <div class="row-fluid" style="position:relative;top:100px;">
                <i class="fw-icon-circle-blank fw-icon-4x" style="font-size:115px;"></i>
            </div>
            <div class="row-fluid" style="position:relative;top:115px;">
                <h3 style="font-size:50px;">
                    <asp:localize runat="server" meta:resourcekey="no_data_available" />
                </h3>
            </div>
        </div>--%>
        <div class="no-data-poster row-fluid text-center animated fadeIn" data-bind="classes: { hide: not(isLoading), }" style="height:500px;">
            <div class="row-fluid" style="position:relative;top:100px;">
                <i class="fa fa-cog fw-icon-4x fa-spin" style="font-size:115px;"></i>
            </div>
            <div class="row-fluid" style="position:relative;top:115px;">
                <h3 style="font-size:50px;">
                    <asp:localize runat="server" meta:resourcekey="loading_data" />
                </h3>
            </div>
        </div>
    </div>


</div>