{config_load file="$language.conf" section="view_orders"}
<ul data-role="listview" data-filter="true" data-filter-placeholder="{#button_search#}" data-inset="true">

    {foreach from=$orders item=order}

        {assign var=year value=$order.date_purchased|date_format:"%Y"}
        {if $year ne $prev_year}
            <li data-role="list-divider">{$year}</li>
            {assign var=prev_year value=$year}
        {/if}

        {if !$mode_saas}
            <li><a href="{$order_edit_url}&oID={$order.orders_id}" target="_blank">
                    <h3>{$order.orders_status_name} {$order.orders_profiling}</h3>
                    <img src="{$module_path}icon_36.png" style="padding: 20px;">
                    <p><strong><abbr class="timeago"
                                     title="{$order.date_purchased}">{$order.date_purchased_short}</abbr></strong></p>
                    <p>{$order.amount_articles} {#text_products#}</p>
                    <p class="ui-li-aside">#<strong>{$order.orders_id}</strong>
                        <br/>
                        {$order.order_price}
                        <br/>
                    </p>
                </a></li>
        {else}
            <li>
                    <h3>{$order.orders_status_name} {$order.orders_profiling}</h3>
                    <img src="{$module_path}icon_36.png" style="padding: 20px;">
                    <p><strong><abbr class="timeago"
                                     title="{$order.date_purchased}">{$order.date_purchased_short}</abbr></strong></p>
                    <p>{$order.amount_articles} {#text_products#}</p>
                    <p class="ui-li-aside">#<strong>{$order.orders_oid}</strong>
                        <br/>
                        {$order.order_price}
                        <br/>
                    </p></li>

        {/if}
    {/foreach}
</ul>