-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathadmin_live_edit.php
More file actions
64 lines (61 loc) · 1.93 KB
/
admin_live_edit.php
File metadata and controls
64 lines (61 loc) · 1.93 KB
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
60
61
62
63
64
<div class="settings-wrapper">
<div class="module-live-edit-settings">
<script>
$(document).ready(function(){
mw.tabs({
tabs:'.tab',
nav:'.mw-ui-btn-nav a'
});
});
</script>
<div class="mw-ui-box-content">
<style scoped="scoped">
.tab{
display: none;
}
</style>
<div class="mw-ui-btn-nav mw-ui-btn-nav-tabs"> <a href="javascript:;" class="mw-ui-btn active">
<?php _e("Language settings"); ?>
</a> <a href="javascript:;" class="mw-ui-btn">
<?php _e("Skin/Template"); ?>
</a> </div>
<div class="tab mw-ui-box mw-ui-box-content" style="display: block">
<?php require __DIR__.DS.'admin_settings.php'; ?>
<?php if(isset($params['backend'])): ?>
<?php $translations = DB::table('translations')->get(); ?>
<h3> Available Translations
(<?php echo count($translations); ?>) </h3>
<table width="100%">
<thead>
<tr>
<th>Language</th>
<th>Source ID</th>
<th>Source Type</th>
<th>Translated Data</th>
</tr>
<thead>
<?php if(count($translations)): ?>
<?php foreach($translations as $translation): ?>
<tr>
<td><?php echo $translation->lang; ?>
<div class="mw-language-tag"><?php echo $translation->lang; ?></div></td>
<td align="center"><?php echo $translation->translatable_id; ?></td>
<td align="center"><?php echo $translation->translatable_type; ?></td>
<td><pre>
<?php
$json = json_decode($translation->translation);
var_dump((array)$json);
?>
</pre></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<?php endif; ?>
</div>
<div class="tab mw-ui-box mw-ui-box-content">
<module type="admin/modules/templates" />
</div>
</div>
</div>
</div>