<html>
    <head>
        <title>[% $Title %]</title>
    </head>
    <body>

        <h3> Die Aktivität <i>[%  $Activity->Description %]</i> im Workflow <i>[%  $Activity->WFIDescr %]</i> wurde abgeschlossen.   </h3>
        <div style="border:0px;border-color:white;">
            <table width="80%" cellspacing="0" border="0" >

                <tbody>
                    <tr>
                        <td>[% $user->gettext('Workflow') %]: [%  $Activity->WFIDescr %]</td>

                        <td>[% $user->gettext('Initiator') %]: [% $WFI.Username %] ([% $WFI.Name %])</td>

                    </tr>
                    <tr >
                        <td>[% $user->gettext('Startdatum') %]: [% $WFI.StartDate  %]</td>

                        <td>[% $user->gettext('Status') %]: [% $user->gettext($WFI.Status) %]</td>
                    </tr>
                </tbody>
            </table>

            <h3>Aktivitäten des Workflows</h3>

            <table width="80%" cellspacing="0" border="0" >

                <tbody>
                    [% foreach from=$WFI.aGantt item=activity %]
                        [% if $activity.StatusID != 10 && $activity.StatusID != 15 && $activity.StatusID != 14 %]
                            [% cycle values="white,white" assign="BG_color" %]
                            <tr>
                                <td colspan="4">
                                    <h3>[% $activity.Descr %]</h3>
                                </td>
                            </tr>
                            <tr>
                                <td>[% $user->gettext('Erstellt') %]: [% $activity.StartDate|date_format:"%d.%m.%Y %H:%M" %]</td>

                                <td>[% $user->gettext('Abgeschlossen') %]: [% $activity.EndDate|date_format:"%d.%m.%Y %H:%M" %]</td>
                                [% if $activity.O->TargetType == 1 %]
                                    <td>[% $user->gettext('Adressat') %]: [% $activity.tuser_username %] ([% $activity.tuser_name %])</td>
                                [% elseif $activity.O->TargetType == 2 %]
                                    <td>[% $user->gettext('Adressat') %]: Gruppe: [% $activity.tgroup_name %] </td>
                                [% elseif $activity.O->TargetType == 3 %]
                                    <td>[% $user->gettext('Adressat') %]: [% $activity.tuser_username %] ([% $activity.tuser_name %])</td>
                                [% elseif $activity.O->TargetType == 4 %]
                                    <td>
                                        [% $user->gettext('Adressat') %]:
                                        [% if $activity.O->TargetUserID %]
                                            [% $activity.tuser_username %] ([% $activity.tuser_name %])
                                        [% /if %]
                                        [% if $activity.O->TargetGroupID %]
                                            Gruppe: [% $activity.tgroup_name %]
                                        [% /if %]
                                    </td>
                                [% /if %]
                                <td>[% $user->gettext('Status') %]: [% $user->gettext($activity.Status) %]</td>
                            </tr>

                            <tr  style="background: [% $BG_color %];  border-color: #d0d7e0;border-image: none;border-style: solid;border-width: 0 0 1px 1px;">
                                <td  colspan="4">
                                    <hr/>
                                    [% if $activity.O->TaskType == 2 %]
                                        [% $activity.O->FormClass->showFormContent(1) %]
                                    [% else %]
                                        [% $activity.O->TaskText %]
                                    [% /if %]
                                    <hr/>
                                </td>
                            </tr>
                        [% /if %]
                    [% /foreach %]
                </tbody>
            </table>
        </div>
    </body>
</html>