<button
    id="me-btn"
    class="ui-btn-right"
    data-role="button"
    data-icon="check"
    data-iconpos="right"
    {{bindAttr class="Mist.backendsController.state :state-providers"}}
    {{action click target="view"}}>me</button>

<div id="user-dialog" class="mist-dialog" data-role="popup">
    <div data-role="content" data-theme="b">
        {{#if view.email}}
        <img class="gravatar-image" {{bindAttr src="view.gravatarURL"}} />
        <div class="userEmail">{{view.email}}</div>
        {{/if}}
        {{#if Mist.backendsController.ok}}
        <p>Everything is OK!</p>
        {{/if}}
        {{#each Mist.backendsController}}
            {{#if this.error}}
            <p>Backend {{this.title}} is in error!</p>
            {{/if}}
            {{#if this.waiting}}
            <p>Waiting {{this.title}}</p>
            {{/if}}
        {{/each}}
        {{#if view.logout}}
        <div class="logout-placeholder">
            <a href="logout"
                class="logout-button"
                data-role="button"
                data-mini="true"
                data-theme="a"
                data-ajax="false">Logout</a>
        </div>
        {{/if}}
    </div>
</div>
