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


<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") %>" class="active">Overview</a></li>
			        <li><a href="<%= Url.Action("Timeline", "Task") %>">Detailed</a></li>
                </ul>
            </div>
            <br />
            <div class="left-floating-panel">
                <table>
                    <tr>
                        <td>
                            <% using (Html.BeginForm("TimelineOverview", "Task", FormMethod.Post, new { id = "time-select-form" }))
                                { %>
                                <input type="hidden" id="SelectedDate" name="SelectedDate" />
                                <input type="hidden" id="SelectedProjectTags" name="SelectedProjectTags" />
                            <% } %>
                            <% Html.RenderPartial("Task/TaskTimelineOverviewSelect", Model.GetTaskTimelineOverviewSelectViewModel()); %>
                        </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="clear"></div>
            <br />
                <% Html.RenderPartial("Task/TaskTimelineOverview", Model.GetTaskTimelineOverviewViewModel()); %>
        </div>
    </div>
    <script type="text/javascript">
        function setSchedule(taskScheduleId) {
            $.ajax({
                type: 'GET',
                url: '<%= Url.Action("GetSetTaskSchedule", "Task") %>',
                cache: false,
                data: {
                    taskScheduleId: taskScheduleId
                },
                success: function (response) {
                    $("#modal-overlay").html(response);
                },
                complete: function () {
                    showModelDialog();
                }
            });
        }
    </script>
</asp:Content>
