<!-- BEGIN: MAIN -->
<div class="btn-toolbar mg-bt20">
  <div class="btn-group"> <a href="{PHP|cot_url('admin', 'm=cwsender&n=lists')}" class="btn<!-- IF {PHP.n} == 'lists' --> btn-default<!-- ENDIF -->">{PHP.L.cwsender_lists_title}</a> <a href="{PHP|cot_url('admin', 'm=cwsender&n=letters')}" class="btn<!-- IF {PHP.n} == 'letters' --> btn-default<!-- ENDIF -->">{PHP.L.cwsender_letters_title}</a></div>
</div>

<!-- BEGIN: LISTS --> 
<!-- BEGIN: ADDFORM --> 
{FILE "{PHP.cfg.themes_dir}/admin/easyadmin/warnings.tpl"}
<div id="add_cw" class="collapse" aria-expanded="false" style="height: 0px;">
  <div class="box">
    <h4 class="h_title">{PHP.L.cwsender_lists_add_title}</h4>
    <form action="{ADDFORM_ACTION}" method="post" class="customform">
      <table class="cells">
        <tr>
          <td class="width20">{PHP.L.cwsender_lists_form_title}</td>
          <td class="width100">{ADDFORM_TITLE|cot_inputbox('text', 'rtitle', '', 'style="width: 100% !important;"')}</td>
        </tr>
        <tr>
          <td class="width20">{PHP.L.cwsender_lists_form_recipients}</td>
          <td class="width100"><ul class="nav nav-tabs">
              <li class="<!-- IF {PHP.type} == 'text' -->active<!-- ENDIF -->" role="presentation"><a data-toggle="tab" role="tab" aria-controls="tab1" href="#tab1"><i class="fa fa-list"></i> {PHP.L.cwsender_lists_form_type_text_title}</a></li>
              <li class="<!-- IF {PHP.type} == 'groups' -->active<!-- ENDIF -->" role="presentation"><a data-toggle="tab" role="tab" aria-controls="tab2" href="#tab2"><i class="fa fa-users"></i> {PHP.L.cwsender_lists_form_type_groups_title}</a></li>
              <li class="<!-- IF {PHP.type} == 'subs' -->active<!-- ENDIF -->" role="presentation"><a data-toggle="tab" role="tab" aria-controls="tab3" href="#tab3"><i class="fa fa-envelope"></i> {PHP.L.cwsender_lists_form_type_subs_title}</a></li>
              <li class="<!-- IF {PHP.type} == 'mysql' --> active<!-- ENDIF -->" role="presentation"><a data-toggle="tab" role="tab" aria-controls="tab4" href="#tab4"><i class="fa fa-database"></i> {PHP.L.cwsender_lists_form_type_mysql_title}</a></li>
            </ul>
            <div class="tab-content box tab-box pad-10">
              <div id="tab1" class="tab-pane fade<!-- IF {PHP.type} == 'text' --> in active<!-- ENDIF -->" role="tabpanel">
                <textarea name="rtext" cols="80" rows="15">{PHP.setting.text}</textarea>
                <p>{PHP.L.cwsender_lists_form_type_text_desc}</p>
              </div>
              <div id="tab2" class="tab-pane fade<!-- IF {PHP.type} == 'groups' --> in active<!-- ENDIF -->" role="tabpanel"> {ADDFORM_RECIPIENTS} </div>
              <div id="tab3" class="tab-pane fade<!-- IF {PHP.type} == 'subs' --> in active<!-- ENDIF -->" role="tabpanel"> {PHP.L.cwsender_lists_form_type_subs_desc} </div>
              <div id="tab4" class="tab-pane fade<!-- IF {PHP.type} == 'mysql' --> in active<!-- ENDIF -->" role="tabpanel">
                <textarea name="rquery" cols="80" rows="15">{PHP.setting.mysql}</textarea>
                <p>{PHP.L.cwsender_lists_form_type_mysql_desc}</p>
              </div>
            </div></td>
        </tr>
        <tr>
          <td class="width20"></td>
          <td><button type="submit" class="btn btn-success">{PHP.L.cwsender_lists_add_button}</button></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<!-- END: ADDFORM -->

<div class="box">
  <h4 class="h_title">{PHP.L.cwsender_lists_title} <small><a data-toggle="collapse" data-parent="#accordion" href="#add_cw" aria-expanded="false" class="collapsed btn btn-success btn-xs"><i class="fa fa-plus"></i> Новый список</a></small></h4>
  <div class="row row-box t-box xs-tcenter">
    <div class="col-md-1 col-sm-2"> <b>ID</b> </div>
    <div class="col-md-5 col-sm-4"><b>Название</b></div>
    <div class="col-md-2 col-sm-2"><b>Тип</b></div>
    <div class="col-md-2 col-sm-2"><b>Настройки</b></div>
    <div class="col-md-2 col-sm-2 text-center"> <b>Действие</b> </div>
  </div>
  <!-- BEGIN: LIST_ROW -->
  <div class="row row-box odd-box xs-tcenter">
    <div class="col-md-1 col-sm-2">{LIST_ROW_ID}</div>
    <div class="col-md-5 col-sm-4">{LIST_ROW_TITLE}</div>
    <div class="col-md-2 col-sm-2">{LIST_ROW_TYPE}</div>
    <div class="col-md-2 col-sm-2">{LIST_ROW_SETTING}</div>
    <div class="col-md-2 col-sm-2 text-center"><a href="{LIST_ROW_DELETE_URL}" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> {PHP.L.Delete}</a></div>
  </div>
  <!-- END: LIST_ROW --> 
  
</div>

<!-- END: LISTS --> 

<!-- BEGIN: LETTERS -->
<!-- BEGIN: ADDFORM --> 
<div id="add_cw_ms" class="collapse" aria-expanded="false" style="height: 0px;">
  <div class="box">
    <h4 class="h_title">{PHP.L.cwsender_letters_add_title}</h4>
<form action="{ADDFORM_ACTION}" method="post" class="customform">
  <table class="cells">
    <tr>
      <td class="width20">{PHP.L.cwsender_letters_form_title}</td>
      <td class="width100">{ADDFORM_TITLE|cot_inputbox('text', 'rtitle', $this, 'style="width: 100% !important;"')}</td>
    </tr>
    <tr>
      <td class="width20">{PHP.L.cwsender_letters_form_text}</td>
      <td class="width100">{ADDFORM_TEXT|cot_textarea('rtext', $this, 25, 160, 'id="formtext"', 'input_textarea_editor')}</td>
    </tr>
    <tr>
      <td class="width20">{PHP.L.cwsender_letters_form_list}</td>
      <td class="width100">{ADDFORM_RECIPIENTS}</td>
    </tr>
    <tr>
      <td class="width20"></td>
      <td><button type="submit" class="btn btn-success">{PHP.L.cwsender_letters_add_button}</button></td>
    </tr>
  </table>
</form>
</div>
</div>
<!-- END: ADDFORM --> 

<div class="box">
  <h4 class="h_title">{PHP.L.cwsender_letters_title} <small><a data-toggle="collapse" data-parent="#accordion" href="#add_cw_ms" aria-expanded="false" class="collapsed btn btn-success btn-xs"><i class="fa fa-plus"></i> Новое сообщение</a></small></h4>
  <div class="row row-box t-box">
    <div class="col-md-1"> <b>Дата</b> </div>
    <div class="col-md-5"><b>Название <small>текст</small></b></div>
    <div class="col-md-2"><b>Список</b></div>
    <div class="col-md-2"><b>Статус</b></div>
    <div class="col-md-2 text-center xs-tleft sm-tleft"> <b>Действие</b> </div>
  </div>
  <!-- BEGIN: LETTER_ROW -->
  <div class="row row-box odd-box">
    <div class="col-md-1 mg-bt10">{LETTER_ROW_DATE|cot_date('d.m.Y', $this)}</div>
    <div class="col-md-5 mg-bt10">
      <h5 class="mg-0 mg-bt10"><strong>{LETTER_ROW_TITLE}</strong></h5>
      <a data-toggle="collapse" href="#cw_txt-{LETTER_ROW_ID}" aria-expanded="false" class="collapsed"><i class="fa fa-eye"></i> Показать текст...</a>
      <div id="cw_txt-{LETTER_ROW_ID}" class="collapse" aria-expanded="false" style="height: 0px;">{LETTER_ROW_TEXT}</div></div>
    <div class="col-md-2 mg-bt10">{LETTER_ROW_LIST}</div>
    <div class="col-md-2 mg-bt10"><!-- IF {LETTER_ROW_STATUS} == 'new' --> 
      <span class="label label-default">{PHP.L.cwsender_letters_status_ready}</span>
      <!-- ENDIF --> 
      <!-- IF {LETTER_ROW_STATUS} == 'process' --> 
      <span class="label label-warning">{PHP.L.cwsender_letters_status_process}</span> 
      <!-- ENDIF --> 
      <!-- IF {LETTER_ROW_STATUS} == 'done' --> 
      <span class="label label-success">{PHP.L.cwsender_letters_status_sent}</span> 
      <!-- ENDIF --> 
    </div>
    <div class="col-md-2 mg-bt10 text-center xs-tleft sm-tleft">
      <div class="btn-group"> <a href="{LETTER_ROW_SEND_URL}" class="btn btn-success btn-sm<!-- IF {LETTER_ROW_STATUS} != 'new' --> disabled<!-- ENDIF -->">{PHP.L.Submit}</a>
        <button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button>
        <ul class="dropdown-menu">
          <li><a href="{LETTER_ROW_DELETE_URL}"><i class="fa fa-trash"></i> {PHP.L.Delete}</a></li>
        </ul>
      </div>
    </div>
  </div>
  <!-- END: LETTER_ROW --> 
  
</div>


<!-- END: LETTERS --> 
<!-- END: MAIN -->