{% set randomId = random() %} {# DATE #} {# checkbox #} {{ item.date|date('Y-m-d') }} {# TITLE #} {# edit icon #} {% if not item.locked and (item.userid == App.Users.userData.userid or Entity.entityType.value == 'items' or App.Users.isAdmin) %} {% endif %} {# lock icon #} {% if item.locked %} {% endif %} {# archived icon #} {% if item.state == constant('Elabftw\\Enums\\State::Archived').value %} {% endif %} {# toggle body #} {% if item.custom_id %} {{ item.custom_id }} {% endif %} {{ item.title }} {# NEXT STEP #} {% set next = '' %} {% if item.next_step|length > 0 %} {% set stepsArr = item.next_step|split('|') %} {% set next = stepsArr|first %} {% endif %} {{ next }} {# CATEGORY #} {# timestamp icon #} {% if item.timestamped %} {% endif %} {% if item.category %} {% endif %} {# STATUS #} {% if item.status %} {% endif %} {# TAGS #} {% set itemtagsArr = tagsArr[item.id] %} {% if itemtagsArr|length > 0 %} {% for tag in itemtagsArr %} {{ tag.tag }} {% endfor %} {% endif %} {% if item.rating > 0 %} {{ item.rating }} {% endif %} {# container to hold the body of the entity if it is toggled with the +/- icon #} {# a random id is used because with the favorites the item can appear two times on the page so the old blah_123 doesn't work well #}
{# Perhaps not the most elegant solution, but helps keep the even/odd style of the table, which would be tricky in css #}