
{% for note in notes %}
    <article class="note {{ cycle(['odd', 'even'], loop.index0) }}" id="note-{{ note.noteid }}">
        <p>Entered By: {{ note.user }} Date: {{ note.createddt|date("m/d/Y") }}
        <br />

        <div style="border:2px solid #ccc; width:815px; background-color: white; " > 
            {% render 'DorcasTabithaBundle:Notes:message' with { 'message': note.note } %}
        </div>

        <div style=" position:relative; bottom:45px; left:850px;">
            {% if is_granted('ROLE_ADMIN') %}
                    {% set urlpath = path('DorcasTabithaBundle_note_update', { 'note_id' : note.noteid } ) %}
                    <input type="button" value="Edit" onclick="window.open(' {{ urlpath }} ','','width=880,height=370')" />

                {% elseif note.user == app.user.username %}
                    {% set urlpath = path('DorcasTabithaBundle_note_update', { 'note_id' : note.noteid } ) %}
                    <input type="button" value="Edit" onclick="window.open(' {{ urlpath }} ','','width=880,height=370')" />
            {% endif %}
        </div>
    </article>
{% else %}
    <p>There are no notes for this client. </p>
{% endfor %}
