summaryrefslogtreecommitdiffstats
path: root/templates/translation/template.html
blob: 11d4e4e741ac1b85a42653dcd02e1f69e909b460 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div class="container">
	<div class="panel panel-default">
		<div class="panel-heading">
			{{template}}
		</div>
		<div class="panel-body">
			<p>{{lang_templateAdminHelp}}</p>
			<div class="alert alert-info">
				{{lang_templateHint}}
			</div>
			<form action="?do=Translation" method="post">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>Mustache Tag</th>
							<th style='width:250px;text-align:center;'>{{lang_germanJSON}}</th>
							<th style='width:250px;text-align:center;'>{{lang_englishJSON}}</th>
							<th style='width:250px;text-align:center;'>{{lang_portugueseJSON}}</th>
							<th style='width:100px;text-align:center;'></th>
						</tr>
					</thead>
					<tbody>
						{{#tags}}
							<tr class="{{class}}" id="{{tag}}">
								<td>{{tag}}</td>
								<td style='text-align:center;'>
									<input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
								</td>
								<td style='text-align:center;'>
									<input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
								</td>
								<td style='text-align:center;'>
									<input type="text" class="form-control" placeholder="{{lang_portugueseTAG}}" value="{{pt}}" name="lang#pt#{{tag}}">
								</td>
								<td style='text-align:center;'>
									<a class="btn btn-danger btn-xs" href="?do=Translation&template={{template}}&delete={{tag}}"><span class="glyphicon glyphicon-remove"></span> {{lang_deleteTAG}}</a>
								</td>
							</tr>
						{{/tags}}
						<tr id="newTag">
						</tr>
					</tbody>
				</table>
				<a class="btn btn-primary" href='?do=Translation' >{{lang_back}}</a>
				<button class="btn btn-primary" type="button" onclick="addTag(true);" >{{lang_createTag}}</button> 
				<input type="hidden" name="update" value="true">
				<input type="hidden" name="path" value="{{template}}">
				<input type="hidden" name="token" value="{{token}}">
				<input type="submit" class="btn btn-primary" value="{{lang_save}}">
			</form>
		</div>
	</div>
</div>
<script>
function addTag(){
	var target = document.getElementById('newTag');
	target.innerHTML = "<td> <input type='text' class='form-control' placeholder='{{lang_newTAG}}' name='newtag'> </td> <td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_germanTAG}}' name='lang#de#newtag'> </td> <td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_englishTAG}}' name='lang#en#newtag'> </td>	<td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_portugueseTAG}}' name='lang#pt#newtag'> </td><td></td>";
}
</script>