{if $smarty.session.user.power_elite_author  == 'true' || $smarty.session.user.elite_author  == 'true'}
<div class="{if $smarty.session.user.power_elite_author  == 'true'}power-elite-author{/if}{if $smarty.session.user.elite_author  == 'true'}elite-author{/if}">
  <div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">صفحه اصلی </a>/<a href="/{$languageURL}users/{$smarty.session.user.username}/">داشبورد</a>/</div>
       <h2 class="page-title">داشبورد </h2>
    </div>
	{include file="$root_path/zipmarket/apps/users/views/tabsy.html"}
  </div>
</div>
{else}
  <div class="page-info">  
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">صفحه اصلی </a>/<a href="/{$languageURL}users/{$smarty.session.user.username}/">داشبورد</a>/</div>
       <h1 class="page-title">داشبورد </h1>
    </div>
	{include file="$root_path/zipmarket/apps/users/views/tabsy.html"}
  </div>
{/if}
    <div id="content">
      <div class="container">
	  		{$errorMessage}
<div class="content-s">
{if $comments}
   <div class="comment-list">
{foreach from=$comments item=c}
   <div class="comment">
  <div class="comment__user">
  <div>
<div class="avatar-wrapper">
    <a href="/{$languageURL}user/{$users[$c.user_id].username}" class="avatar" title="{$users[$c.user_id].username}">
	{if $users[$c.user_id].avatar != ''} 
  <img alt="{$users[$c.user_id].username}" class="" src="{$data_server}uploads/users/{$c.user_id}/A_{$users[$c.user_id].avatar}" width="80" height="80">
   {else}
     <img alt="{$users[$c.user_id].username}" class="" src="{$data_server}img/default-user.jpg" width="80" height="80">
     {/if}
</a>
</div>
  </div>
</div>
  <div class="comment__container">
    <div class="content-box comment__body">
        <div class="comment__header">
          <a href="/{$languageURL}user/{$users[$c.user_id].username}" class="comment__username">{$users[$c.user_id].username}</a>
<div class="comment__meta">
  {$lang.posted} {$c.datetime|date_format:"j F Y"} 
    <a href="/{$langaugeURL}items/{$c.item_id}" alt="{$c.item_name}" title="{$c.item_name}" class="glyph-pencil"><span class="glyph-alt">{$c.item_name}</span></a>
</div>
        </div>
        <div class="comment__content"><p>{$c.comment|nl2br}</p></div>
    </div>
{if isset($c.reply)}
{foreach from=$c.reply item=cc}
<div class="comment__reply ">
  <a href="/{$languageURL}user/{$users[$cc.user_id].username}" class='comment__reply__avatar'>
  {if $users[$cc.user_id].avatar != ''} 
    <img alt="{$users[$cc.user_id].username}" height="30" src="{$data_server}uploads/users/{$cc.user_id}/A_{$users[$cc.user_id].avatar}" width="30" />
  {else}
  	<img alt="{$users[$cc.user_id].username}" class="avt" height="30" src="/static/img/default-user.jpg" width="30" />
  {/if}
</a>
  <div class="comment__reply__body">
      <div class="comment__header">
        <a href="/{$languageURL}user/{$users[$cc.user_id].username}" class="comment__username">{$users[$cc.user_id].username}</a>
<div class="comment__meta">
  {$lang.posted} {$cc.datetime|date_format:"j F Y"}
</div>
      </div>
      <p>{$cc.comment|nl2br}</p>
  </div>
</div>

{/foreach}
{/if}
  	  <div id="replyhere_{$c.id}"></div>
	{literal}<script language="javascript">
 $("{/literal}#replyhere_{$c.id}{literal}").load("{/literal}/{$languageURL}items/reply/{$c.id}{literal}");
</script>{/literal}
  </div>
</div>
 
 {/foreach}
   </div>
   {else}
هیچ نظری برای محصولات شما ثبت نشده است .

   {/if}
</div>

<div class="sidebar-l sidebar-right">
    <h2 class="box-heading">{$lang.begin_upload}</h2>
<div class="content-box">
  	<form id="begin-upload" action="/" method="get">
    <fieldset class="vertical-form">
      <div class="input-group">
        <label for="type">انتخاب دسته بندی برای آپلود محصول</label>
        <div class="inputs">
          <select class="inline" id="category" name="category">
          	{if $mainCategories}
          		{foreach from=$mainCategories item=c}
		          	<option value="{$c.id}">{$c.name}</option>
          		{/foreach}
          	{/if}
          </select>
          <button onclick="window.location='/upload/form/?category=' + document.getElementById('category').options[document.getElementById('category').selectedIndex].value;" type=button class="btn-icon submit auto-width">کلیک کنید</button>
        </div>
        <p style="line-height:25px;"><a href="/help/upload/">کمک نیاز دارید ؟</a></p>
      </div>
    </fieldset>
</form>
</div>
  <h2 class="box-heading">{$lang.this_week_stats}</h2>
  <div class="content-box">
    <p style="line-height:26px;">
      {$lang.you_earned} <strong>{$weekStats.earning|string_format:"%.0f"} تومان</strong><br />
     {$lang.you_sold} <strong>{$weekStats.sold}</strong> {$lang.items}
    </p>
  </div>
</div>
      </div>
    </div>
{literal}
<script type="text/javascript">
$(function(){
$("textarea").live("keyup keydown",function(){
var h=$(this);
h.height(20).height(h[0].scrollHeight);
});});

</script>
{/literal}