webform-submission-navigation.tpl.php 1.3 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * Customize the navigation shown when editing or viewing submissions.
  5. *
  6. * Available variables:
  7. * - $node: The node object for this webform.
  8. * - $mode: Either "form" or "display". May be other modes provided by other
  9. * modules, such as "print" or "pdf".
  10. * - $submission: The contents of the webform submission.
  11. * - $previous: The previous submission ID.
  12. * - $next: The next submission ID.
  13. * - $previous_url: The URL of the previous submission.
  14. * - $next_url: The URL of the next submission.
  15. */
  16. ?>
  17. <div class="webform-submission-navigation">
  18. <?php if ($previous): ?>
  19. <?php print l(t('Previous submission'), $previous_url, array('attributes' => array('class' => array('webform-submission-previous')), 'query' => ($mode == 'form' ? array('destination' => $previous_url) : NULL))); ?>
  20. <?php else: ?>
  21. <span class="webform-submission-previous"><?php print t('Previous submission'); ?></span>
  22. <?php endif; ?>
  23. <?php if ($next): ?>
  24. <?php print l(t('Next submission'), $next_url, array('attributes' => array('class' => array('webform-submission-next')), 'query' => ($mode == 'form' ? array('destination' => $next_url) : NULL))); ?>
  25. <?php else: ?>
  26. <span class="webform-submission-next"><?php print t('Next submission'); ?></span>
  27. <?php endif; ?>
  28. </div>