<label id="todo-${here/UID}"
       tal:define="
         ws nocall:view/workspace;
         ws_view nocall:ws/@@view;
         is_disabled python:None if view.can_edit else 'disabled';
         is_checked python:'checked' if view.is_done() else None;
         app nocall:view/app_view;
       "
       i18n:domain="ploneintranet"
>
  <input checked="${is_checked}"
         disabled="${is_disabled}"
         name="active-tasks:list"
         type="checkbox"
         value="${here/UID}"
  />
  <tal:checked condition="is_checked">
    <input name="${python:'disabled-' if is_disabled else ''}checked-tasks:list"
           type="hidden"
           value="${here/UID}"
    />
  </tal:checked>
  <input name="current-tasks:list"
         type="hidden"
         value="${here/UID}"
  />
  <div class="item-info">
    <a class="pat-inject follow pat-switch ${python: app.get_prio_class(here.priority)}"
       href="${here/absolute_url}"
       title="${here/title}"
       data-pat-inject="source: #document-body::element; target: #document-body::element; history: record"
       data-pat-switch="selector: body remove: focus-*; add: focus-document &amp;&amp; selector: body; remove: sidebar-large; add: sidebar-normal"
    >${here/title}</a>
    <div class="additional-meta-data"
         tal:define="
           assignee here/assignee;
           initiator here/initiator;
         "
    >
      <a class="assignee meta-column icon-user pat-inject"
         href="${context/portal_url}/profiles/${assignee}#document-body"
         title="Assignee"
         data-pat-inject="source: #document-body::element; target: #document-body::element"
         tal:condition="assignee"
      >
      ${python:ws_view.get_principal_title(assignee)}
      </a>
      <span class="meta-column assignee"
            tal:condition="not:assignee"
      >
      &nbsp;
      </span>
      <time class="due-date meta-column icon-clock pat-display-time"
            datetime="${here/due}"
            title="Due date"
            data-pat-display-time="from-now: true; locale: ${here/plone_portal_state/language}"
            tal:condition="here/due"
      ></time>
      <span class="meta-column"
            tal:condition="not:here/due"
      >
      &nbsp;
      </span>
      <a class="initiator meta-column icon-manager pat-inject"
         href="${context/portal_url}/profiles/${initiator}#document-body"
         title="Initiator"
         data-pat-inject="source: #document-body::element; target: #document-body::element"
         tal:condition="initiator"
      >
      ${python:ws_view.get_principal_title(initiator)}
      </a>
      <span class="meta-column"
            tal:condition="not:initiator"
      >
      &nbsp;
      </span>
    </div>
  </div>
</label>
