I am using 3.9's default webform-submission-page.tpl.php which contains

<?php if ($submission_actions || $submission_navigation): ?>
  <div class="clear-block">
    <?php print $submission_actions; ?>
    <?php print $submission_navigation; ?>
  </div>
<?php endif; ?>

The $submission_actions and $submission_navigation is being displayed fine at node/[NID]/submission/[SID]. However, while in print mode (print/[NID]/submission/[SID]) $submission_navigation is missing. Am I missing something? Thus used to work fine until 3.6.

Comments

roball’s picture

Category: support » bug

Anything I am missing here? It seems like a bug to me.

quicksketch’s picture

It's an intentional change I made in the 3.7 version. Since the navigation doesn't have anything to do with printing or with generating PDFs. The idea of print modes is to reduce as much information as possible after all. Having Next and Previous links on your printout doesn't really make any sense.

roball’s picture

In one of my Drupal sites I needed the Next and Previous links in the Print view: a lot of people filled in their reimbursement requests through Webform. The secretary opened the first Print view of the submission result, printed it out, and just clicked next to print out the next one etc. They need to have paper print outs of all submission results.

Now that's no more possible :-( The secretary would have much more work to print all results. Can you please rethink about the removal of that feature? It came a bit surprising that a feature that was used since 3.0 suddenly have been silently dropped in 3.7.

quicksketch’s picture

Title: $submission_navigation not printed on $mode == 'print' » Allow $submission_navigation to be printed on $mode == 'print'
Category: bug » task
Status: Active » Fixed
StatusFileSize
new5.03 KB
new4.96 KB

I was opposed to simply restoring this functionality since it was an intentional change to remove the navigation from the print and PDF modes, but this patch at least gives you the option of restoring the navigation if needed. Rather than completely removing the $submission_navigation and $submission_actions variables, they're now always generated but only printed out if $mode == 'display' or 'form'. You can now make them always print out overriding the webform-submission-page.tpl.php file.

I've committed these patches to the 3.x branches and it will be in the 3.12 release.

roball’s picture

OK fine, thanks. Will this functionality officially find its way back into a module's release?

quicksketch’s picture

I've committed these patches and I'm preparing for a 3.12 release before the end of the week.

roball’s picture

Version: 6.x-3.9 » 6.x-3.11

Thanks again. Webform 6.x-3.12 now handles this perfectly. Should anybody else need this fuctionality, here is how my webform-submission-page.tpl.php currently looks like:

<?php

/**
 * @file
 * Customize the navigation shown when editing or viewing submissions.
 *
 * Available variables:
 * - $node: The node object for this webform.
 * - $mode: Either "form" or "display". May be other modes provided by other
 *          modules, such as "print" or "pdf".
 * - $submission: The Webform submission array.
 * - $submission_content: The contents of the webform submission.
 * - $submission_actions: The actions that can be performed on this submission.
 * - $submission_navigation: Links to the previous and next submission.
 * - $submission_information: Information on who made this submission.
 */

drupal_add_css(path_to_theme() . '/webform-custom.css', 'theme', 'all', FALSE);
$nid = $node->nid;
$sid = $submission->sid;
?>

<?php if ($submission_actions || $submission_navigation): ?>
  <div class="clear-block">
    <?php if ($mode == 'display' || $mode == 'form'): ?>
      <ul class="links inline webform-submission-actions"><li class="first"><a href="<?php print url('print/' . $nid . '/submission/' . $sid)?>" target="_blank">
      <img src="<?php global $base_url; print $base_url . '/' . drupal_get_path('module', 'print') . '/icons/print_icon.gif' ?>" 
           alt="Printer-friendly version" title="Printer-friendly version" class="print-icon" height="16" width="16" /> 
      </a></li></ul>
      <?php print $submission_actions; ?>
    <?php endif; ?>
    <?php print $submission_navigation; ?>
  </div>
<?php endif; ?>

<?php print $submission_information; ?>

<div class="webform-submission">
  <?php print $submission_content; ?>
</div>

<?php if ($submission_navigation): ?>
  <div class="clear-block">
    <?php print $submission_navigation; ?>
  </div>
<?php endif; ?>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.