| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function show() |
||
| 23 | { |
||
| 24 | global $INFO; |
||
| 25 | global $ID; |
||
| 26 | global $lang; |
||
| 27 | |||
| 28 | $draft = new \dokuwiki\Draft($ID, $INFO['client']); |
||
| 29 | $text = $draft->getDraftText(); |
||
| 30 | |||
| 31 | // print intro |
||
| 32 | print p_locale_xhtml('draft'); |
||
| 33 | |||
| 34 | (new Diff($text, false))->show(); |
||
| 35 | |||
| 36 | // create the draft form |
||
| 37 | $form = new Form(['id' => 'dw__editform']); |
||
| 38 | $form->addTagOpen('div')->addClass('no'); |
||
| 39 | $form->setHiddenField('id', $ID); |
||
| 40 | $form->setHiddenField('date', $draft->getDraftDate()); |
||
| 41 | $form->setHiddenField('wikitext', $text); |
||
| 42 | |||
| 43 | $form->addTagOpen('div')->id('draft__status'); |
||
| 44 | $form->addHTML($draft->getDraftMessage()); |
||
| 45 | $form->addTagClose('div'); |
||
| 46 | $form->addButton('do[recover]', $lang['btn_recover'] )->attrs(['type' => 'submit', 'tabindex' => '1']); |
||
| 47 | $form->addButton('do[draftdel]', $lang['btn_draftdel'])->attrs(['type' => 'submit', 'tabindex' => '2']); |
||
| 48 | $form->addButton('do[show]', $lang['btn_cancel'] )->attrs(['type' => 'submit', 'tabindex' => '3']); |
||
| 49 | $form->addTagClose('div'); |
||
| 50 | |||
| 51 | print $form->toHTML('Draft'); |
||
| 52 | } |
||
| 53 | |||
| 55 |