# --
# AdminSysConfig.dtl - provides HTML form for AdminSysConfig html
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminSysConfig.dtl,v 1.42 2010-12-16 11:33:25 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"SysConfig"}</h1>

    <div class="SidebarColumn">

<!-- dtl:block:ActionList -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->

<!-- dtl:block:SearchBox -->
                    <li>
                        <form action="$Env{"CGIHandle"}" method="post" class="SearchBox">
                            <input type="hidden" name="Action" value="$Env{"Action"}"/>
                            <input type="hidden" name="Subaction" value="Search"/>
                            <input type="hidden" name="DontWriteDefault" value="1"/>
                            <input type="text" name="Search" id="SysConfigSearch" value="$QData{"Search"}" title="$Text{"Search"}" />
                            <button title="$Text{"Navigate by searching in %s settings", "$QData{"ConfigCounter"}"}" type="submit" value="$Text{"Search"}">
                                <span>$Text{"Search"}</span>
                            </button>
                            <p class="FieldExplanation">
                                <label for="SysConfigSearch">
                                    $Text{"Navigate by searching in %s settings", "$QData{"ConfigCounter"}"}
                                </label>
                            </p>
                        </form>
                    </li>
<!-- dtl:block:SearchBox -->

<!-- dtl:block:ConfigGroups -->
                    <li>
                        <form action="$Env{"CGIHandle"}" method="post" id="SysConfigGroupForm">
                            <input type="hidden" name="Action" value="$Env{"Action"}"/>
                            <input type="hidden" name="Subaction" value="SelectGroup"/>
                            <input type="hidden" name="DontWriteDefault" value="1"/>
                            <div>
                                $Data{"List"}
                            </div>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
$('#SysConfigGroup').bind('change', function(){
    $('#SysConfigGroupForm').submit();
});
//]]></script>
<!--dtl:js_on_document_complete-->
                            <p class="FieldExplanation">
                                <label for="SysConfigGroup">
                                    $Text{"Navigate by selecting config groups"}
                                </label>
                            </p>
                        </form>
                    </li>
<!-- dtl:block:ConfigGroups -->

<!-- dtl:block:Download -->
                    <li>
                        <a title="$Text{"Download all system config changes"}" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Download;DontWriteDefault=1" class="CallForAction Download">
                            <span>$Text{"Export settings"}</span>
                        </a>
                    </li>
<!-- dtl:block:Download -->

<!-- dtl:block:ActionImport -->
                    <li>
                        <a title="$Text{"Load SysConfig settings from file"}" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Import" class="CallForAction Upload">
                            <span>$Text{"Import settings"}</span>
                        </a>
                    </li>
<!-- dtl:block:ActionImport -->

                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->

    </div>

    <div class="ContentColumn">

<!-- dtl:block:Import -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Import Settings"}</h2>
            </div>
            <div class="Content">
                <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="Upload"/>
                    <fieldset class="TableLike">
                        <div class="Field">
                            <input name="file_upload" type="file" />
                        </div>
                        <div class="Field">
                            <button title="$Text{"Load SysConfig settings from file"}" class="Primary" type="submit" value="$Text{"Import"}">
                                $Text{"Submit"}
                            </button>
                            $Text{"or"}
                            <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Cancel"}</a>

                        </div>
                    </fieldset>
                </form>
            </div>
        </div>
<!-- dtl:block:Import -->

<!-- dtl:block:ContentOverview -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Result"}</h2>
            </div>
            <div class="Content">
<!-- dtl:block:NoSearchTerms -->
                <div class="Content">
                    <p>$Text{"Please enter a search term to look for settings."}</p>
                </div>
<!-- dtl:block:NoSearchTerms -->
<!-- dtl:block:OverviewResult -->
                <table class="DataTable">
                    <thead>
                        <tr>
                            <th>$Text{"Subgroup"}</th>
                            <th>$Text{"Elements"}</th>
                            <th>$Text{"Group"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="3">
                                $Text{"No data found."}
                            </td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:Row -->
                        <tr>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Edit;SysConfigSubGroup=$LQData{"SubGroup"};SysConfigGroup=$LQData{"Group"}">
                                    $QData{"SubGroup"}
                                </a>
                            </td>
                            <td>$QData{"SubGroupCount"}</td>
                            <td>$QData{"Group"}</td>
                        </tr>
<!-- dtl:block:Row -->
                    </tbody>
                </table>
<!-- dtl:block:OverviewResult -->
            </div>
        </div>
<!-- dtl:block:ContentOverview -->

    </div>
    <div class="Clear"></div>
</div>
