Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB

16 years ago
16 years ago
  1. {% extends "index.htm" %}
  2. {% block headtags %}
  3. <meta http-equiv="refresh" content="30" />
  4. {% endblock %}
  5. {% block Headline %}
  6. {{ ServerObject.rootName }}
  7. {% endblock %}
  8. {% block LeftColumn %}
  9. {% include "mumble/content.htm" %}
  10. {% endblock %}
  11. {% block Content %}
  12. {% if user.is_authenticated %}
  13. <div id="mumble_registration">
  14. <h2>Server registration</h2>
  15. <form action="" method="post">
  16. {% if Registered %}
  17. You are registered on this server.<br />
  18. {% else %}
  19. You do not have an account on this server.<br />
  20. {% endif %}
  21. <table>
  22. {{ RegForm }}
  23. </table>
  24. <input type="hidden" name="mode" value="reg" />
  25. <input type="submit" />
  26. </form>
  27. </div>
  28. {% else %}
  29. <p>You need to be <a href="/accounts/login">logged in</a> to be able to register an account.</p>
  30. {% endif %}
  31. {% if CurrentUserIsAdmin %}
  32. <div id="mumble_admin">
  33. <h2>Server administration</h2>
  34. <form action="" method="post">
  35. <table>
  36. {{ AdminForm }}
  37. </table>
  38. <input type="hidden" name="mode" value="admin" />
  39. <input type="submit" />
  40. </form>
  41. </div>
  42. <noscript>
  43. By the way, if you had enabled JavaScript, you could see a nifty Tab bar here :)
  44. </noscript>
  45. {% endif %}
  46. {% endblock %}
  47. {% block HeadTag %}
  48. {% if CurrentUserIsAdmin %}
  49. <script type="text/javascript">
  50. Ext.onReady( function(){
  51. Ext.get( 'mumble_registration' ).addClass( 'x-hide-display' );
  52. Ext.get( 'mumble_admin' ).addClass( 'x-hide-display' );
  53. var cardpanel = new Ext.Panel({
  54. renderTo: 'col3_content',
  55. layout: 'card',
  56. height: 400,
  57. activeItem: 0,
  58. border: false,
  59. items: [ {
  60. xtype: 'tabpanel',
  61. defaults: { autoheight: true },
  62. activeTab: {{ DisplayTab }},
  63. items: [
  64. { contentEl: 'mumble_registration', title: 'Registration' },
  65. { contentEl: 'mumble_admin', title: 'Administration' },
  66. ]
  67. } ],
  68. });
  69. } );
  70. </script>
  71. {% endif %}
  72. {% endblock %}