diff options
author | raul | 2014-08-07 16:29:06 +0200 |
---|---|---|
committer | raul | 2014-08-07 16:29:06 +0200 |
commit | 6a06aba274425ba8a6b2335b2a37df3c7904b684 (patch) | |
tree | f31b47eb175a184d569d138454971ceb9162c1ce /templates | |
parent | [i18n]Corrected the system and added warnings to the table lines of the Langu... (diff) | |
download | slx-admin-6a06aba274425ba8a6b2335b2a37df3c7904b684.tar.gz slx-admin-6a06aba274425ba8a6b2335b2a37df3c7904b684.tar.xz slx-admin-6a06aba274425ba8a6b2335b2a37df3c7904b684.zip |
[i18n]Add and remove options available for lang administration
Diffstat (limited to 'templates')
-rw-r--r-- | templates/administration/messages.html | 26 | ||||
-rw-r--r-- | templates/administration/template.html | 29 |
2 files changed, 45 insertions, 10 deletions
diff --git a/templates/administration/messages.html b/templates/administration/messages.html index 657dba9e..7cf042e8 100644 --- a/templates/administration/messages.html +++ b/templates/administration/messages.html @@ -14,6 +14,7 @@ <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> @@ -29,13 +30,18 @@ <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=Admin&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=Admin' >{{lang_back}}</a> - <a class="btn btn-primary" href='?do=Admin' >{{lang_newTag}}</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}}"> @@ -50,6 +56,7 @@ <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> @@ -65,13 +72,18 @@ <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=Admin&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=Admin' >{{lang_back}}</a> - <a class="btn btn-primary" href='?do=Admin' >{{lang_newTag}}</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}}"> @@ -80,3 +92,13 @@ </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/administration/template.html b/templates/administration/template.html index fd357b3d..5a89bb3d 100644 --- a/templates/administration/template.html +++ b/templates/administration/template.html @@ -10,29 +10,36 @@ <thead> <tr> <th>Mustache Tag</th> - <th style='text-align:center;'>{{lang_germanJSON}}</th> - <th style='text-align:center;'>{{lang_englishJSON}}</th> - <th style='text-align:center;'>{{lang_portugueseJSON}}</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}}"> + <tr class="{{class}}" id="{{tag}}"> <td>{{tag}}</td> - <td style='width:250px;text-align:center;'> + <td style='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;'> + <td style='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;'> + <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=Admin&template={{path}}&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=Admin' >{{lang_back}}</a> + <a class="btn btn-primary" href='?do=Admin' >{{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="{{path}}"> <input type="hidden" name="token" value="{{token}}"> @@ -41,3 +48,9 @@ </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> |