<{if $op=="tad_web_works_form"}>

  <{$formValidator_code}>


  <script type="text/javascript" src="<{$xoops_url}>/modules/tadtools/My97DatePicker/WdatePicker.js"></script>
  <h1><{$smarty.const._MD_TCW_WORKS_ADD}></h1>
  <div class="well">
    <form action="works.php" method="post" id="myForm" enctype="multipart/form-data" class="form-horizontal" role="form">

      <!--分類-->
      <{$cate_menu}>


      <!--作品名稱-->
      <div class="control-group">
        <div class="span12 controls">
          <input type="text" name="WorkName" value="<{$WorkName}>" id="WorkName" class="validate[required] span12" placeholder="<{$smarty.const._MD_TCW_WORKS_NAME}>">
        </div>
      </div>


      <!--作品說明-->
      <div class="control-group">
        <div class="span12 controls">
          <textarea name="WorkDesc"  rows=4 id="WorkDesc"  class="span12" placeholder="<{$smarty.const._MD_TCW_WORKS_DESC}>"><{$WorkDesc}></textarea>
        </div>
      </div>

      <!--作品日期-->
      <div class="control-group">
        <label class="span2 control-label">
          <{$smarty.const._MD_TCW_WORKS_DATE}>
        </label>
        <div class="span4 controls">
          <input type="text" name="WorksDate" class="span12" value="<{$WorksDate}>" id="WorksDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd' , startDate:'%y-%M-%d'})">
        </div>

      </div>



      <!--上傳圖檔-->
      <div class="control-group">
        <label class="span2 control-label">
          <{$smarty.const._MD_TCW_WORKS_UPLOAD}>
        </label>
        <div class="span10 controls">
          <{$upform}>
        </div>
      </div>

      <div class="control-group">
        <div class="span12 text-center">

          <!--作品編號-->
          <input type="hidden" name="WorksID" value="<{$WorksID}>">
          <!--所屬團隊-->
          <input type="hidden" name="WebID" value="<{$WebID}>">
          <input type="hidden" name="op" value="<{$next_op}>">
          <button type="submit" class="btn btn-primary"><{$smarty.const._TAD_SAVE}></button>
        </div>
      </div>
    </form>
  </div>
<{elseif $op=="show_one_tad_web_works"}>

  <{if $isMineWorks}>
  <script>
    function delete_tad_web_works_func(WorksID){
      var sure = window.confirm("<{$smarty.const._TAD_DEL_CONFIRM}>");
      if (!sure)  return;
      location.href="works.php?WebID=<{$WebID}>&op=delete_tad_web_works&WorksID=" + WorksID;
    }
  </script>
  <{/if}>

  <h1><{$WorkName}></h1>
  <div class="alert alert-info">
    <div class="row-fluid">
      <div class="span4"><{$smarty.const._MD_TCW_WORKS_DATE}><{$smarty.const._TAD_FOR}><{$WorksDate}></div>
      <div class="span8 text-right"><{$ActionInfo}></div>
    </div>
  </div>

  <{if $WorkDesc}>
    <div class="well"><{$WorkDesc}></div>
  <{/if}>
  <div class="row-fluid">
    <{$pics}>
  </div>

  <{if $isMineWorks}>
    <div class="text-right">
      <a href="javascript:delete_tad_web_works_func(<{$WorksID}>);" class="btn btn-danger"><{$smarty.const._TAD_DEL}></a>
      <a href="works.php?WebID=<{$WebID}>&op=tad_web_works_form&WorksID=<{$WorksID}>" class="btn btn-warning"><{$smarty.const._TAD_EDIT}></a>
    </div>
  <{/if}>
<{else}>
  <{$FooTableJS}>
  <{includeq file="db:tad_web_common_works.html"}>
<{/if}>