kotti/templates/workflow-dropdown.pt

Summary

Maintainability
Test Coverage
<tal:block>
<li class="dropdown"
    tal:condition="current_state and transitions"
    i18n:domain="Kotti">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">
    <span class="state-${current_state['name']}">
      ${current_state['title']}
      <b class="caret"></b>
    </span>
  </a>
  <ul class="dropdown-menu">
    <li tal:repeat="trans transitions">
      <a tal:attributes="href api.url(context, '@@workflow-change', query={'new_state': trans['to_state']})"
         i18n:translate="">
        Make <span i18n:name="state">${states[trans['to_state']]['title']}</span>
      </a>
    </li>
  </ul>
</li>

<li tal:condition="current_state and not transitions">
  <a class="state-${current_state['name']}">${current_state['title']}</a>
</li>
</tal:block>