diff options
Diffstat (limited to 'modules-available/serversetup-bwlp/templates')
-rw-r--r-- | modules-available/serversetup-bwlp/templates/menu-list.html | 54 |
1 files changed, 49 insertions, 5 deletions
diff --git a/modules-available/serversetup-bwlp/templates/menu-list.html b/modules-available/serversetup-bwlp/templates/menu-list.html index a862cff2..1f190bb7 100644 --- a/modules-available/serversetup-bwlp/templates/menu-list.html +++ b/modules-available/serversetup-bwlp/templates/menu-list.html @@ -7,10 +7,11 @@ <th class="slx-smallcol">{{lang_locationCount}}</th> <th class="slx-smallcol">{{lang_isDefault}}</th> <th class="slx-smallcol">{{lang_edit}}</th> + <th class="slx-smallcol">{{lang_delete}}</th> </tr> </thead> <tbody> - {{#table}} + {{#menuTable}} <tr> <td> {{title}} @@ -18,19 +19,62 @@ <td class="text-right"> {{locationCount}} </td> - <td> + <td align="center"> {{#isdefault}} <span class="glyphicon glyphicon-ok"></span> {{/isdefault}} </td> - <td> + <td align="center"> {{#allowEdit}} <a href="?do=serversetup&show=editmenu&id={{menuid}}" class="btn btn-xs btn-default"> <span class="glyphicon glyphicon-edit"></span> </a> {{/allowEdit}} </td> + <td align="center"> + {{#allowDelete}} + <button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#deleteModal" onclick="deleteMenu('{{menuid}}')"> + <span class="glyphicon glyphicon-trash"></span> + </button> + {{/allowDelete}} + </td> </tr> - {{/table}} + {{/menuTable}} </tbody> -</table>
\ No newline at end of file +</table> +<div class="pull-right"> + <a href="?do=serversetup&show=editmenu&id=0" class="btn btn-success {{allowAddMenu}}"> + <span class="glyphicon glyphicon-plus"></span> + {{lang_addMenu}} + </a> +</div> + + +<!-- Modals --> +<form method="post" action="?do=serversetup"> + <input type="hidden" name="token" value="{{token}}"> + <div class ="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="myModalLabel">{{lang_delete}}</h4> + </div> + <div class="modal-body"> + <p>{{lang_menuDeleteConfirm}}</p> + </div> + <div class="modal-footer"> + <input type="hidden" id="delete-menu-id" name="deleteid" value=""> + <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button> + <button type="submit" name="action" value="deleteMenu" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</button> + </div> + </div> + </div> + </div> +</form> + +<script> + function deleteMenu(menuid) { + $("#delete-menu-id").val(menuid); + } +</script>
\ No newline at end of file |