{config_load file="$language.conf" section="view_account_aggregation"}

<h2>{#title#}</h2>

{if $feature_similar}
<div data-role="navbar">
  <ul>
    <!--
    <li>
      <a href="{$dashboard_page_link}&view_page=overview" data-role="button" {if $view_page=='overview'} class="ui-btn-active" {/if}>{#title_overview#}</a>
    </li>
    -->
    <li>
      <a href="{$dashboard_page_link}&view_page=aggregated" data-role="button" {if $view_page=='aggregated'} class="ui-btn-active" {/if}>{#title_aggregated#}</a>
    </li>
    <li>
      <a href="{$dashboard_page_link}&view_page=assisted_merge" data-role="button" {if $view_page=='assisted_merge'} class="ui-btn-active" {/if}>{#title_assisted_merge#}</a>
    </li>
  </ul>
</div>

{/if}

{if $view_page == 'overview'}
<ul data-role="listview" data-filter="true" data-filter-placeholder="{#search#}"  {if !$inline_view}data-inset="true"{/if}>
{if $ratings}
{foreach from=$ratings item=rating}
<li><a href="{$page_link}&view_page={$view_page}&cID={$rating.customers_id}" data-transition="slide">
  <h3>"{$rating.feedback}"</h3>
  <img src="{$module_path}icon_30_{$rating.thumbs}.png" class="icon" style="width: 30px; height: 30px;border-radius: 5px;background-color: {$rating.thumbs_color};padding: 3px;">

  <p class="ui-li-aside">
    {$rating.customer_name}
    <br/>
    <abbr class="timeago" title="{$rating.date_added}">{$rating.date_added}</abbr>
  </p>

  <p>
    {#module_title#} {$rating.module}
  </p>
</a>
</li>
{/foreach}
{else}
<li>
  <p><br>{#no_rating#}</p>
</li>
{/if}
</ul>

{elseif $view_page == 'aggregated'}
<h3>{#title_sub_aggregated#}</h3>
<link rel="stylesheet" href="{$module_path}css/analytics.css"/>

{if $aggregated_accounts}
<ul data-role="listview" data-filter="true" data-filter-placeholder="{#search_last#}"  {if !$inline_view}data-inset="true"{/if}>
{foreach from=$aggregated_accounts item=aggregated}
<li><a href="{$page_link}&view_page={$view_page}&cID={$aggregated.customers_id}&returnpage={$returnpage}" data-transition="slide">
  <h3>{if $aggregated.simulation}<span style="color: #ee0000">SIMULATION: </span>{/if}{$aggregated.customers_firstname} {$aggregated.customers_lastname} - #{$aggregated.customers_id}</h3>
  <img src="{$module_path}icon_dashboard.png" class="icon" style="width: 30px; height: 30px;border-radius: 5px;padding: 3px;">

  <p>
    {$aggregated.cnt} {#text_aggregated_sum_account#}

  </p>

  <p class="ui-li-aside">
    <span class="ui-li-count">{$aggregated.cnt}</span>

    {$aggregated.customers_firstname}
    {$aggregated.customers_lastname}

    <br/>
    <abbr class="timeago" title="{$aggregated.cm_date_added}">{$aggregated.cm_date_added}</abbr>
  </p>

</a>
</li>
{/foreach}
</ul>
{else}
no data
{/if}

{elseif $view_page == 'assisted_merge'}
<h2>merge</h2>
todo
{else}
no page
{/if}
