<!-- BEGIN: MAIN -->

<div class="m-hidden">
  <div class="userbanner" style="background: url(<!-- IF {PHP.usr.profile.user_photo} -->{PHP.usr.profile.user_photo}<!-- ELSE -->/files/cover/header1.jpg<!-- ENDIF -->) no-repeat center center; background-size: cover;">
    <div class="centerwrap clearfix ">
      <div class="contentArea mt40 sm-text-center">
        <div class=" pull-left sm-pull-reset">
          <img class="rounded" alt="{PHP.usr.profile.user_name}" src="<!-- IF {PHP.usr.profile.user_avatar} -->{PHP.usr.profile.user_avatar}<!-- ELSE -->themes/itbirja/files/avatar/big/noprofilepicture.gif<!-- ENDIF -->" width="80" height="80"/>
        </div>
        <div class="userbannertext pull-left ml15 sm-pull-reset m-text-center m-m0">
          <div>
            <h1 class="mt0">{PHP.usr.profile.user_name}</h1>
            <span class="font-OpenSans f14 ml14 is-online-block color-lightGray">
            <i class="icon ico-online"></i>
            Онлайн
            </span>
          </div>
          <div class="color-white2 sm-pull-reset mb10">{PHP.usr.profile.user_FNAME}</div>
          <div class="color-white">
            <div class="pull-left cusongsblock-panel__rating mti3">
              <ul class="rating-block dib v-align-m">
                <!-- IF {PHP.usr.tags.RSTAR} > 0 -->
                <li class="mr2 v-align-m">
                    <i class="fa fa-star gold" aria-hidden="true"></i>
                </li>
                <li class="rating-block__rating-item--number fw600 v-align-m">{PHP.usr.tags.RSTAR}&nbsp;</li>
                <!-- ENDIF -->
              </ul>
            </div>
            <p class="dib sm-pull-reset color-white2">{PHP.usr.tags.MK_SELLER_GROUP}</p>
            <span class="ml5"></span>
          </div>
        </div>
      </div>
      <div class="sidebarArea ">
        <a class="js-blocked-prds hugeGreenBtn hoverMe GreenBtnStyle h50 wMax mt60" href="{PHP|cot_url('market', 'm=add')}">Создать {PHP|cot_sitename('padeg', 'v')}</a>
      </div>
    </div>
  </div>
</div>
<div>
  <div class="centerwrap clearfix pt20 block-response">
    <h1 class="f32 orders-title">Мои продажи</h1>
    <ul class="b-tab sub-menu-parent m-hidden">
      <!-- IF {NAV_CNT_CHECK} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'check' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=check')}">
        <span class="descr">На проверке</span>
        <span class="b-tab_item_number">{NAV_CNT_CHECK}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_START} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'start' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=start')}">
        <span class="descr">В работе</span>
        <span class="b-tab_item_number">{NAV_CNT_START}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_QUEUE} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'queue' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=queue')}">
        <span class="descr">В очереди</span>
        <span class="b-tab_item_number b-tab_item_number_yellow">{NAV_CNT_QUEUE}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_PAID} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'paid' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=paid')}">
        <span class="descr">На принятии</span>
        <span class="b-tab_item_number">{NAV_CNT_PAID}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_CLAIM} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'claim' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=claim')}">
        <span class="descr">Проблемные</span>
        <span class="b-tab_item_number b-tab_item_number_yellow">{NAV_CNT_CLAIM}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_CANCEL} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'cancel' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=cancel')}">
        <span class="descr">Отменено</span>
        <span class="b-tab_item_number">{NAV_CNT_CANCEL}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_DONE} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'done' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=done')}">
        <span class="descr">Выполнено</span>
        <span class="b-tab_item_number">{NAV_CNT_DONE}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'all'  --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=all')}">
        <span class="descr">Все</span>
        <span class="b-tab_item_number">{NAV_CNT_ALL}</span>
        </a>
      </li>
    </ul>
    <ul class="b-tab m-visible">
      <!-- IF {NAV_CNT_CHECK} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'check' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=check')}">
        <span class="descr">На проверке</span>
        <span class="b-tab_item_number">{NAV_CNT_CHECK}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_START} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'start' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=start')}">
        <span class="descr">В работе</span>
        <span class="b-tab_item_number">{NAV_CNT_START}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_PAID} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'paid' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=paid')}">
        <span class="descr">На принятии</span>
        <span class="b-tab_item_number">{NAV_CNT_PAID}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_CLAIM} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'claim' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=claim')}">
        <span class="descr">Проблемные</span>
        <span class="b-tab_item_number b-tab_item_number_yellow">{NAV_CNT_CLAIM}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_CANCEL} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'cancel' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=cancel')}">
        <span class="descr">Отменено</span>
        <span class="b-tab_item_number">{NAV_CNT_CANCEL}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <!-- IF {NAV_CNT_DONE} > 0 -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'done' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=done')}">
        <span class="descr">Выполнено</span>
        <span class="b-tab_item_number">{NAV_CNT_DONE}</span>
        </a>
      </li>
      <!-- ENDIF -->
      <li class="b-tab_item<!-- IF {PHP.status} == 'all' --> active<!-- ENDIF -->">
        <a href="{PHP|cot_url('plug', 'e=marketorders&m=sales&status=all')}">
        <span class="descr">Все</span>
        <span class="b-tab_item_number">{NAV_CNT_ALL}</span>
        </a>
      </li>
    </ul>
  </div>

  <div class="centerwrap clearfix pb50 block-response m-p0">
    <table class="table-style response-table m-order-table">
      <thead>
        <tr>
          <td class="w52p">
            <div class="ml20">
              <!-- IF {PHP.b} == 'title' AND {PHP.a} == 'asc' -->
                <a class="table-style_sort-up active" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=title&a=desc')}">Название</a>
              <!-- ELSE -->
                <a class="table-style_sort-down<!-- IF {PHP.b} == 'title' --> active<!-- ENDIF -->" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=title&a=asc')}">Название</a>
              <!-- ENDIF -->
            </div>
          </td>
          <td class="w19p">
            <!-- IF {PHP.b} == 'price' AND {PHP.a} == 'asc' -->
              <a class="table-style_sort-up active" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=price&a=desc')}">Стоимость</a>
            <!-- ELSE -->
              <a class="table-style_sort-down<!-- IF {PHP.b} == 'price' --> active<!-- ENDIF -->" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=price&a=asc')}">Стоимость</a>
            <!-- ENDIF -->
          </td>
          <td class="w21p">
            <!-- IF {PHP.b} == 'user' AND {PHP.a} == 'asc' -->
              <a class="table-style_sort-up active" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=user&a=desc')}">Покупатель</a>
            <!-- ELSE -->
              <a class="table-style_sort-down<!-- IF {PHP.b} == 'user' --> active<!-- ENDIF -->" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=user&a=asc')}">Покупатель</a>
            <!-- ENDIF -->
          </td>

          <td class="w21p">
            <!-- IF !{PHP.b} AND {PHP.a} == 'asc' -->
              <a class="table-style_sort-up active" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&a=desc')}">{PHP.showdate.title}</a>
            <!-- ELSE -->
              <a class="table-style_sort-down<!-- IF !{PHP.b} --> active<!-- ENDIF -->" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&a=asc')}">{PHP.showdate.title}</a>
            <!-- ENDIF -->
          </td>

          <td class="w19p ta-center">
            <!-- IF {PHP.b} == 'status' AND {PHP.a} == 'asc' -->
              <a class="table-style_sort-up active" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=status&a=desc')}">Статус</a>
            <!-- ELSE -->
              <a class="table-style_sort-down<!-- IF {PHP.b} == 'status' --> active<!-- ENDIF -->" href="{PHP.status|cot_url('plug', 'e=marketorders&m=sales&status='$this'&b=status&a=asc')}">Статус</a>
            <!-- ENDIF -->
          </td>
        </tr>
      </thead>
      <tbody>
        <!-- BEGIN: ORDER_ROW -->
        <tr class="m-clearfix">
          <td class="ellipsis-wrap">
            <div class="ellipsis ml10">
              <a class="link-color" href="{ORDER_ROW_URL}">
                {ORDER_ROW_TITLE}
                <!-- IF {ORDER_ROW_PRJ_ID} > 0 -->
                  <img style="height:1em;" class="pl10 v-align-m tooltipster" src="themes/itbirja/images/orderfromrequest_icon.png" data-tooltip-text='Заказ по запросу "тут доделать запросы пользователей"'>
                <!-- ENDIF -->
                <!-- IF {ORDER_ROW_MSGCNT} > 0 -->
                <div class="tooltipster icon ico-order-row-inbox tooltipstered" data-tooltip-theme="dark" data-tooltip-around-side="right" data-tooltip-text="Получено {ORDER_ROW_MSGCNT|cot_declension($this, 'новое<br> сообщение,новых<br> сообщения,новых<br> сообщений')} от покупателя">
                  <div class="order-row-inbox-message-counter">{ORDER_ROW_MSGCNT}</div>
                </div>
                <!-- ENDIF -->
              </a>
            </div>
          </td>
          <td class="pr0 m-hidden">
            {ORDER_ROW_COST_FORMAT}
          </td>
          <td class="m-w50p m-pull-left m-white-space-noraml m-order-table_username" style="white-space: nowrap;">
            <i class="icon ico-<!-- IF {ORDER_ROW_CUSTOMER_ONLINE} == 1 -->online<!-- ELSE -->offlineDark<!-- ENDIF -->"></i>
            <span>{ORDER_ROW_CUSTOMER_NICKNAME}</span>
          </td>
          <td class="m-w50p m-pull-left m-text-right nowrap">{ORDER_ROW_SHOWDATE|date('d.m.Y, в H:i', $this)}</td>
          <td class="m-visible clearfix p0"></td>
          <td class="pr10 m-w50p m-pull-left">
            <div class="btn-title btn-title_{ORDER_ROW_LABEL.color} wMax nowrap">
              <!-- IF {ORDER_ROW_LABEL.hint} -->
              <div class="btn-title_right tooltipster" data-tooltip-text="{ORDER_ROW_LABEL.hint}">?</div>
              <!-- ENDIF -->
              {ORDER_ROW_LABEL.title}
            </div>
          </td>
          <td class="m-w50p m-pull-left m-visible m-text-right mt5">
            {ORDER_ROW_COST_FORMAT}
          </td>
        </tr>
        <!-- END: ORDER_ROW -->
      </tbody>
    </table>
    <div align="center" class="mb10">
      <div class="paging">
        <div class="p1">
          <ul>
            {PAGENAV_PREV}{PAGENAV_PAGES}{PAGENAV_NEXT}
          </ul>
        </div>
      </div>
    </div>
    <div style="text-align:center;" class="mb10"></div>
  </div>
</div>
<!-- END: MAIN -->