<h1><{$smarty.const._MD_TCW_DISCUSS}></h1>

<{if $mode=="need_login"}>

  <div class="well">
    <{$smarty.const._MD_TCW_NEED_LOGIN}>
  </div>

<{else}>

  <table class="footable table common_table">
    <thead>
      <tr>
        <th data-hide="phone" style="width:100px;text-align:center;">
          <{$smarty.const._MD_TCW_LASTTIME}>
        </th>
        <th data-class="expand">
          <{$smarty.const._MD_TCW_DISCUSSTITLE}>
        </th>
        <th data-hide="phone" style="text-align:center;width:100px;">
          <{$smarty.const._MD_TCW_DISCUSS_UID}>
        </th>
        <th data-hide="phone" style="width:50px;text-align:center;">
          <{$smarty.const._MD_TCW_ACTIONCOUNT}>
        </th>
        <{if $showWebTitleDiscuss}>
          <th data-hide="phone" style="width:100px;text-align:center;">
            <{$smarty.const._MD_TCW_TEAMID}>
          </th>
        <{/if}>
        <{if !$showWebTitleDiscuss && $isMineDiscuss}>
          <th data-hide="phone" style="width:100px;text-align:center;">
            <{$smarty.const._TAD_FUNCTION}>
          </th>
        <{/if}>
      </tr>
    </thead>
    <{if $discuss_data}>
      <script>
      	function delete_tad_web_discuss_func(DiscussID){
      		var sure = window.confirm("<{$smarty.const._TAD_DEL_CONFIRM}>");
      		if (!sure)	return;
      		location.href="discuss.php?op=delete_tad_web_discuss&DiscussID=" + DiscussID;
      	}
      </script>

      <{foreach item=discuss from=$discuss_data}>
        <tr>
          <td class="text-center">
            <{$discuss.LastTime}>
          </td>
          <td>
            <a href="discuss.php?WebID=<{$discuss.WebID}>&DiscussID=<{$discuss.DiscussID}>"><{$discuss.DiscussTitle}></a>
            <{$discuss.show_re_num}>
          </td>
          <td class="text-center">
            <{$discuss.MemName}>
          </td>
          <td class="text-center">
            <{$discuss.DiscussCounter}>
          </td>
          <{if $showWebTitleDiscuss}>
            <td class="text-center">
              <{$discuss.WebTitle}>
            </td>
          <{/if}>
          <{if !$showWebTitleDiscuss && $isMineDiscuss}>
            <td class="text-center">
              <a href="javascript:delete_tad_web_discuss_func(<{$discuss.DiscussID}>);" class="btn btn-xs btn-danger"><{$smarty.const._TAD_DEL}></a>
              <a href="discuss.php?WebID=<{$discuss.DiscussID}>&op=tad_web_discuss_form&DiscussID=<{$discuss.DiscussID}>" class="btn btn-xs btn-warning"><{$smarty.const._TAD_EDIT}></a>
            </td>
          <{/if}>
        </tr>
      <{/foreach}>
    <{else}>
      <tr>
        <td colspan=5 class="text-center">
          <{$smarty.const._MD_TCW_EMPTY}>
        </td>
      </tr>
    <{/if}>
  </table>

  <{if $discuss_data}>
    <{$bar}>
  <{/if}>

  <div style="text-align:right">
    <{if $bar==""}>
      <{if $WebID==""}>
        <a href="index.php?op=list_tad_web_discuss" class="btn btn-xs btn-primary"><{$smarty.const._MD_TCW_MORE}><{$smarty.const._MD_TCW_DISCUSS_SHORT}></a>
      <{else}>
        <a href="discuss.php?WebID=<{$WebID}>" class="btn btn-xs btn-primary"><{$smarty.const._MD_TCW_MORE}><{$smarty.const._MD_TCW_DISCUSS_SHORT}></a>
      <{/if}>
    <{/if}>
    <{if $isMineDiscuss}>
      <a href="discuss.php?WebID=<{$WebID}>&op=tad_web_discuss_form" class="btn btn-xs btn-info"><{$smarty.const._MD_TCW_DISCUSS_ADD}></a>
    <{/if}>
  </div>
<{/if}>