<template name="moduleDetail">
    <div class="col-sm-12">
        <div class="bootcards-cards entity-box module-border">
            <div class="entity-sub">
                <h3>{{name}}</h3>
            </div>
            <div class="entity-sub">
                <!--<h4>ID : {{_id}}</h4>-->

                {{#if isGranted 'admin'}}
                    <a href="{{pathFor 'moduleEdit'}}" class="btn btn-info edit">
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit </a>
                {{/if}}

                {{#if currentUser}}
                    <a href="{{pathFor 'myModuleSubmit'}}" class="btn btn-primary have">
                        <span class="glyphicon glyphicon-tree-conifer" aria-hidden="true"></span> Have It </a>
                {{/if}}

                <!--<a href="{{pathFor 'buyModule'}}" class="discuss btn btn-primary buy">Buy</a>-->

                <p>{{desc}}</p>

                <p>Author : {{ author_user_id}}</p>

                <p>Create at : {{ formatDate create_time}} , Update at : {{ formatDate last_update_time}}</p>

                {{# if img_id}}
                    {{> thumbnail id=img_id}}
                {{/if}}
            </div>

            {{#if isAutherOrGrantedRole 'admin'}}
                <a href="" class="btn btn-danger align-right delete">
                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Remove </a>
            {{/if}}
        </div>
    </div>
</template>