[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/wiki/template/ -> conflict.php (source)

   1  <?php
   2  // $Id: conflict.php 19415 2005-10-14 14:08:53Z ralfbecker $
   3  
   4  require_once(TemplateDir . '/common.php');
   5  
   6  // The conflict template is passed an associative array with the following
   7  // elements:
   8  //
   9  //   page      => A string containing the name of the wiki page being edited.
  10  //   text      => A string containing the wiki markup of the version that was
  11  //                saved while the user was editing the page.
  12  //   html      => A string containing the XHTML markup of the version of the
  13  //                page that was saved while the user was editing the page.
  14  //   usertext  => A string containing the wiki markup of the text the user
  15  //                tried to save.
  16  //   timestamp => Timestamp of last edit to page.
  17  //   nextver   => An integer; the expected version of this document when saved.
  18  
  19  function template_conflict($args)
  20  {
  21      global $EditRows, $EditCols, $UserName, $PrefsScript;
  22  
  23      template_common_prologue(array('norobots' => 1,
  24                                                                   'title'    => lang('Editing').' ' . $args['page'],
  25                                                                   'heading'  => lang('Editing').' ',
  26                                                                   'headlink' => $args['page'],
  27                                                                   'headsufx' => '',
  28                                                                   'toolbar'  => 1));
  29  ?>
  30  <div id="body">
  31  <p class="warning">
  32      <?php echo lang('Warning: since you started editing, this document has been changed by someone else.  Please merge your edits into the current version of this document.'); ?>
  33  </p>
  34  <h1><?php echo lang('Current Version'); ?></h1>
  35  <form method="post" action="<?php print saveURL($args['page']); ?>">
  36  <div class="form">
  37      <input type="submit" name="Save" value="<?php echo lang('Save'); ?>" />
  38      <input type="submit" name="Preview" value="<?php echo lang('Preview'); ?>" />
  39  <?php
  40      if($UserName != '')
  41          { print lang('Your user name is "%1".',html_ref($UserName, $UserName)); }
  42      else
  43      {
  44          echo lang('Visit %1 to set your user name','<a href="'.$PrefsScript.'">'.lang('Preferences').'</a>');
  45      }
  46  ?><br />
  47      <input type="hidden" name="nextver" value="<?php print $args['nextver']; ?>" />
  48      <textarea name="document" rows="<?php
  49          print $EditRows; ?>" cols="<?php
  50          print $EditCols; ?>" wrap="virtual"><?php
  51      print str_replace('<', '&lt;', str_replace('&', '&amp;', $args['text']));
  52  ?></textarea><br />
  53      <?php echo lang('Summary of change'); ?>:
  54      <input type="text" name="comment" size="40" value="" /><br />
  55      <?php echo lang('Add document to category'); ?>:
  56      <input type="text" name="categories" size="40" value="" />
  57  <hr />
  58  <h1><?php echo lang('Your changes'); ?></h1>
  59      <textarea name="discard" rows="<?php
  60          print $EditRows; ?>" cols="<?php
  61          print $EditCols; ?>" wrap="virtual"><?php
  62      print str_replace('<', '&lt;', str_replace('&', '&amp;', $args['usertext']));
  63  ?></textarea><br />
  64  </div>
  65  </form>
  66  <h1><?php echo lang('Preview of Current Version'); ?></h1>
  67  <?php
  68      print $args['html'];
  69  ?>
  70  </div>
  71  <?php
  72      template_common_epilogue(array('twin'      => $args['page'],
  73                                                                   'edit'      => '',
  74                                                                   'editver'   => 0,
  75                                                                   'history'   => $args['page'],
  76                                                                   'timestamp' => $args['timestamp'],
  77                                                                   'nosearch'  => 0));
  78  }
  79  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7