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 template updates
15 */
16class TemplateConflict 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" => 'template'));
27
28        $form->addButton("theirs", $this->helper->getLang('button:keep'));
29        $form->addButton("override", $this->helper->getLang('button:overwrite'));
30        $form->addButton("diff", $this->helper->getLang('button:diff'));
31
32        $result .= $form->toHTML();
33        return $result;
34    }
35}
36