<template name="dataPointEdit">
    <div class="col-sm-12">
        <div class="bootcards-cards entity-item project-border">
            <a href="{{pathFor 'projectDetail'}}" class="btn btn-info">
                <h3><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> {{name}} </h3>
            </a>

            <h3>Data Points</h3>

            <div>
                <div class="col-md-6">
                    <!--{{ json }}-->
                    {{#each data_points}}
                        <div class="col-md-6">
                            <div class="entity-item data-item">
                                <p><img src='{{ showDataTypeIcon data_type }}' alt='{{ data_type }}'/>
                                    <b>{{data_name}} </b>
                                    <span class="pull-right">
                                        <a href="#" name="{{../_id}}" class="btn btn-danger delete">
                                            <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> </a>
                                    </span>
                                </p>

                                <p>
                                    {{ data_desc }}
                                    {{#if unit}}
                                        <b>Unit : </b>{{ unit }}
                                    {{/if}}
                                    {{#if data_show_list}}
                                        <b>Listshow : </b>{{ data_show_list }}
                                    {{/if}}
                                </p>
                            </div>
                        </div>
                    {{/each}}
                </div>

                <div class="col-md-6 array-editor">
                    <h4>New Data Point</h4>
                    {{> quickForm id="dataPointEdit" type="update-pushArray" collection=Collections.Projects doc=this scope="data_points"}}
                </div>
            </div>
        </div>
    </div>
</template>
