1<?php
2/**
3 * FarmSync DokuWiki Plugin
4 *
5 * @author Michael Große <grosse@cosmocode.de>
6 * @license GPL 2
7 */
8
9namespace dokuwiki\plugin\farmsync\meta;
10
11use dokuwiki\Form\Form;
12
13/**
14 * Display conflicts in struct schema updates
15 */
16class StructConflict extends UpdateResults {
17
18    /**
19     * Adds conflict resolution form
20     *
21     * @return string
22     */
23    public function getResultLine() {
24        $result = parent::getResultLine();
25        $form = new Form();
26        $form->attrs(array('data-animal' => $this->getAnimal(), "data-page" => $this->getItem(), "data-type" => 'struct'));
27
28        $form->addButton("theirs", $this->helper->getLang('button:keep'));
29        $form->addButton("override", $this->helper->getLang('button:overwrite'));
30
31        $result .= $form->toHTML();
32        return $result;
33    }
34}
35