pearweb_election
[ class tree: pearweb_election ] [ index: pearweb_election ] [ all elements ]

Source for file listforedit.tpl.php

Documentation is available at listforedit.tpl.php

  1. <?php response_header('Edit Elections')?>
  2. <h1>Edit PEAR Elections</h1>
  3.  
  4. <?php if (isset($error))?>
  5. <div class="errors"><?php echo $error?></div>
  6. <?php endif; // if (isset($error)): ?>
  7. Current date is <strong><?php echo date('Y-m-d')?></strong>
  8.  
  9. <p>
  10.  If you are a developer with pear.admin karma, you can edit any election except
  11.  for active elections.  Otherwise you can only edit elections that you have created.
  12. </p>
  13. <?php if (!count($elections))?>
  14. <h2>No Editable Elections for your user/karma level</h2>
  15. <?php else: // if (!count($elections)): ?>
  16. <h2>Editable Elections:</h2>
  17. <table>
  18.  <tr>
  19.   <th class="form-label_top">Election Issue</th>
  20.   <th class="form-label_top">Election dates</th>
  21.   <th class="form-label_top">Creator</th>
  22.  </tr>
  23. <?php
  24. foreach ($elections as $election):
  25.     $class $election['active'== 'yes' 'vote-active' 'vote-inactive';
  26. ?>
  27. <tr>
  28.  <td class="<?php echo $class?>"><a href="/election/edit.php?election=<?php
  29.     echo $election['id']?>"><?php echo htmlspecialchars($election['purpose'])?></a></td>
  30.  <td class="<?php echo $class?>"><?php echo $election['votestart'' until ' .
  31.     $election['voteend']?></td>
  32.  <td class="<?php echo $class?>"><?php echo $election['creator']?></td>
  33. </tr>
  34. <?php
  35. endforeach; // foreach ($elections as $election):
  36. ?>
  37. </table>
  38. <?php endif; // if (count($elections))
  39. response_footer();

Documentation generated on Mon, 11 Mar 2019 15:34:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.