summaryrefslogtreecommitdiffstats
path: root/templates/translation
diff options
context:
space:
mode:
Diffstat (limited to 'templates/translation')
-rw-r--r--templates/translation/_page.html40
-rw-r--r--templates/translation/messages.html107
-rw-r--r--templates/translation/template.html59
3 files changed, 206 insertions, 0 deletions
diff --git a/templates/translation/_page.html b/templates/translation/_page.html
new file mode 100644
index 00000000..8e5e4bab
--- /dev/null
+++ b/templates/translation/_page.html
@@ -0,0 +1,40 @@
+<div class="container">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_langAdministration}}
+ </div>
+ <div class="panel-body">
+ <p>{{lang_adminInfo}}</p>
+ </div>
+ <ul class="list-group">
+ <a href="?do=Translation&page=messages" class="list-group-item active">{{lang_editMessages}}</a>
+ </ul>
+ </div>
+ <div class="panel panel-default">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Template</th>
+ <th style='text-align:center;'>{{lang_german}}</th>
+ <th style='text-align:center;'>{{lang_english}}</th>
+ <th style='text-align:center;'>{{lang_portuguese}}</th>
+ <tr>
+ </thead>
+ <tbody>
+ {{#table}}
+ <tr onclick="goTo('{{link}}');">
+ <td>{{template}}</td>
+ <td style='width:230px;text-align:center;'>{{{de}}}</td>
+ <td style='width:230px;text-align:center;'>{{{en}}}</td>
+ <td style='width:230px;text-align:center;'>{{{pt}}}</td>
+ </tr>
+ {{/table}}
+ </tbody>
+ </table>
+ </div>
+</div>
+<script>
+function goTo(link){
+ window.location.href = "?do=Translation&page=templates&template=" + link;
+}
+</script>
diff --git a/templates/translation/messages.html b/templates/translation/messages.html
new file mode 100644
index 00000000..c065c7f7
--- /dev/null
+++ b/templates/translation/messages.html
@@ -0,0 +1,107 @@
+<div class="container">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_messages}}
+ </div>
+ <div class="panel-body">
+ <p>{{lang_templateMessagesHelp}}</p>
+ <div class="alert alert-info">
+ {{lang_templateHint}}
+ </div>
+ </div>
+ <form action="?do=Translation" method="post">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>{{lang_messages}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_germanJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_englishJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_portugueseJSON}}</th>
+ <th style='width:100px;text-align:center;'></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#msgs}}
+ <tr>
+ <td>{{tag}}</td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
+ </td>
+ <td style='width:250px;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=messages&delete={{tag}}"><span class="glyphicon glyphicon-remove"></span> {{lang_deleteTAG}}</a>
+ </td>
+ </tr>
+ {{/msgs}}
+ <tr id="newTag">
+ </tr>
+ </tbody>
+ </table>
+ <div class="panel-body">
+ <a class="btn btn-primary" href='?do=Translation' >{{lang_back}}</a>
+ <button class="btn btn-primary" type="button" onclick="addTag(false);" >{{lang_newTag}}</button>
+ <input type="hidden" name="update" value="true">
+ <input type="hidden" name="path" value="messages">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="submit" class="btn btn-primary" value="{{lang_save}}">
+ </form>
+ </div>
+ <form action="?do=Translation" method="post">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>{{lang_messagesHardcoded}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_germanJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_englishJSON}}</th>
+ <th style='text-align:center;width:260px;'>{{lang_portugueseJSON}}</th>
+ <th style='width:100px;text-align:center;'></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#msgsHC}}
+ <tr>
+ <td>{{tag}}</td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_germanTAG}}" value="{{de}}" name="lang#de#{{tag}}">
+ </td>
+ <td style='width:250px;text-align:center;'>
+ <input type="text" class="form-control" placeholder="{{lang_englishTAG}}" value="{{en}}" name="lang#en#{{tag}}">
+ </td>
+ <td style='width:250px;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=messages-hardcoded&delete={{tag}}"><span class="glyphicon glyphicon-remove"></span> {{lang_deleteTAG}}</a>
+ </td>
+ </tr>
+ {{/msgsHC}}
+ <tr id="newTagCoded">
+ </tr>
+ </tbody>
+ </table>
+ <div class="panel-body">
+ <a class="btn btn-primary" href='?do=Translation' >{{lang_back}}</a>
+ <button class="btn btn-primary" type="button" onclick="addTag(true);" >{{lang_newTag}}</button>
+ <input type="hidden" name="update" value="true">
+ <input type="hidden" name="path" value="messages-hardcoded">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="submit" class="btn btn-primary" value="{{lang_save}}">
+ </form>
+ </div>
+ </div>
+</div>
+<script>
+function addTag(isHardcoded){
+ var target;
+ if(isHardcoded)
+ target = document.getElementById('newTagCoded');
+ else
+ 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>";
+}
+</script>
diff --git a/templates/translation/template.html b/templates/translation/template.html
new file mode 100644
index 00000000..11d4e4e7
--- /dev/null
+++ b/templates/translation/template.html
@@ -0,0 +1,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>