# --
# AdminSMIME.dtl - provides HTML form for AdminSMIME html
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminSMIME.dtl,v 1.28 2012-01-03 14:58:17 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{"S/MIME Management"}: $Text{"$Data{"Subtitle"}"}</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:ActionAdd -->
                    <li>
                        <a class="CallForAction Plus" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=ShowAddCertificate"><span>$Text{"Add certificate"}</span></a>
                    </li>
                    <li>
                        <a class="CallForAction Plus" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=ShowAddPrivate"><span>$Text{"Add private key"}</span></a>
                    </li>
<!-- dtl:block:ActionAdd -->
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->
                </ul>
            </div>
        </div>

<!-- dtl:block:ActionList -->

<!-- dtl:block:SMIMEFilter -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterSMIME">$Text{"Filter for certificates"}</label></h2>
            </div>
            <div class="Content">
                <ul>
                    <li>
                        <form action="">
                            <fieldset>
                                <input type="text" id="FilterSMIME" class="W50pc" name="FilterSMIME" value="" title="$Text{"Filter for SMIME certs"}" />
                            </fieldset>
                        </form>
                    </li>
                </ul>
            </div>
        </div>

<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterSMIME'), $('#SMIME'));
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:SMIMEFilter -->

<!-- dtl:block:SignerCertHint -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"Here you can add relations to your private certificate, these will be embedded to the SMIME signature every time you use this certificate to sign an email."}
                </p>
                <p class="FieldExplanation">
                    $Text{"See also"}: <a href="http://en.wikipedia.org/wiki/S/MIME" target="_blank">http://en.wikipedia.org/wiki/S/MIME</a>
                </p>
            </div>
        </div>
<!-- dtl:block:SignerCertHint -->
<!-- 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 certification and private keys in file system."}
                </p>
                <p class="FieldExplanation">
                    $Text{"See also"}: <a href="http://en.wikipedia.org/wiki/S/MIME" target="_blank">http://en.wikipedia.org/wiki/S/MIME</a>
                </p>
            </div>
        </div>
<!-- dtl:block:Hint -->
    </div>

    <div class="ContentColumn">
<!-- dtl:block:OverviewResult -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Results"}</h2>
            </div>
            <div class="Content ">
                <table class="DataTable" id="SMIME">
                    <thead>
                        <tr>
                            <th></th>
                            <th>$Text{"Type"}</th>
                            <th>$Text{"Subject"}</th>
                            <th>$Text{"Hash"}</th>
                            <th>$Text{"Fingerprint"}</th>
                            <th>$Text{"Create"}</th>
                            <th>$Text{"Expires"}</th>
                            <th>$Text{"Delete"}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="FilterMessage Hidden">
                            <td colspan="8">$Text{"No matches found."}</td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="8">$Text{"No data found."}</td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:Row -->
                        <tr>
                            <td>

<!-- dtl:block:CertificateRelationAdd -->
                                <a class="CertificateRelationAdd" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=SignerRelations;Fingerprint=$Data{"Fingerprint"}" title="$Text{"Handle related certificates"}">
                                    $Text{"Handle related certificates"}
                                </a>
<!-- dtl:block:CertificateRelationAdd -->

                            </td>
                            <td>$QData{"Type"}</td>
                            <td>$QData{"Subject"}</td>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Download;Type=$LQData{"Type"};Filename=$LQData{"Filename"}" title="$QData{"Hash"}">$QData{"Hash","12"}</a>
                            </td>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=DownloadFingerprint;Type=$LQData{"Type"};Filename=$LQData{"Filename"}" title="$QData{"Fingerprint"}">$QData{"Fingerprint","12"}</a>
                            </td>
                            <td>$QData{"ShortStartDate"}</td>
                            <td>$QData{"ShortEndDate"}</td>
                            <td class="Center">
                                <a class="TrashCan" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Delete;Type=$LQData{"Type"};Filename=$LQData{"Filename"};$QEnv{"ChallengeTokenParam"}" title="$Text{"Delete this certificate"}">$Text{"Delete this certificate"}</a>
                            </td>
                        </tr>
<!-- dtl:block:Row -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<!-- dtl:block:OverviewResult -->
<!-- dtl:block:OverviewAddCertificate -->
    <div class="WidgetSimple">
        <div class="Header">
            <h2>$Text{"Add Certificate"}</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="AddCertificate"/>
                <fieldset class="TableLike">
                    <label class="Mandatory" for="File"><span class="Marker">*</span> $Text{"File"}:</label>
                    <div class="Field">
                        <input type="file" size="10" name="FileUpload" id="FileUpload" class="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"}">$Text{"Cancel"}</a>
                    </div>
                    <div class="Clear"></div>
                </fieldset>
            </form>
        </div>
    </div>
<!-- dtl:block:OverviewAddCertificate -->
<!-- dtl:block:OverviewAddPrivate -->
    <div class="WidgetSimple">
        <div class="Header">
            <h2>$Text{"Add Private 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="AddPrivate"/>
                <fieldset class="TableLike">
                    <label class="Mandatory" for="File"><span class="Marker">*</span> $Text{"File"}:</label>
                    <div class="Field">
                        <input type="file" size="5" name="FileUpload" id="FileUpload" class="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>

                    <label for="Secret">$Text{"Secret"}:</label>
                    <div class="Field">
                        <input class="W50pc" type="password" name="Secret" id="Secret" value="$QData{"Secret"}" maxlength="50"/>
                    </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"}">$Text{"Cancel"}</a>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
<!-- dtl:block:OverviewAddPrivate -->
<!-- dtl:block:SignerCertificates -->
    <div class="WidgetSimple">
        <div class="Header">
            <h2>$Text{"Related Certificates for"}: $QData{"CertFingerprint"} </h2>
        </div>
        <div class="Content ">
            <table class="DataTable" id="RelatedCerts">
                <thead>
                    <tr>
                        <th></th>
                        <th>$Text{"Type"}</th>
                        <th>$Text{"Subject"}</th>
                        <th>$Text{"Hash"}</th>
                        <th>$Text{"Fingerprint"}</th>
                        <th>$Text{"Create"}</th>
                        <th>$Text{"Expires"}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="FilterMessage Hidden">
                        <td colspan="7">$Text{"No matches found."}</td>
                    </tr>
<!-- dtl:block:RelatedCertsNoDataFoundMsg -->
                    <tr>
                        <td colspan="7">$Text{"No data found."}</td>
                    </tr>
<!-- dtl:block:RelatedCertsNoDataFoundMsg -->
<!-- dtl:block:RelatedCertsRow -->
                    <tr>
                        <td class="Center">
                            <a class="Remove" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=SignerRelationDelete;CertFingerprint=$QData{"CertFingerprint"};CAFingerprint=$QData{"Fingerprint"};$QEnv{"ChallengeTokenParam"}" title="$Text{"Delete this relation"}">
                                $Text{"Delete this relation"}
                            </a>
                        </td>
                        <td>$QData{"Type"}</td>
                        <td>$QData{"Subject"}</td>
                        <td>
                            $QData{"Hash","12"}
                        </td>
                        <td title="$QData{"Fingerprint"}">
                            $QData{"Fingerprint","12"}
                        </td>
                        <td>$QData{"ShortStartDate"}</td>
                        <td>$QData{"ShortEndDate"}</td>
                    </tr>
<!-- dtl:block:RelatedCertsRow -->
                </tbody>
            </table>
        </div>
    </div>

    <div class="WidgetSimple">
        <div class="Header">
            <h2>$Text{"Available Certificates"}</h2>
        </div>
        <div class="Content">
            <fieldset>
                <label for="FilterSMIMECerts">$Text{"Filter"}: </label>
                <input type="text" id="FilterSMIMECerts" class="W50pc" name="FilterSMIME" value="" title="$Text{"Filter for SMIME certs"}" />
            </fieldset>
            <table class="DataTable" id="AvailableCerts">
                <thead>
                    <tr>
                        <th></th>
                        <th>$Text{"Type"}</th>
                        <th>$Text{"Subject"}</th>
                        <th>$Text{"Hash"}</th>
                        <th>$Text{"Fingerprint"}</th>
                        <th>$Text{"Create"}</th>
                        <th>$Text{"Expires"}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="FilterMessage Hidden">
                        <td colspan="7">$Text{"No matches found."}</td>
                    </tr>
<!-- dtl:block:AvailableCertsNoDataFoundMsg -->
                    <tr>
                        <td colspan="7">$Text{"No data found."}</td>
                    </tr>
<!-- dtl:block:AvailableCertsNoDataFoundMsg -->
<!-- dtl:block:AvailableCertsRow -->
                    <tr>
                        <td>
                            <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=SignerRelationAdd;CertFingerprint=$QData{"CertFingerprint"};CAFingerprint=$QData{"Fingerprint"};$QEnv{"ChallengeTokenParam"}" class="Add" title="$Text{"Relate this certificate"}">
                                $Text{"Relate this certificate"}
                            </a>
                        </td>
                        <td>$QData{"Type"}</td>
                        <td>$QData{"Subject"}</td>
                        <td>
                            $QData{"Hash","12"}
                        </td>
                        <td title="$QData{"Fingerprint"}">
                            $QData{"Fingerprint","12"}
                        </td>
                        <td>$QData{"ShortStartDate"}</td>
                        <td>$QData{"ShortEndDate"}</td>
                    </tr>
<!-- dtl:block:AvailableCertsRow -->
                </tbody>
            </table>
        </div>
    </div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterSMIMECerts'), $('#AvailableCerts'));
//]]></script>
<!-- dtl:js_on_document_complete -->

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