</form>
% my $Jobs = $QueueObj->FunctionItems('Jobs');
% if ($Jobs->Count) {
<form action="" method="post">
<table>
<tr><td colspan="2">
<h3><&|/l&>Existing job offer</&></h3>
</td></tr>
%  while (my $Item = $Jobs->Next) {
<tr>
<td><% $Item->Subject %>
%# (<% $Item->CreatedObj->AsString =~ /(^\S+)/g %>)
</td>
<td><& /Edit/Elements/Button, Name => "DeleteItem-".$Item->Id, Image => "funcDelete", Text => "Delete" &></td>
</tr>
%  }
</table>
</form>
<hr>
% }
<form action="" method="post">
<input type="hidden" name="Queue" value="<% $QueueObj->Id %>">
<h3><&|/l&>Post a job offer</&></h3>
<& /Work/Tickets/Create.html,
    Queue => 'ProjectJobs',
    NoUI => 1,
    NoCF => { Attachments => 1 } &>
</form>
<%INIT>
if ($id eq 'new') {
    $QueueObj->CreateFunctionItem(Jobs => \%ARGS);
}
else {
    foreach my $key (sort keys %ARGS) {
        $key =~ /^DeleteItem-(\d+)(?:\.x)?$/ or next;
        my $Item = $QueueObj->LoadFunctionItem(Jobs => $1) or next;
        $Item->Delete;
    }
}
</%INIT>
<%ARGS>
$QueueObj
$id => undef
</%ARGS>
