<!-- BEGIN {$smarty.template} -->

<script type="text/javascript" src="js/tasks.js"></script>

{include file="delete_operation.tpl.js"}
{include file="delete_prjmember.js"}
{include file="delete_file.js"}

{literal}
<script type="text/javascript">
function confirm_delete(prj_id)
{
    if (window.confirm('{/literal}{t}Are you sure you want to delete this project?{/t}{literal}')) {
        location.href = 'project.php?id='+prj_id+'&action={/literal}{$smarty.const.ACTION_PRJ_REMOVE}{literal}';
    }
}

function confirm_delete_material(mat_id, mat_info)
{
    if (window.confirm(mat_info+'\n\n{/literal}{t}Are you sure you want to delete this material?{/t}{literal}')) {
        location.href = '{/literal}{$smarty.const.PHPAGA_SELF}?action={$smarty.const.ACTION_MATERIAL_REMOVE}{if (isset($DELETE_OP_URL_EXTRA) && strlen($DELETE_OP_URL_EXTRA))}{$DELETE_OP_URL_EXTRA}{/if}{literal}&mat_id='+mat_id;
    }
}

function toggle_opcatratelist()
{

    u = document.getElementById("opcatratelist");
    a = document.getElementById("opcatratelistact");

    if (u.className.indexOf('hidden') != -1) {
        u.className = '';
        a.innerHTML = '{/literal}{t}Hide{/t}{literal}';
    } else {
        u.className = 'hidden';
        a.innerHTML = '{/literal}{t}Show{/t}{literal}';
    }
}
</script>
{/literal}

{include file="upload.tpl.html"}
{include file="createinvoicebox.tpl.html"}

{if strlen($relmap)}{$relmap}{/if}

<table class="stdtable" cellspacing="0">
  <caption>
    <em>{t}Project{/t}: {$project.prj_title|wash}</em>
    {if $prjmanage || $perm_invoice}[
    {if $perm_invoice}
    <a id="createinvoice" class="ptr" onclick="show_box('createinvoice', 'invoicebox');">{t}Create invoice{/t}</a> |
    {/if}
    <a class="ptr" onclick="confirm_delete({$project.prj_id});">{t}Delete{/t}</a>
    | <a href="edit_project.php?prj_id={$project.prj_id}">{t}Edit{/t}</a>
    | <a href="prjmember.php?prj_id={$project.prj_id}">{t}Add project member{/t}</a>
    | {/if}
    {if $prjmember || $prjmanage}<a href="add_material.php?prj_id={$project.prj_id}">{t}Add material{/t}</a>
    | <a href="add_expense.php?prj_id={$project.prj_id}">{t}Add expense{/t}</a>
    | <a href="add_operation.php?prj_id={$project.prj_id}">{t}Add task{/t}</a>
    | <a id="uplink" class="ptr" onclick="show_box('uplink', 'upload');">{t}Add files{/t}</a> ]
    {/if}
  </caption>

  <tr>
    <td class="label" width="20%"> {t}Title{/t}: </td>
    <td class="data" colspan="3"> {$project.prj_title|wash|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label"> {t}Description{/t}: </td>
    <td class="data datawrap" colspan="3"> {$project.prj_desc|wash|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label"> {t}Customer{/t}: </td>
    <td class="data" colspan="3"> <a href="company.php?id={$project.cpn_id}">{$project.cpn_name|wash|default:"&nbsp;"}</a> </td>
  </tr>
  <tr>
    <td class="label"> {t}Category{/t}: </td>
    <td class="data"> {$project.prjcat_title|wash|default:"&nbsp;"} </td>
    <td class="label"> {t}Status{/t}: </td>
    <td class="data"> {$project.prjstat_title|wash|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label"> {t}Created by{/t}: </td>
    <td class="data"> {if strlen($project.prj_owner)}<a href="person.php?id={$project.pe_id}">{$project.prj_owner|wash}</a>{else}&nbsp;{/if} </td>
    <td class="label"> {t}From quotation{/t}: </td>
    <td class="data"> {if strlen($project.quot_id)}<a href="quotation.php?id={$project.quot_id}">{$project.quot_number|wash|default:"&nbsp;"}/{$project.quot_date|wash|default:"&nbsp;"}</a>{else}&nbsp;{/if} </td>
  </tr>
  <tr>
    <td class="label"> {t}Project manager{/t}: </td>
    <td class="data"> {if strlen($project.prj_manager_pe_id)}<a href="person.php?id={$project.prj_manager_pe_id}">{$project.prj_manager|wash}</a>{else}&nbsp;{/if} </td>
    <td class="label" width="10%"> {t}Billable{/t}: </td>
    <td class="data"> {$project.prj_billabletype_text|wash|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label"> {t}Priority{/t}: </td>
    <td class="data"> {$project.prj_priority|wash|default:"&nbsp;"} </td>
    <td class="label" onmouseover="return escape('{t}Company that issues the invoice{/t}')"> {t}Billing company{/t}: </td>
    <td class="data"> {if strlen($project.cpn_id_issuebill)}<a href="company.php?id={$project.cpn_id_issuebill}">{$project.cpn_name_issuebill|wash|default:"&nbsp;"}</a>{else}&nbsp;{/if} </td>
  </tr>

  <tr>
    <td class="label"> {t}Start date{/t}: </td>
    <td class="data"> {if strlen($project.prj_startdate)}{$project.prj_startdate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{else}&nbsp;{/if} </td>
    <td class="label"> {t}Estimated end{/t}: </td>
    <td class="data"> {if strlen($project.prj_estimatedend)}{if $project.prj_overdue}<span class="overdue">{$project.prj_estimatedend|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}</span>{else}{$project.prj_estimatedend|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{/if}{else}&nbsp;{/if} </td>
  </tr>
  <tr>
    <td class="label"> {t}End date{/t}: </td>
    <td class="data"> {if strlen($project.prj_enddate)}{$project.prj_enddate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{else}&nbsp;{/if} </td>
    <td class="label"> {t}Deadline Date{/t}: </td>
    <td class="data"> {if strlen($project.prj_deadline)}{if $project.prj_overdue}<span class="overdue">{$project.prj_deadline|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}</span>{else}{$project.prj_deadline|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{/if}{else}&nbsp;{/if} </td>
  </tr>
</table>

<table class="stdtable" cellspacing="0">
  <caption><em>{t}Progress{/t}</em></caption>
  <tr>
    <td class="label"> {t}Estimated manhours{/t}: </td>
    <td class="data num"> &nbsp;{$project.prj_planned_manhours|wash|phpaga_hours2duration|default:"&nbsp;"} </td>
    <td class="label"> {t}Estimated cost manhours{/t}: </td>
    <td class="data num"> {$project.prj_planned_cost_manhours|wash|phpaga_formatamount|default:"&nbsp;"} </td>
    <td class="label"> {t}Estimated cost material{/t}: </td>
    <td class="data num"> {$project.prj_planned_cost_material|wash|phpaga_formatamount|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label"> {t}Tracked manhours{/t}: </td>
    <td class="data num"> &nbsp;{$project.prj_duration_minutes|phpaga_minutes2duration|default:"&nbsp;"} </td>
    <td class="label"> {t}Tracked cost manhours{/t}: </td>
    <td class="data num"> {$project.humancost.total_amount|phpaga_formatamount|default:"&nbsp;"} </td>
    <td class="label"> {t}Tracked cost material{/t}: </td>
    <td class="data num"> {$project.materials.total_amount|phpaga_formatamount|default:"&nbsp;"} </td>

  </tr>
  <tr>
    <td class="label"> {t}Complete{/t}: </td>
    <td class="data num{if (is_numeric($project.prj_perc_manhours) && ($project.prj_perc_manhours > 100))} warn{/if}"> {$project.prj_perc_manhours|phpaga_formatpercentage|default:"&nbsp;"} %</td>
    <td class="label"> {t}Complete{/t}: </td>
    <td class="data num{if (is_numeric($project.prj_perc_cost_manhours) && ($project.prj_perc_cost_manhours > 100))} warn{/if}"> {$project.prj_perc_cost_manhours|phpaga_formatpercentage|default:"&nbsp;"} %</td>
    <td class="label"> {t}Complete{/t}: </td>
    <td class="data num{if (is_numeric($project.prj_perc_cost_material) && ($project.prj_perc_cost_material > 100))} warn{/if}"> {$project.prj_perc_cost_material|phpaga_formatpercentage|default:"&nbsp;"} %</td>

  </tr>

</table>


<table class="stdtable" cellspacing="0">
  <caption><em>{t}Relations{/t}</em></caption>

  <tr>
    <td class="label"> {t}Parent project{/t}: </td>
    <td class="data"> {if strlen($project.parent_prj_title)}<a href="project.php?id={$project.prj_prj_id}">{$project.parent_prj_title|wash}</a>{else}&nbsp;{/if} </td>
  </tr>
  <tr>
    <td class="label"> {t}Child projects{/t}: </td>
    <td class="data datawrap"> {if (isset($project.childs) && (count($project.childs) > 0))}{foreach name=fchilds item=child from=$project.childs}<a href="project.php?id={$child.prj_id}">{$child.prj_title|wash}</a>{if !($smarty.foreach.fchilds.last)} | {/if}{/foreach}{else}&nbsp;{/if} </td>
  </tr>
  {if $use_graphviz}
  <tr>
    <td class="label"> {t}Relationship{/t}: </td>
    <td class="data datawrap"> <img src="prjrelations_graph.php?prj_id={$project.prj_id}" alt="{t}Project relationship{/t}" usemap="#G" /> </td>
  </tr>
  {/if}
</table>

{assign var=files value=$project.files}

{if count($files) > 0}
{include file="listfiles.tpl.html"}
{/if}

{if (isset($opcats) && (count($opcats) > 0))}
{if ($opcat_byperson == 0)}
<div class="dcaption"><em>{t}Task categories{/t}</em>
  [ <a href="project.php?id={$project.prj_id}&amp;detail={$smarty.const.PHPAGA_OPCGRP_PERSON}">{t}Details{/t}</a> ]
</div>

<div class="floatcontainer">
  <table class="stdtable w20 flleft" cellspacing="0">
    {section name=opcdet loop=$opcats}
    <tr>
      <td class="label">{$opcats[opcdet].opcat_title|wash}:</td>
      <td class="data numdesc">{$opcats[opcdet].opcat_duration|phpaga_minutes2duration}</td>
    </tr>
    {/section}
    <tr class"=summary">
      <td class="label">{t}Total duration{/t}: </td>
      <td class="data number"> {$project.prj_duration_minutes|phpaga_minutes2duration} </td>
    </tr>
  </table>

  <div class="flleft">
    <object type="image/svg+xml" data="opcat_graph.php?prj_id={$project.prj_id}" height="{$smarty.const.PHPAGA_GRAPH_HEIGHT}" width="{$smarty.const.PHPAGA_GRAPH_WIDTH}">
      You need a browser capeable of SVG to display this image.
      You can find the Adobe SVG Viewer here:
      <a href="http://www.adobe.com/svg/viewer/install/main.html">http://www.adobe.com/svg/viewer/install/main.html</a>
    </object>
  </div>
</div>
<div class="spacer"></div>
{else}

<table class="stdtable" cellspacing="0">
  <caption><em>{t}Task categories{/t}</em>
    [ <a href="project.php?id={$project.prj_id}&amp;detail=0">{t}Overall{/t}</a> ]
  </caption>
  <tr class="r">
    <th>&nbsp;</th>
    {foreach item=pe from=$opcats.persons}
    <th><a href="person.php?id={$pe.pe_id}">{$pe.pe_person|wash}</a></th>
    {/foreach}
    <th>{t}Total{/t}</th>
  </tr>
  {foreach key=opckey item=opc from=$opcats.opcats}
  <tr class="{cycle values="odd,even"}">
    <td> {$opc.opcat_title|wash} </td>
    {foreach item=row from=$opcats.rows[$opckey]}
    <td class="time"> {if strlen($row.opcat_duration)}{$row.opcat_duration|phpaga_minutes2duration}{else}&nbsp;{/if} </td>
    {/foreach}
    <td class="time"> {$opc.duration|phpaga_minutes2duration} </td>
  </tr>
  {/foreach}
  <tr class="summary">
    <td>&nbsp;</td>
    {foreach item=pe from=$opcats.persons}
    <td class="time">{$pe.duration|phpaga_minutes2duration}</td>
    {/foreach}
    <td class="time">{$project.prj_duration_minutes|phpaga_minutes2duration}</td>
  </tr>
</table>
{/if}
{/if}

{if ($prjmanage && (isset($project.opcatlist) && (count($project.opcatlist) > 0)))}
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Task categories: default hourly rates{/t}</em>
    [ <a class="ptr" onclick="toggle_opcatratelist()"><span id="opcatratelistact">{t}Show{/t}</span></a> ]
  </caption>

  <tbody id="opcatratelist" class="hidden">
    {section name=opc loop=$project.opcatlist}
    <tr>
      <td class="label last"> {if strlen($project.opcatlist[opc].opcat_color)}<span class="opcol" style="background: {$project.opcatlist[opc].opcat_color|wash};">&nbsp;</span>{else}&nbsp;{/if} </td>
      <td class="label"> {$project.opcatlist[opc].opcat_title|wash} </td>
      {if strlen($project.opcatlist[opc].opcat_hourlyrate|wash)}
      <td class="data number"> {$project.opcatlist[opc].opcat_hourlyrate|wash} </td>
      {else}
      <td class="data">{t}no default rate set{/t}</td>
      {/if}
    </tr>
    {/section}
  </tbody>
</table>
{/if}

{if count($project.prj_members) > 0}
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Project members{/t}</em> {if $prjmanage}[ <a href="prjmember.php?prj_id={$project.prj_id}">{t}Add project member{/t}</a> ]{else}&nbsp;{/if}</caption>
  <tr>
    <th> {t}Member{/t} </th>
    <th> {t}Role{/t} </th>
    {if $prjmanage}
    <th class="number"> {t}Default hourly rate{/t} </th>
    <th> {t}Actions{/t} </th>
    {/if}
  </tr>
  {section name=members loop=$project.prj_members}
  <tr class="{cycle values="odd,even"}">
    <td> <a href="person.php?id={$project.prj_members[members].pe_id}">{$project.prj_members[members].pe_person|wash}</a> </td>
    <td> {$project.prj_members[members].jcat_title|wash} </td>
    {if $prjmanage}
    <td class="number"> {if strlen($project.prj_members[members].prjmem_hourlyrate)}{$project.prj_members[members].prjmem_hourlyrate|phpaga_formatamount}{else}&nbsp;{/if} </td>
    <td class="last">
      <a href="prjmember.php?prj_id={$project.prj_id}&amp;pe_id={$project.prj_members[members].pe_id}&amp;edit={$smarty.const.ACTION_EDIT}"><img src="img/phpaga/edit.png" height="16" width="16" border="0" alt="{t}Edit{/t}" title="{t}Edit{/t}"></a>
      <a class="ptr" onclick="del_prjmember({$project.prj_id},{$project.prj_members[members].pe_id},'{$project.prj_members[members].pe_person|phpaga_popup_sanitizestr}');"><img src="img/phpaga/delete.png" height="16" width="16" border="0" alt="{t}Delete{/t}" title="{t}Delete{/t}"></a>
    </td>
    {/if}
  </tr>
  {/section}
</table>
{/if}

{if ($prjmanage && isset($project.humancost.details) && (count($project.humancost.details) > 0))}
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Human cost{/t}</em></caption>
  <tr>
    <th> {t}Person{/t} </th>
    <th class="number"> {t}Duration{/t} </th>
    <th class="number"> {t}Cost{/t} </th>
  </tr>
  {section name=members loop=$project.humancost.details}
  <tr class="{cycle values="odd,even"}">
    <td> <a href="person.php?id={$project.humancost.details[members].pe_id}">{$project.humancost.details[members].pe_person|wash}</a> </td>
    <td class="time"> {$project.humancost.details[members].sum_duration|phpaga_minutes2duration} </td>
    <td class="number last"> {$project.humancost.details[members].amount|phpaga_formatamount} </td>
  </tr>
  {/section}
  <tr>
    <td> {t}Total{/t} </td>
    <td class="time"> {$project.humancost.total_duration|phpaga_minutes2duration} </td>
    <td class="number last"> {$project.humancost.total_amount|phpaga_formatamount} </td>
  </tr>
</table>
{/if}

{if count($project.materials.details) > 0}
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Material{/t}</em>
    {if $prjmember || $prjmanage}[<a href="add_material.php?prj_id={$project.prj_id}">{t}Add material{/t}</a> ]{else}&nbsp;{/if}
  </caption>

  <tr>
    <th> {t}Date{/t} </th>
    <th class="number"> {t}Prod. code{/t} </th>
    <th> {t}Material{/t} </th>
    <th> {t}Description{/t} </th>
    <th> {t}Person{/t} </th>
    <th class="number"> {t}Qty.{/t} </th>
    <th class="number"> {t}Price{/t} </th>
    <th> {t}Currency{/t} </th>
    <th> {t}Actions{/t} </th>
  </tr>

  {section name=mat loop=$project.materials.details}
  {if ($prjmanage || ($auth_user.pe_id == $project.materials.details[mat].pe_id))}
  <tr class="{cycle values="odd,even"}">
    <td> {$project.materials.details[mat].mat_added|date_format:$smarty.const.PHPAGA_DATETIMEFORMAT_SHORT} </td>
    <td class="number"> {$project.materials.details[mat].mat_prodcode|wash|default:"&nbsp;"} </td>
    <td> {$project.materials.details[mat].mat_name|wash|default:"&nbsp;"} </td>
    <td{if ((strlen($project.materials.details[mat].mat_desc|wash) > $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} onmouseover="return escape('{$project.materials.details[mat].mat_desc|phpaga_popup_sanitizestr}')"{/if}>
      {$project.materials.details[mat].mat_desc|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true|default:"&nbsp;"}
    </td>
    <td> <a href="person.php?id={$project.materials.details[mat].pe_id}">{$project.materials.details[mat].pe_person|wash}</a> </td>
    <td class="number"> {$project.materials.details[mat].mat_qty|wash|default:"&nbsp;"} </td>
    <td class="number"> {$project.materials.details[mat].mat_price|wash|phpaga_formatamount|default:"&nbsp;"} </td>
    <td> {$project.materials.details[mat].curr_name|wash|default:"&nbsp;"} </td>
    <td class="last"> {strip}
      {if ($project.materials.details[mat].mat_canedit)}
      <a class="ptr" onclick="confirm_delete_material({$project.materials.details[mat].mat_id}, '{t}Product code{/t}: {$project.materials.details[mat].mat_prodcode}\n{$project.materials.details[mat].mat_name|phpaga_jsmessage_sanitizestr}\n{$project.materials.details[mat].mat_added|date_format:$smarty.const.PHPAGA_DATETIMEFORMAT_SHORT}');"><img src="img/phpaga/delete.png" height="16" width="16" border="0" alt="{t}Delete{/t}" title="{t}Delete{/t}"></a>
      {/if}
      {if (isset($project.materials.details[mat].bill_id) && is_numeric($project.materials.details[mat].bill_id)) }
      <a href="bill.php?id={$project.materials.details[mat].bill_id}"><img src="img/phpaga/bill.png" height="16" width="16" border="0" alt="{t}Invoice{/t}" title="{t}Invoice{/t}"></a>
      {/if}

      {/strip}
    </td>
  </tr>
  {/if}
  {/section}
</table>
{/if}

{if count($project.expenses) > 0}
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Expenses{/t}</em>
    {if $prjmember || $prjmanage}[<a href="add_expense.php?prj_id={$project.prj_id}">{t}Add expense{/t}</a> ]{else}&nbsp;{/if}
  </caption>
  <tr>
    <th> {t}Description{/t} </th>
    <th> {t}Date{/t} </th>
    <th> {t}Person{/t} </th>
    <th class="number"> {t}Cost{/t} </th>
    <th> {t}Currency{/t} </th>
    <th> {t}Actions{/t} </th>
  </tr>
  {section name=exp loop=$project.expenses}
  {if ($prjmanage || ($auth_user.pe_id == $project.expenses[exp].pe_id))}
  <tr class="{cycle values="odd,even"}">
    <td{if ((strlen($project.expenses[exp].exp_desc) > $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} onmouseover="return escape('{$project.expenses[exp].exp_desc|phpaga_popup_sanitizestr}')"{/if}>
      {$project.expenses[exp].exp_desc|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true}
    </td>
    <td> {$project.expenses[exp].exp_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} </td>
    <td> <a href="person.php?id={$project.expenses[exp].pe_id}">{$project.expenses[exp].pe_person}</a> </td>
    <td class="number"> {$project.expenses[exp].exp_sum|phpaga_formatamount} </td>
    <td> {$project.expenses[exp].curr_name|wash} </td>
    <td class="last"> &nbsp;
    </td>
  </tr>
  {/if}
  {/section}
</table>
{/if}

{if (isset($project.operations) && (count($project.operations) > 0))}
<div id="opdetails"> </div>
<table class="stdtable" cellspacing="0">
  <caption><em>{t}Tasks{/t}</em>
    [ {if $ophide}<a href="project.php?id={$project.prj_id}&amp;detail={$opcat_byperson}&amp;ophide=1">{t}Show tasks{/t}</a>{else}<a href="project.php?id={$project.prj_id}&amp;detail={$opcat_byperson}">{t}Hide tasks{/t}</a>{/if}
    {if $prjmember || $prjmanage}| <a href="add_operation.php?prj_id={$project.prj_id}">{t}Add task{/t}</a>{/if} ]
  </caption>

  <tr>
    <th> {t}Task{/t} </th>
    <th> {t}Date{/t} </th>
    <th> {t}Person{/t} </th>
    <th> {t}Category{/t} </th>
    <th class="number"> {t}Hours{/t} </th>
    <th> {t}Actions{/t} </th>
  </tr>
  {if !$ophide}
  {section name=projects loop=$project.operations}
  <tr class="{cycle values="odd,even"}">
    <td{if ((strlen($project.operations[projects].op_desc) > $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} onmouseover="return escape('{$project.operations[projects].op_desc|phpaga_popup_sanitizestr}')"{/if}>
      {$project.operations[projects].op_desc|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true}
    </td>
    <td> {$project.operations[projects].op_startdate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} </td>
    <td> <a href=person.php?id={$project.operations[projects].pe_id}>{$project.operations[projects].op_person|wash}</a> </td>
    <td> {$project.operations[projects].opcat_title|wash} </td>
    <td class="time"> {$project.operations[projects].op_duration_hrs} </td>
    <td class="last"> {strip}
      <a class="ptr" onclick="viewTaskDetails({$project.operations[projects].op_id}, 'vimg')"><img id="vimg{$project.operations[projects].op_id}" src="img/phpaga/view.png" height="16" width="16" border="0" alt="{t}View{/t}" title="{t}View{/t}"></a>
      {if ($project.operations[projects].op_canedit)}
      <a href="operation.php?id={$project.operations[projects].op_id}"><img src="img/phpaga/edit.png" height="16" width="16" border="0" alt="{t}Edit{/t}" title="{t}Edit{/t}"></a>
      <a class="ptr" onclick="confirm_delete_op({$project.operations[projects].op_id}, '{$project.operations[projects].op_startdate|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}\n{t}Project{/t}: {$project.operations[projects].prj_title}\n{t}Task{/t}: {$project.operations[projects].op_desc|phpaga_jsmessage_sanitizestr}');"><img src="img/phpaga/delete.png" height="16" width="16" border="0" alt="{t}Delete{/t}" title="{t}Delete{/t}"></a>
      {/if}

      {if (isset($project.operations[projects].bill_id) && is_numeric($project.operations[projects].bill_id)) }
      <a href="bill.php?id={$project.operations[projects].bill_id}"><img src="img/phpaga/bill.png" height="16" width="16" border="0" alt="{t}Invoice{/t}" title="{t}Invoice{/t}"></a>
      {/if}

      {/strip}
    </td>
  </tr>
  {/section}
  {/if}
</table>
{/if}

<!-- END {$smarty.template} -->
