# --
# AdminPGP.dtl - provides HTML form for AdminPGP html
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminPGP.dtl,v 1.21 2010/11/23 23:18:35 dz 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.
# --

<!-- dtl:block:Overview-->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"PGP Management"}</h1>

    <div class="SidebarColumn">
<!-- dtl:block:Disabled -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Notice"}</h2>
            </div>
            <div class="Content ActionList">
                <form action="$Env{"CGIHandle"}" method="post">
                    <input type="hidden" name="Action" value="AdminSysConfig"/>
                    <input type="hidden" name="Subaction" value="Edit"/>
                    <input type="hidden" name="SysConfigGroup" value="Framework"/>
                    <input type="hidden" name="SysConfigSubGroup" value="Crypt::PGP"/>
                    <h3>$Text{"This feature is disabled!"}</h3>
                    <fieldset>
                        <p class="FieldExplanation">
                            $Text{"Use this feature if you want to work with PGP keys."}
                        </p>
                        <div class="Field SpacingTop">
                            <button class="CallForAction" type="submit" value="$Text{"Enable it here!"}">
                                <span>$Text{"Enable it here!"}</span>
                            </button>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>
                </form>
            </div>
        </div>
<!-- dtl:block:Disabled -->

<!-- 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:ActionSearch-->
                    <li>
                        <form class="SearchBox" action="$Env{"CGIHandle"}" method="post">
                            <input type="hidden" name="Action" value="$Env{"Action"}"/>
                            <input type="hidden" name="Subaction" value="Search"/>
                            <input type="text" name="Search" id="Search" value="$QData{"Search"}" title="$Text{"Search"}"/>
                            <button type="submit" value="$Text{"Search"}"><span>$Text{"Search"}</span></button>
                            <div class="Clear"></div>
                        </form>
                    </li>
<!-- dtl:block:ActionSearch-->

<!-- dtl:block:ActionAdd -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Add" class="CallForAction Plus"><span>$Text{"Add PGP key"}</span></a>
                    </li>
<!-- dtl:block:ActionAdd -->

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

<!-- dtl:block:Hint -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"In this way you can directly edit the keyring configured in SysConfig."}
                </p>
                <p class="FieldExplanation">
                    $Text{"Description"}:
                    <a href="http://en.wikipedia.org/wiki/Pretty_Good_Privacy" target="_blank">
                        $Text{"Introduction to PGP"}
                    </a>
                </p>
            </div>
        </div>
<!-- dtl:block:Hint -->
    </div>

<!-- dtl:block:OverviewResult -->
    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Result"}</h2>
            </div>
            <div class="Content">

                <table class="DataTable">
                    <thead>
                        <tr>
                            <th>$Text{"Type"}</th>
                            <th>$Text{"Status"}</th>
                            <th>$Text{"Identifier"}</th>
                            <th>$Text{"Bit"}</th>
                            <th>$Text{"Key"}</th>
                            <th>$Text{"Fingerprint"}</th>
                            <th>$Text{"Created"}</th>
                            <th>$Text{"Expires"}</th>
                            <th>$Text{"Delete"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="9">
                                $Text{"No data found."}
                            </td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:Row -->
                        <tr>
                            <td>$QData{"Type"}</td>
                            <td>$QData{"Status"}</td>
                            <td>$QData{"Identifier","80"}</td>
                            <td>$QData{"Bit"}</td>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Download;Type=$LQData{"Type"};Key=$LQData{"Key"}">$QData{"Key"}</a>
                            </td>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=DownloadFingerprint;Type=$LQData{"Type"};Key=$LQData{"Key"}"><span title="$QData{"Fingerprint"}">$QData{"Fingerprint","10"}</span></a>
                            </td>
                            <td>$QData{"Created"}</td>
                            <td>$QData{"Expires"}</td>
                            <td class="Center">
                                <a class="TrashCan" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Delete;Type=$LQData{"Type"};Key=$LQData{"FingerprintShort"}" title="$Text{"Delete this key"}">$Text{"Delete this key"}</a>
                            </td>
                        </tr>
<!-- dtl:block:Row -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<!-- dtl:block:OverviewResult -->

<!-- dtl:block:AddKey -->
    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Add PGP Key"}</h2>
            </div>
            <div class="Content">
                <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" class="Validate PreventMultipleSubmits">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="AddKey"/>
                    <fieldset class="TableLike">
                        <label class="Mandatory" for="FileUpload"><span class="Marker">*</span> $Text{"PGP key"}:</label>
                        <div class="Field">
                            <input name="FileUpload" id="FileUpload" type="file" class="W50pc Validate_Required $QData{"FileUploadInvalid"}"/>
                            <div id="FileUploadError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="FileUploadServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <div class="Field SpacingTop">
                            <button class="Primary" type="submit">$Text{"Add"}</button>
                            $Text{"or"}
                            <a href="$Env{"Baselink"}Action=$Env{"Action"}"><span>$Text{"Cancel"}</span></a>
                        </div>
                    </fieldset>
                </form>
            </div>
        </div>
    </div>
<!-- dtl:block:AddKey -->

    <div class="Clear"></div>
</div>
<!-- dtl:block:Overview-->
