1<?php $helper = plugin_load('helper', 'confmanager'); ?>
2<div class="table">
3	<h3><?php echo $helper->getLang('user_defined_values') ?></h3>
4	<table class="inline confmanager_twoLineRightImage">
5		<tr>
6            <th><?php echo $helper->getLang('key') ?></th>
7            <th><?php echo $helper->getLang('value') ?></th>
8            <th><?php echo $helper->getLang('actions') ?></th>
9        </tr>
10        <?php foreach($local as $key => $value):?>
11        <?php $image = $this->getImage($key); ?>
12        <tr>
13                <td>
14
15                	<input name="keys[]" value="<?php echo hsc($key) ?>" />
16                </td>
17                <td>
18                    <?php if ($image !== ''): ?>
19                        <img src="<?php echo hsc($image) ?>" alt="" />
20                    <?php endif ?>
21                    <input
22                        type="text"
23                        name="values[]"
24                        value="<?php echo hsc($value) ?>"
25                        class="edit"
26                        />
27                </td>
28                <td>
29                <?php $isDefault = array_key_exists($key, $default) ?>
30                    <?php include DOKU_PLUGIN . 'confmanager/tpl/deleteButton.php' ?>
31
32                    <?php if($isDefault) : ?>
33	                    <img class="upload_image_button"
34							src="<?php echo DOKU_PLUGIN_ICONS.'picture_edit_disabled.png' ?>"
35							alt="<?php echo hsc($helper->getLang('edit_icon_action_disabled')) ?>"
36							title="<?php echo hsc($helper->getLang('edit_icon_action_tooltip_disabled')) ?>" />
37                    <?php else : ?>
38	                    <img class="upload_image_button clickable"
39							src="<?php echo DOKU_PLUGIN_ICONS.'picture_edit.png' ?>"
40							alt="<?php echo hsc($helper->getLang('edit_icon_action')) ?>"
41							title="<?php echo hsc($helper->getLang('edit_icon_action_tooltip')) ?>" />
42                    <?php endif ?>
43
44
45					<?php if($image !== '' && !$isDefault) : ?>
46						<img class="delete_image_button clickable"
47                       		src="<?php echo DOKU_PLUGIN_ICONS.'picture_delete.png' ?>"
48                       		alt="<?php echo hsc($helper->getLang('delete_icon_action')) ?>"
49                       		title="<?php echo hsc($helper->getLang('delete_icon_action_tooltip')) ?>" />
50                    <?php else : ?>
51                       	<img src="<?php echo DOKU_PLUGIN_ICONS.'picture_delete_disabled.png' ?>"
52                       		 alt="<?php echo hsc($helper->getLang('delete_icon_action_disabled')) ?>"
53                       		title="<?php echo hsc($helper->getLang('delete_icon_action_tooltip_disabled')) ?>" />
54                    <?php endif ?>
55                </td>
56            </tr>
57        <?php endforeach ?>
58        <tr>
59            <td>
60                <input class="newItem" type="text" name="newKey[]">
61            </td>
62            <td>
63                <input class="newItem submitOnTab" type="text" name="newValue[]" />
64            </td>
65            <td/>
66        </tr>
67	</table>
68	<?php $this->helper->tplSaveButton() ?>
69</div>
70	<h3 class="clickable hoverFeedback" title="<?php echo $helper->getLang('toggle_defaults') ?>">
71		<a id="toggleDefaults">
72			<?php echo $helper->getLang('default_values') ?>
73			<img id="defaults_toggle_button"/>
74		</a>
75	</h3>
76	<div class="defaults">
77		<p>
78			<?php echo hsc($helper->getLang('defaults_description')) ?>
79		</p>
80	    <table class="inline confmanager_twoLineLeftImage">
81	        <tr>
82	            <th><?php echo $helper->getLang('key') ?></th>
83	            <th><?php echo $helper->getLang('value') ?></th>
84	            <th><?php echo $helper->getLang('actions') ?></th>
85	        </tr>
86	        <?php foreach ($default as $key => $value): ?>
87	        	<?php
88	        		if(array_key_exists($key, $local)) {
89	        			continue;
90	        		}
91	        	?>
92	            <?php $image = $this->getImage($key); ?>
93	            <tr>
94	                <td>
95	                	<div class="defaultValue" title="<?php echo hsc($helper->getLang('default_value_tooltip')) ?>">
96	                        <?php echo hsc($key) ?>
97	                	</div>
98	                </td>
99	                <td>
100	                	<div class="defaultValue" title="<?php echo hsc($helper->getLang('default_value_tooltip')) ?>">
101                            <?php if ($image !== ''): ?>
102                                <img src="<?php echo hsc($image) ?>" alt="" />
103                            <?php endif ?>
104                            <?php echo hsc($value) ?>
105	                    </div>
106	                </td>
107	                <td class="default_value">
108	                       <img src="<?php echo DOKU_PLUGIN_ICONS?>delete_disabled.png"
109	                        	alt="<?php echo hsc($helper->getLang('delete_action')) ?>"
110	                        	title="<?php echo hsc($helper->getLang('delete_action_tooltip_disabled')) ?>" />
111	                       <img src="<?php echo DOKU_PLUGIN_ICONS.'picture_edit_disabled.png' ?>"
112	                        	alt="<?php echo hsc($helper->getLang('edit_icon_action')) ?>"
113	                        	title="<?php echo hsc($helper->getLang('edit_icon_action_tooltip_disabled')) ?>" />
114	                </td>
115	            </tr>
116	        <?php endforeach ?>
117	    </table>
118    </div>
119</div>
120