Changeset 497 for trunk/services/templates/lock.ihtml
- Timestamp:
- Sep 15, 2014 9:44:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/templates/lock.ihtml
r295 r497 1 1 <?php 2 2 if (!is_a($lock, 'Lock')) { 3 // If the Lock object hasn't been instantiated, don't execute this template. 3 4 return null; 4 5 } 5 6 ?> 6 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 7 <?php $app->printHiddenSession() ?> 8 <input type="hidden" name="lock_id" value="<?php echo $lock->getID(); ?>" /> 9 10 <p><?php 11 printf(_("The record %s is currently being edited by %s (%d minutes elapsed). You cannot modify the record while it is locked by another user."), 12 $lock->getTitle(), 13 $lock->getEditor(), 14 date('i', $lock->getSecondsElapsed() + 60) 15 ); 16 ?></p> 17 18 <?php if ($lock->getSecondsElapsed() > $lock->timeout) { ?> 19 <p><?php printf(_("You can force unlock the record if you believe the editing session has expired. You might want to confirm with before doing this."), $lock->getEditor()) ?></p> 20 <input type="submit" name="unlock" value="<?php echo _("Unlock"); ?>" /> 21 <?php } ?> 22 23 <input type="submit" name="cancel" value="<?php echo _("Cancel"); ?>" /> 24 </form> 7 <header class="row"> 8 <div class="large-12 columns"> 9 <h1><?php echo $nav->get('title'); ?></h2> 10 </div> 11 </header> 12 <main role="main"> 13 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>"> 14 <?php $app->printHiddenSession() ?> 15 <input type="hidden" name="lock_id" value="<?php echo $lock->getID(); ?>" /> 16 <div id="sc-msg" class="sc-msg row"> 17 <div class="large-12 columns"> 18 <p class="sc-msg-notice"> 19 <?php printf(_("The record <em>%s</em> is currently being edited by %s (%d minutes elapsed). You cannot modify the record while it is locked by another user."), 20 $lock->getTitle(), 21 $lock->getEditor(), 22 date('i', $lock->getSecondsElapsed() + 60) 23 ); ?> 24 </p> 25 <?php if ($lock->getSecondsElapsed() >= $lock->getParam('timeout')) { ?> 26 <p class="sc-msg-notice"><?php printf(_("You can forcibly unlock the record if you believe the editing session has expired. You might want to confirm with %s before doing this."), $lock->getEditor()) ?></p> 27 <div class="sc-msg-notice"> 28 <?php 29 HTML::printButtons(array( 30 array('name' => 'unlock', 'value' => _("Unlock"), 'class' => 'small button alert', 'accesskey' => 'u'), 31 array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), 32 )); 33 ?> 34 </div> 35 <?php } else { ?> 36 <div class="sc-msg-notice"> 37 <?php 38 HTML::printButtons(array( 39 array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), 40 )); 41 ?> 42 </div> 43 <?php } ?> 44 </div> 45 </div> 46 </form> 47 </main>
Note: See TracChangeset
for help on using the changeset viewer.