{include file="$template_path/html/header.html"}
{include file="$template_path/js/arc.html"}
{include file="$template_path/html/jstemplate.html"}
<script src="/mbthemes/scripts/canvas/animation.js"></script>
</head>
<body>
<div class="app" id="app">
  {include file="$template_path/html/mobile-nav.html"}
  <!-- content -->
  <div id="content" class="app-content box-shadow-z4" role="main">

    {include file="$template_path/html/pagenav.html"}
    <div ui-view class="app-body" id="view">
      <!-- ############ PAGE START-->

      <div class="white b-t">
        <div class="container">
          <div class="row-col">


            <div class="col-sm box b-l b-r">

              <div class="box edit pos-rlt m-b-0">


                <div class="p-x-md p-t-md">

                  <form action="" id="sortbyform" method="get" style="z-index:3;">
                    <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="btn-group">



                      <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 p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin" {/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按评分排序">
                      评分
                      <i class="icon-xjt1 m-l-xs"></i>
                      </a>
                      <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='name';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'name'} class="btn p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin"{/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按标题排序">
                      标题
                      <i class="icon-xjt1 m-l-xs"></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 p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin"{/if} data-toggle="tooltip" data-placement="bottom" data-original-title="按日期排序">
                      日期
                      <i class="icon-xjt1 m-l-xs"></i>
                      </a>


                    </div>
                  </form>


                </div>



                <div class="p-a-md">


                  {if $collections}
                  <div class="row">
                    {foreach from=$collections item=c}
                    <div class="col-xs-6 col-md-3">
                      <div class="box mb-co-b b-a">
                        <div class="item dark">
                          <div class="img-container fx-img-rotate-l fx-opt-zoom-out">
                            {if $c.photo != ''}
                            <img class="w-full" src="{$data_server}/uploads/collections/{$c.photo}" alt="{$i.name|escape}">
                            {else}
                            <img class="w-full" src="{$template_data}img/default-collection.jpg" alt="{$i.name|escape}">
                            {/if}
                            <div class="img-options">
                              <div class="img-options-content">
                                <a href="/{$languageURL}collections/view/{$c.id}" target="_blank" class="btn skin text-white">
                                  <i class="icon-magnifier-add"></i>
                                </a>
                              </div>
                            </div>
                          </div>
                        </div>
                        <a href="/{$languageURL}collections/view/{$c.id}" target="_blank" class="md-btn md-raised md-fab md-mini m-r pos-rlt md-fab-offset pull-right white"><i class="icon-plus2 md-24"></i></a>
                        <div class="p-a">
                          <p class="h-1x m-b-0 text-grey">{$c.text|nl2br}</p>
                          <div class="h-2xx"><a href="/{$languageURL}collections/view/{$c.id}" target="_blank" class="h6">{$c.name}</a></div>
                          <div class="clearfix m-t-xs">
                            <a href="/{$languageURL}user/{$users[$c.user_id].username}" target="_blank" class="pull-left m-r-sm">
                              <span class="w-32 avatar">
                                {if $users[$c.user_id].avatar != ''}
                                <img src="{$data_server}uploads/users/{$c.user_id}/A_{$users[$c.user_id].avatar}" />
                                {else}
                                <span class="circle skin _100 w-32 fs-80">
                                  NP
                                </span>
                                {/if}
                              </span>
                            </a>
                            <a href="/{$languageURL}user/{$users[$c.user_id].username}" target="_blank" class="pull-left m-t-sm clear">
                              {$users[$c.user_id].nickname}
                            </a>
                            <div class="pull-right">
                              <div class="h-32"><a class="price text-grey">{$lang.items}<span class="text-lg"> {$c.items}</span></a></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    {/foreach}
                  </div>
                  {$paging}
                  {else}
                  <div class="row">
                    <div class="col-xs-12 text-center">
                      <section class="panel no-radius p-t-lg p-b-lg panel-shadow">
                        <div class="panel-body bg-white-only no-radius">
                          <h3>{$lang.no_collections}</h3>
                        </div>
                      </section>
                    </div>
                  </div>
                  {/if}


                </div>




              </div>

            </div>


          </div>
        </div>
      </div>


    </div>
    <!-- ############ PAGE END-->
    {include file="$template_path/html/footer.html"}
  </div>
  {include file="$template_path/html/backtop.html"}
  {include file="$template_path/html/mb-settings.html"}
  <!-- ############ LAYOUT END-->
</div>
{literal}
<style>
  .box.edit{
    min-height: 744px;
  }
</style>
{/literal}
</body>
</html>