[42] | 1 | <?php |
---|
[695] | 2 | if (!($lock instanceof \Lock)) { |
---|
[497] | 3 | // If the Lock object hasn't been instantiated, don't execute this template. |
---|
[1] | 4 | return null; |
---|
| 5 | } |
---|
| 6 | ?> |
---|
[497] | 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"> |
---|
[592] | 19 | <?php printf(_("<em>%s</em> is currently being edited by %s (%d minutes elapsed). You cannot modify this database record while it is locked. Please try again later."), |
---|
| 20 | ucfirst($lock->getTitle()), |
---|
[497] | 21 | $lock->getEditor(), |
---|
| 22 | date('i', $lock->getSecondsElapsed() + 60) |
---|
| 23 | ); ?> |
---|
| 24 | </p> |
---|
[534] | 25 | </div> |
---|
| 26 | </div> |
---|
| 27 | <?php if ($lock->getSecondsElapsed() >= $lock->getParam('timeout')) { ?> |
---|
| 28 | <div id="sc-msg" class="sc-msg row"> |
---|
| 29 | <div class="large-12 columns"> |
---|
[497] | 30 | <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> |
---|
[534] | 31 | </div> |
---|
[497] | 32 | </div> |
---|
[534] | 33 | <div class="row sc-submit-buttons"> |
---|
| 34 | <div class="large-12 columns"> |
---|
| 35 | <?php |
---|
| 36 | HTML::printButtons(array( |
---|
| 37 | array('name' => 'unlock', 'value' => _("Unlock"), 'class' => 'small button alert', 'accesskey' => 'u'), |
---|
| 38 | array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), |
---|
| 39 | )); |
---|
| 40 | ?> |
---|
| 41 | </div> |
---|
| 42 | </div> |
---|
| 43 | <?php } else { ?> |
---|
| 44 | <div class="row sc-submit-buttons"> |
---|
| 45 | <div class="large-12 columns"> |
---|
| 46 | <?php |
---|
| 47 | HTML::printButtons(array( |
---|
| 48 | array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), |
---|
| 49 | )); |
---|
| 50 | ?> |
---|
| 51 | </div> |
---|
| 52 | </div> |
---|
| 53 | <?php } ?> |
---|
[497] | 54 | </form> |
---|
| 55 | </main> |
---|