{include file="$template_path/html/header.html"}
</head>
<body class="">
{include file="$template_path/html/user-header.html"}
<div class="space-item clear bg-lgray b-b" id="items">
  <div class="container">
    <div class="row">
      <div class="container m-b-md">
        <ul class="nav navbar-nav space-nav">
          <li class="active">
            <a href="/{$languageURL}user/{$user.nickname}/" class="hover">
              <i class="icon-list hover-rotate360"></i>
              作品
              <span class="clear inline badge bg-danger m-l-xs">
                <small>
                  10
                </small>
              </span>
            </a>
          </li>
          <li>
            <a href="#fav" class="hover">
              <i class="bigi icon-heart hover-rotate360"></i>
              收藏
            </a>
          </li>
          <li class="">
            <a href="#dt" class="hover">
              <i class="bigi icon-graph hover-rotate360"></i>
              动态
            </a>
          </li>
        </ul>

        <form action="" id="sortbyform" method="get" class="m-t-sm pull-right hidden-xs" style="z-index:3; position:relative;">
          <input id="order-type" name="order" type="hidden" value="{if $smarty.get.order == 'asc'}desc{else}asc{/if}" />
          <input type="hidden" id="sort_by" name="sort_by" />
          <div class="sortlist pull-right">



            <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='average_rating';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'average_rating'} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right active" {else} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right" {/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按评分排序">
            <i class="icon-like"></i>
            </a>


            <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='sales_count';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'sales_count'} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right active" {else} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right"{/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按销量排序">
            <i class="icon-equalizer"></i>
            </a>

            <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='cost';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'cost'} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right active" {else} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right"{/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按价格排序">
            <i class="icon-wallet"></i>
            </a>

            <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='published_at';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'published_at'} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right active" {else} class="btn btn-icon btn-rounded m-l-sm btn-ghost-success pull-right"{/if} data-toggle="tooltip" data-placement="bottom" data-original-title="按日期排序">
            <i class="icon-list"></i>
            </a>
          </div>
        </form>

      </div>
    </div>


    {if $items}

    <div class="row m-b-lg m-b-sm-xs">

      {foreach from=$items item=i name=foo}

      <div class="col-xs-6 col-sm-6 col-md-4" title="{$i.name|escape}">
        <section class="panel mb-col">
          <div class="panel-heading hidden-xs">
            <div class="browser row row-sm">
              <span class="col-xs-3 col-sm-3">
                <i class="yuan"></i>
                <i class="yuan"></i>
                <i class="yuan hidden-xs hidden-sm"></i>
              </span>
              <span class="col-xs-6 col-sm-6">
                <em>
                </em>
              </span>
              <span class="col-xs-3 col-sm-3 three text-right pull-right">
                <i class="icon-minus hidden-xs hidden-sm"></i>
                <i class="icon-check_box_outline_blank"></i>
                <i class="icon-cross"></i>
              </span>
            </div>
          </div>

          <div class="panel-body pic">
            <div class="img-container fx-img-rotate-l fx-opt-zoom-out">
              <img class="img-responsive" src="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" alt="{$i.name|escape}">
              <div class="img-options opw">
                <div class="img-options-content">
                  <!--<a href="/{$languageURL}items/screenshots/{$i.id}" class="btn btn-success m-r-md hidden-xs" target='_blank' data-toggle="tooltip" data-placement="bottom" data-original-title="查看演示">
                    <i class="icon-eye"></i>
                  </a>-->
                  <a href="/{$langaugeURL}items/screenshots/{$i.id}" data-toggle="ajaxModal" class="btn btn-lg btn-success m-r-md hidden-xs"><i class="icon-eye"></i></a>
                  <!--<a href="/{$languageURL}items/item-view_thumbs/{$i.id}" data-toggle="ajaxModal" class="btn btn-success m-r-md hidden-xs"><i class="icon-eye"></i></a>-->
                  <a href="/{$languageURL}items/{$i.id}" class="btn btn-lg btn-danger" data-toggle="tooltip" data-placement="bottom" data-original-title="了解详情" target="_blank">
                    <i class="icon-magnifier-add"></i>
                  </a>
                </div>
              </div>
              <span class="sale visible-xs-block">
                销量：{$i.sales}
              </span>
            </div>
          </div>

          <div class="cate_bg cates{foreach from=$i.categories item=e}{foreach from=$e item=c name=foo}{if !$smarty.foreach.foo.first}{$c.id}{/if}{/foreach}{/foreach} hidden-xs">
            <span class="cate-text">
              {foreach from=$i.categories item=e}
              {foreach from=$e item=c name=foo}
              {if !$smarty.foreach.foo.first}{$categories[$c].name}{/if}
              {/foreach}
              {/foreach}
            </span>
          </div>
          <div class="clearfix mb-footer">
            <h3 class="m-t-sm m-b-none m-b-xs line-mb visible-xs-block">
              <a href="/{$languageURL}items/{$i.id}" title="{$i.name|escape}" class="mb-title">
                {$i.name|escape}
              </a>
            </h3>
            <span class="line-mb price pull-right m-l-sm hidden-xs">
              <em class="m-r-xs text-success">
                {if $i.free_file == 'true'}0{else}{$i.price}{/if}
              </em>
              元
            </span>
            <div class="line-mb clear hidden-xs">
              <a href="/{$languageURL}items/{$i.id}" title="{$i.name|escape}" class="mb-title">
                {$i.name|escape}
              </a>
            </div>
          </div>
        </section>
      </div>
    {/foreach}
    </div>
    <div class="row m-b-lg m-b-sm-xs">
      {$paging}
    </div>
    {else}
    <div class="row m-b-lg m-b-sm-xs">
      <div class="sideblock">还没有作品</div>
    </div>
    {/if}
  </div>
  </div>
</div>




{include file="$template_path/html/user-footer.html"}
</body>
</html>