[% UNLESS mode == 'Edit' || mode == 'Move' || mode == 'Create'%]
[% my_html(podver) %]
[% ELSE %]
[% FOR sect = podver.sections %]
[% html = sect.html; NEXT UNLESS html.length %]
[% IF sect.type < 4 %]
[% html %]
[% FOR notepos = sect.notepos.nsort('time') %]
[% note = notepos.note %]
[% IF param('notepos') == notepos.id && mode == 'Edit' %]
[% INCLUDE note_form.html notepos=notepos %]
[% ELSIF param('notepos') == notepos.id && mode == 'Move' %]
Moving note... click on the arrow next to the desired
destination.
[% ELSIF notepos.is_visible %]
[% PROCESS note.html %]
[% END %]
[% END %]
[% IF mode == 'Create' %]
[% IF section == sect %]
[% INCLUDE note_form.html notepos='' %]
[% END %]
[% ELSIF mode == 'Move' %]
[% IF sect.id != param('section') %]

[% END %]
[% ELSE %]

[% END %]
[% ELSE %]
[% html %]
[% END # if type %]
[% END # for %]
[% END # if mode %]