<script src="{{ app.path.tamed.express }}/vendor/ace-builds/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ app.path.tamed.express }}/js/proto/code/editor.js" type="text/javascript" charset="utf-8"></script>

<div class="ui vertical stripe segment">
    <div class="ui middle aligned container">
        <h2>CRUD: View {{ name }} Item</h2>
        <p>View the details of a {{ name }} item.</p>
        <div>
            <a class="ui labeled icon button" href="{{ route this.bob _key=this._key }}">Edit<i class="pencil icon"></i></a>
            <table class="ui definition table">
                <thead>
                    <tr>
                        <th>_key</th>
                        <th class="fifteen wide">{{ _key }}</th>
                    </tr>
                </thead>
                <tbody>
                    {{#each item }}
                    <tr>
                        <td>{{ @key }}</td>
                        <td><div id="{{ @key }}" class="tm prop_{{ @key }}">
                            {{#if _typeCodeEditor }}
                                <div class="{{ styleClass }}" id="editor_{{ name }}"></div>

                                <script charset="utf-8">
                                    _addEditorConfig ({
                                        id: "editor_{{ name }}",
                                        name: "{{ name }}",
                                        codeType: "{{ codeType }}",
                                        content: "{{{ content }}}",
                                        readOnly: true
                                    });
                                </script>
                            {{else }}
                                {{ text this }}
                            {{/if }}
                        </div></td>
                    </tr>
                    {{/each }}
                </tbody>
            </table>
        </div>
    </div>
</div>
