{foreach from=$cases key=id item=APP}
<li class="postitem">
  <span class="commentnumber">
    #{$APP.APP_NUMBER}
  </span>

  <span id="n_{$APP.APP_UID}" class="notes-link" style="display:{if $APP.NOTES_COUNT neq 0}block{else}none{/if}">
    <a href="#" onclick="showNt('{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey.png" height="20" width="20" border="0"></a>
  </span>

  <span class="notes-plus-link">
    <a href="#" onclick="addNt('{$APP.APP_UID}', '{$APP.PRO_UID}', '{$APP.TAS_UID}'); return false;"><img src="/images/simplified/messages-grey-plus.png" height="21" width="21" border="0"></a>
  </span>

  <p>
    <cite>
      <a href="../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo">{$APP.APP_TITLE}</a>
    </cite>
  </p>
  <p class="time">
    {if $APP.APP_DEL_PREVIOUS_USER != ''}
    {translate label="ID_FROM"} {$APP.APP_DEL_PREVIOUS_USER}, {translate label="ID_SEND_AT"}
    {/if}
    {$APP.DEL_DELEGATE_DATE}
  </p>
  <p>{$APP.APP_PRO_TITLE}
  <br/>{$APP.APP_TAS_TITLE}</p>

  <div id="m_{$APP.APP_UID}" class="appMessages">
  {if $APP.NOTES_COUNT neq 0}
    {foreach from=$APP.NOTES_LIST key=k item=NOTE}
      <div class="appMessage">
      <table border="0">
      <tr>
        <td width="50" valign="top">
          <img border="0" src="../users/users_ViewPhotoGrid?pUID={$NOTE.USR_UID}" width="40" height="40"/>
        </td>
        <td>
          <h3>{$NOTE.USR_FIRSTNAME} {$NOTE.USR_LASTNAME} ({$NOTE.USR_USERNAME})</h3>
          <p><pre>{$NOTE.NOTE_CONTENT}</pre>
          <div class="appMessageDate">Posted at {$NOTE.NOTE_DATE}</div>
        </td>
      </tr>
      </table>
      </div>
    {/foreach}
  {/if}
  </div>

</li>
{/foreach}