<%@ Page Title="UGCC Workshop Mod Installer" Language="C#" MasterPageFile="~/UGCCNG.Master" AutoEventWireup="true" CodeBehind="modinstaller.aspx.cs" Inherits="UGCC_Sharp.modinstaller" ValidateRequest="false" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="panel panel-default">
        <div class="panel-heading">
            <asp:Literal ID="ltlAboutTitle" Text="About the workshop installer tool" runat="server" meta:resourcekey="ltlAboutTitleResource1"></asp:Literal>
        </div>
        <div class="panel-body" id="updatePnl" runat="server">
            <asp:Literal ID="ltlAboutText" runat="server" meta:resourcekey="ltlAboutTextResource1" Text="The mod installer tool automates the installation and update of steam workshop mods."></asp:Literal>
        </div>
    </div>
    <p>
        <h4><div runat="server" id="divServerName"></div></h4>
    </p>
    <p>
        <div runat="server" id="divWorkshopURL"></div>
    </p>

    <div class="row">
        <div class="col-lg-6">
            <div class="form-group">
                <asp:Literal ID="ltlMods" runat="server" Text="Mods" meta:resourcekey="ltlModsResource1"></asp:Literal>
                <div class="input-group">
                    <div class="input-group-btn">
                        <asp:DropDownList ID="ddlMods" runat="server" class="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddlMods_SelectedIndexChanged" meta:resourcekey="ddlModsResource1"></asp:DropDownList>
                        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <asp:Literal ID="ltlActionsBtn" runat="server" Text="Actions" meta:resourcekey="ltlActionsBtnResource1"></asp:Literal><span class="caret"></span></button>
                        <ul class="dropdown-menu dropdown-menu-right">
                            <li>
                                <a href="#" data-toggle="modal" data-target="#myModal"><asp:Literal ID="ltlAddNew" runat="server" Text="Add new workshop item" meta:resourcekey="ltlAddNewResource1"></asp:literal>
                                </a>

                            </li>
                            <li>
                                <a href="#" data-toggle="modal" data-target="#myModalCol">
                                    <asp:Literal ID="Literal1" runat="server" Text="Import from collection" meta:resourcekey="Literal1Resource1"></asp:Literal>
                                </a>
                            </li>
                            <li>
                                <asp:LinkButton runat="server" ID="lnkUpdate" OnClick="lnkUpdate_Click" meta:resourcekey="lnkUpdateResource1" Text="Update selected item"></asp:LinkButton></li>
                            <li>
                                <asp:HyperLink ID="hypView" runat="server" meta:resourcekey="hypViewResource1" Text="View workshop item's page"></asp:HyperLink></li>
                            <li>
                                <asp:LinkButton runat="server" ID="lnkRemove" OnClick="lnkRemove_Click" meta:resourcekey="lnkRemoveResource1" Text="Remove selected item"></asp:LinkButton></li>

                        </ul>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <p>
        <span class="checkbox checkbox-inline text-center">
            <asp:CheckBox ID="chkRestart" runat="server" Checked="True" type="checkbox"
                Text="Restart server after workshop update" meta:resourcekey="chkRestartResource1" />
        </span>
    </p>
    <div class="form-group">
        <asp:Button ID="btnInstall" runat="server" Text="Install / Update All" CssClass="btn btn-primary" OnClick="btnInstall_Click" meta:resourcekey="btnInstallResource1" />
        <asp:Button ID="btnQStat" runat="server" Text="View Status" CssClass="btn btn-info" OnClick="btnQStat_Click" meta:resourcekey="btnQStatResource1" />
        <asp:Button ID="btnStop" runat="server" Text="Stop Server" CssClass="btn btn-warning" OnClick="btnStop_Click" meta:resourcekey="btnStopResource1" />
        <asp:Button ID="btnReturn" runat="server" Text="Return" CssClass="btn btn-default" OnClick="btnReturn_Click"/>
    </div>
    <p>
        <asp:TextBox ID="txtSteamID" Visible="False" runat="server" meta:resourcekey="txtSteamIDResource1"></asp:TextBox>
        <asp:TextBox ID="txtModIds" Visible="False" runat="server" meta:resourcekey="txtModIdsResource1"></asp:TextBox>
    </p>
    <p>
        <div runat="server" id="lblError"></div>
    </p>
    <!-- Modal -->
    <div class="modal fade" id="myModalCol" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabelCol">
                        <asp:Literal ID="ltlImportCollectionTitle" runat="server" Text="Import workshop collection" meta:resourcekey="ltlImportCollectionTitleResource1"></asp:Literal></h4>
                </div>
                <div class="modal-body">
                    <p>
                        <asp:Literal ID="ltlCollectionTXT" runat="server" Text="Enter the collection ID" meta:resourcekey="ltlCollectionTXTResource1"></asp:Literal></p>
                    <asp:TextBox ID="txtCollection" runat="server" class="form-control" meta:resourcekey="txtCollectionResource1"></asp:TextBox>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><asp:literal ID="ltlClose" runat="server" Text="Close" meta:resourcekey="ltlCloseResource1"></asp:literal></button>
                    <asp:Button ID="btnAddCollection" runat="server" Text="Import" class="btn btn-primary" OnClick="btnAddCollection_Click" meta:resourcekey="btnAddCollectionResource1" />
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">
                        <asp:Literal ID="LiteralNewWkspTitle" runat="server" Text="Add new workshop item" meta:resourcekey="LiteralNewWkspTitleResource1"></asp:Literal></h4>
                </div>
                <div class="modal-body">
                    <p>
                        <asp:Literal ID="LiteralWksp2" runat="server" Text="Enter the workshop ID" meta:resourcekey="LiteralWksp2Resource1"></asp:Literal></p>
                    <asp:TextBox ID="txtID" runat="server" class="form-control" meta:resourcekey="txtIDResource1"></asp:TextBox>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <asp:Literal ID="LiteralClose3" runat="server" Text="Close" meta:resourcekey="ltlCloseResource1"></asp:Literal></button>
                    <asp:Button ID="btnSave" runat="server" Text="Save" class="btn btn-primary" OnClick="btnSave_Click" meta:resourcekey="btnSaveResource1" />
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="myModalStat" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabelStat">
                        <asp:Literal ID="ltlWorkshopStatusTitle" runat="server" Text="Workshop install status" meta:resourcekey="ltlWorkshopStatusTitleResource1"></asp:Literal></h4>
                </div>
                <div class="modal-body">
                    <div id="divQstat" runat="server"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">
                            <asp:Literal ID="LiteralClose2" runat="server" Text="Close" meta:resourcekey="ltlCloseResource1"></asp:Literal></button>

                    </div>
                </div>
            </div>
        </div>
</asp:Content>
