discussion.smarty 1.02 KB
{if $threads}
<h3>{i18n}Existing threads{/i18n}</h3>
<table class="listing" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>{i18n}Subject{/i18n}</th>
      <th>{i18n}Creator{/i18n}</th>
      <th>{i18n}Views{/i18n}</th>
      <th>{i18n}Replies{/i18n}</th>
      <th>{i18n}Last activity{/i18n}</th>
    </tr>
  </thead>
  <tbody>
    {foreach from=$threads item=thread}
        {$threadrenderer->render($context, $thread)}
    {/foreach}
  </tbody>
</table>
{else}
    <p class="descriptiveText">{i18n}There are no existing threads for this document{/i18n}</p>
{/if}

<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="action" value="newthread" />
<input type="hidden" name="fDocumentId" value="{$context->oDocument->getId()}" />
<fieldset><legend>{i18n}Create a new thread{/i18n}</legend>
{foreach from=$fields item=oWidget}
    {$oWidget->render()}
{/foreach}

<div class="form_actions ">
  <input type="submit" name="submit" value="{i18n}Create a new thread{/i18n}" />
</div>
</fieldset>
</form>