<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Task.Master" Inherits="System.Web.Mvc.ViewPage<AdministratorConsole.Models.TaskController.TimelineViewModel>" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.DevExpress().RenderScripts(Page,
        new Script { ExtensionSuite = ExtensionSuite.Editors }); %>
    <% Html.DevExpress().RenderStyleSheets(Page,
            new StyleSheet { ExtensionSuite = ExtensionSuite.Editors }
     ); %>
    <script src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Scripts/vis-timeline/moment-with-locales.js" type="text/javascript"></script>
    <script src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Scripts/vis-timeline/vis-timeline-graph2d.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Scripts/vis-timeline/vis-timeline-graph2d.min.css" />
    <div id="content-wrap">
        <% Html.RenderPartial("Navigation/_SideNavigation", Model.MenuNavigationModel); %>
        <div id="content">
	        <h1 class="left-floating-panel">Task Timeline</h1>
            <div class="right-floating-panel">Server Timezone<br /><b><%= DateTimeHelper.GetTimezoneName() %></b></div>
            <div class="clear"></div>
            <div id="tab-container">
                <ul class="tabs">
			        <li><a href="<%= Url.Action("TimelineOverview", "Task") %>">Overview</a></li>
			        <li><a href="<%= Url.Action("Timeline", "Task") %>" class="active">Detailed</a></li>
                </ul>
            </div>
            <br />
            <div class="left-floating-panel">
                <table>
                    <tr>
                        <td><% Html.RenderPartial("Task/TaskTimelineSelect", Model.GetTaskTimelineSelectViewModel()); %></td>
                        <td style="padding-left:30px"><input type="checkbox" id="show-on-change" value="true" checked="checked"/> Show "Only On Change" tasks</td>
                    </tr>
                </table>
            </div>
            <div class="expand-icon-button"><img src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Images/Icons/expand.png" title="Full Screen" onclick="fullscreenDiv('TaskTimelineContainer');" /></div>
            <div class="clear"></div>
            <div id="TaskTimelineContainer" class="reportPanel-scrollingbody" style="padding-bottom:100px"><% Html.RenderPartial("Task/TaskTimeline", Model.GetTaskTimelineViewModel()); %></div>
        </div>
    </div>
    <script type="text/javascript">
        function selectTimelineRange(selectedDate, taskProcessors) {
            window.location.href = "<%= Url.Action("Timeline", "Task") %>?selectedDate=" + selectedDate + "&taskProcessors=" + taskProcessors;
        }

    </script>
</asp:Content>
