1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
|
# --
# Copyright (C) 2001-2021 OTRS AG, https://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
# --
[% RenderBlockStart("Overview") %]
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
<h1 class="InvisibleText">[% Translate("Attachment Management") | html %]</h1>
[% BreadcrumbPath = [
{
Name => Translate('Attachment Management'),
Link => Env("Action"),
},
]
%]
[% SWITCH Data.Action %]
[% CASE 'Add' %]
[% BreadcrumbPath.push({ Name => Translate("Add Attachment"),}) %]
[% CASE 'Change' %]
[% USE EditTitle = String(Translate("Edit Attachment")) %]
[% BreadcrumbPath.push({ Name => EditTitle.append( ': ', Data.Name ) }) %]
[% END %]
[% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]
<div class="SidebarColumn">
[% RenderBlockStart("ActionList") %]
<div class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Actions") | html %]</h2>
</div>
<div class="Content">
<ul class="ActionList">
[% RenderBlockStart("ActionOverview") %]
<li>
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i>[% Translate("Go to overview") | html %]</span></a>
</li>
[% RenderBlockEnd("ActionOverview") %]
[% RenderBlockStart("ActionAdd") %]
<li>
<a class="CallForAction Fullsize Center" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Add">
<span><i class="fa fa-plus-square"></i>[% Translate("Add Attachment") | html %]</span>
</a>
</li>
[% RenderBlockEnd("ActionAdd") %]
</ul>
</div>
</div>
[% RenderBlockEnd("ActionList") %]
[% RenderBlockStart("Filter") %]
<div class="WidgetSimple">
<div class="Header">
<h2><label for="FilterAttachments">[% Translate("Filter for Attachments") | html %]</label></h2>
</div>
<div class="Content">
<input type="text" id="FilterAttachments" class="FilterBox" placeholder="[% Translate("Just start typing to filter...") | html %]" name="FilterAttachments" value="" title="[% Translate("Filter for attachments") | html %]">
</div>
</div>
[% RenderBlockEnd("Filter") %]
</div>
<div class="ContentColumn">
<div class="WidgetSimple">
[% RenderBlockStart("OverviewResult") %]
<div class="Header">
<h2>[% Translate("List") | html %]</h2>
</div>
<div class="Content">
<table class="DataTable" id="Attachments">
<thead>
<tr>
<th>[% Translate("Name") | html %]</th>
<th>[% Translate("Filename") | html %]</th>
<th>[% Translate("Comment") | html %]</th>
<th>[% Translate("Validity") | html %]</th>
<th>[% Translate("Changed") | html %]</th>
<th>[% Translate("Created") | html %]</th>
<th>[% Translate("Delete") | html %]</th>
</tr>
</thead>
<tbody>
[% RenderBlockStart("NoDataFoundMsg") %]
<tr>
<td colspan="7">
[% Translate("No data found.") | html %]
</td>
</tr>
[% RenderBlockEnd("NoDataFoundMsg") %]
[% RenderBlockStart("OverviewResultRow") %]
<tr [% IF Data.ValidID != 1 %]class="Invalid"[% END %] id="AttachmentID_[% Data.ID %]">
<td><a class="AsBlock" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Change;ID=[% Data.ID | uri %]">[% Data.Name | html %]</a></td>
<td title="[% Translate("Download file") | html %]: [% Data.Filename | html %]">
<a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Download;ID=[% Data.ID | uri %];[% Env("ChallengeTokenParam") | html %]">
[% Data.Filename | truncate(30) | html %]
</a>
</td>
<td title="[% Data.Comment | html %]">[% Data.Comment | truncate(20) | html %]</td>
<td>[% Translate(Data.Valid) | html %]</td>
<td>[% Data.ChangeTime | Localize("TimeShort") %]</td>
<td>[% Data.CreateTime | Localize("TimeShort") %]</td>
<td class="Center">
<a class="TrashCan AttachmentDelete" href="#" data-id="[% Data.ID %]" title="[% Translate("Delete this attachment") | html %]">
[% Translate("Delete this attachment") | html %]
<i class="fa fa-trash-o"></i>
</a>
</td>
</tr>
[% RenderBlockEnd("OverviewResultRow") %]
<tr class="FilterMessage Hidden">
<td colspan="7">[% Translate("No matches found.") | html %]</td>
</tr>
</tbody>
</table>
</div>
<div class="Hidden" id="DeleteAttachmentDialogContainer">
<div id ="DeleteAttachmentDialog" class="InnerContent">
<p class="Center Spacing">[% Translate("Do you really want to delete this attachment?") | html %]</p>
<div class="SpacingTop"></div>
</div>
</div>
[% RenderBlockEnd("OverviewResult") %]
[% RenderBlockStart("OverviewUpdate") %]
<div class="Header">
[% IF Data.Action == 'Add' %]
<h2>[% Translate("Add Attachment") | html %]</h2>
[% ELSE %]
<h2>[% Translate("Edit Attachment") | html %]</h2>
[% END %]
</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="[% Data.Action | uri %]Action"/>
<input type="hidden" name="ID" value="[% Data.ID | html %]"/>
[% IF Data.Action == 'Change' %]
<input type="hidden" name="ContinueAfterSave" id="ContinueAfterSave" value=""/>
[% END %]
<fieldset class="TableLike">
<label class="Mandatory" for="Name"><span class="Marker">*</span> [% Translate("Name") | html %]:</label>
<div class="Field">
<input type="text" name="Name" id="Name" value="[% Data.Name | html %]" class="W50pc Validate_Required [% Data.NameInvalid | html %]" maxlength="200"/>
<div id="NameError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="NameServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
[% IF Data.Action == 'Add' %]
<label class="Mandatory" for="FileUpload"><span class="Marker">*</span> [% Translate("Attachment") | html %]:</label>
[% ELSE %]
<label for="FileUpload">[% Translate("Attachment") | html %]:</label>
[% END %]
<div class="Field">
<input name="FileUpload" id="FileUpload" type="file" class="W50pc [% Data.ValidateContent | html %] [% Data.FileUploadInvalid | html %]"/>
<div id="FileUploadError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="FileUploadServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
<label class="Mandatory" for="ValidID"><span class="Marker">*</span> [% Translate("Validity") | html %]:</label>
<div class="Field">
[% Data.ValidOption %]
<div id="ValidIDError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="ValidIDServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
<label for="Comment">[% Translate("Comment") | html %]:</label>
<div class="Field">
<input type="text" name="Comment" id="Comment" value="[% Data.Comment | html %]" class="W50pc" maxlength="250"/>
</div>
<div class="Clear"></div>
<div class="Content">
<fieldset class="TableLike">
<div class="Field SpacingTop SaveButtons">
[% IF Data.Action == 'Change' %]
<button class="CallForAction Primary" id="SubmitAndContinue" type="button" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
[% Translate("or") | html %]
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save and finish") | html %]</span></button>
[% ELSE %]
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
[% END %]
[% Translate("or") | html %]
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]"><span>[% Translate("Cancel") | html %]</span></a>
</div>
<div class="Clear"></div>
</fieldset>
</div>
<div class="Clear"></div>
</fieldset>
</form>
</div>
[% RenderBlockEnd("OverviewUpdate") %]
</div>
</div>
<div class="Clear"></div>
</div>
[% RenderBlockEnd("Overview") %]
|