<?php $this->layout('main', ['title' => __('My Account'), 'manual' => true]); ?>

<div class="block-header">
    <h2><?=__('My Account') ?></h2>
</div>
<div class="card" id="profile-main">
    <aside class="pm-overview c-overflow" role="region">

        <div class="pmo-pic">
            <div class="p-relative">
                <a href="http://www.gravatar.com/" target="_blank">
                    <img class="img-responsive" src="<?=$user->getAvatar(500) ?>" alt="">
                </a>
                <a href="http://www.gravatar.com/" target="_blank" class="pmop-edit">
                    <i class="zmdi zmdi-camera"></i>
                    <span class="hidden-xs"><?=__('Update Profile Picture') ?></span>
                </a>
            </div>
        </div>

        <div class="pmo-block">
            <a class="btn btn-block btn-primary" role="button" href="<?=$router->named('profile:edit') ?>"><?=__('Edit') ?></a>
        </div>

        <div class="pmo-block pmo-contact hidden-xs">
            <h2><?=__('Roles') ?></h2>

            <ul>
            <?php foreach($user->getRoles() as $role): ?>
                <li><?=$this->e($role->getName()) ?></li>
            <?php endforeach; ?>
            </ul>
        </div>
    </aside>

    <div class="pm-body clearfix">
        <section class="pmb-block" role="region">
            <div class="pmbb-header">
                <h2><i class="zmdi zmdi-account m-r-10"></i> <?=__('Account Information') ?></h2>
            </div>
            <div class="pmbb-body p-l-30">
                <div class="pmbb-view">
                    <dl class="dl-horizontal">
                        <?=$account_info_form->renderView() ?>
                    </dl>
                </div>
            </div>
        </section>

        <section class="pmb-block" role="region">
            <div class="pmbb-header">
                <h2><i class="zmdi zmdi-settings m-r-10"></i> <?=__('Customization') ?></h2>
            </div>
            <div class="pmbb-body p-l-30">
                <div class="pmbb-view">
                    <dl class="dl-horizontal">
                        <?=$customization_form->renderView() ?>
                    </dl>
                </div>
            </div>
        </section>
    </div>
</div>
