${h.literal(phase.getDescription())}
% if p1.is_active():
${_('Running')}
% elif p2.is_active():
${_('Finished')}
% elif (p2.id in c.phases.get_path(current_phase)) or (p1.id in c.phases.get_path(current_phase)):
${_('Finished')}
% else:
${_('Not yet started')}
% endif
% if p1.is_ok() and (c.phases.is_on_path(p1.id, current_phase,True) or c.phases.is_on_path(current_phase, p1.id, True)):
% else:
% endif
<% pages, order = p1.getLinks() %>
% if len(pages) > 0:
% for key in order:
<% fields = pages.get(key, []) %>
% if len(fields) > 0:
${key} :
${h.literal(", ".join([f.get_link() for f in fields]))}
% endif
% endfor
% else:
${_('No required fields found')}
% endif
${h.NA(h.format_date(p1.getTime()))}
% if c.show_actions:
% if p1.is_ok() and phases_are_valid and p1.is_neighbor(current_phase) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
% else:
% endif
% endif
% if p2.is_ok() and (c.phases.is_on_path(p2.id, current_phase, True) or c.phases.is_on_path(current_phase, p2.id, True)):
% else:
% endif
<% pages, order = p2.getLinks() %>
% if len(pages) > 0:
% for key in order:
<% fields = pages.get(key, []) %>
% if len(fields) > 0:
${key} :
${h.literal(", ".join([f.get_link() for f in fields]))}
% endif
% endfor
% else:
${_('No required fields found')}
% endif
${h.NA(h.format_date(p2.getTime()))}
% if c.show_actions:
% if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
% else:
% endif
% endif
% endif
% endfor