site.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /**
  3. * Modbash Clean Elgg Theme
  4. *
  5. * Copyright (c) 2015 ModBash
  6. *
  7. * @author Shane Barron <admin@modbash.com>
  8. * @copyright 2015 SocialApparatus
  9. * @license GNU General Public License (GPL) version 2
  10. * @version 1
  11. * @link http://modbash.com
  12. */
  13. $default_items = elgg_extract('default', $vars['menu'], array());
  14. $more_items = elgg_extract('more', $vars['menu'], array());
  15. $url = elgg_get_site_url();
  16. ?>
  17. <div class='container'>
  18. <div class="row">
  19. <nav class="navbar navbar-default" role="navigation">
  20. <!-- Brand and toggle get grouped for better mobile display -->
  21. <div class="navbar-header">
  22. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  23. <span class="sr-only">Toggle navigation</span>
  24. <span class="icon-bar"></span>
  25. <span class="icon-bar"></span>
  26. <span class="icon-bar"></span>
  27. </button>
  28. <a class="navbar-brand" rel="home" href="<?php echo elgg_get_site_url(); ?>" title="<?php echo elgg_get_site_entity()->name; ?>">
  29. <img src="<?php echo elgg_get_site_url(); ?>/mod/lorea_hydra/graphics/hydra-master.jpg">
  30. </a>
  31. </div>
  32. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  33. <ul class="nav navbar-nav">
  34. <?php
  35. foreach ($default_items as $menu_item) {
  36. echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
  37. }
  38. ?>
  39. </ul>
  40. <?php if ($more_items) { ?>
  41. <ul class="nav navbar-nav navbar-left">
  42. <li class="dropdown">
  43. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo elgg_echo("more"); ?> <b class="caret"></b></a>
  44. <?php
  45. echo elgg_view('navigation/menu/elements/section', array(
  46. 'items' => $more_items,
  47. 'class' => 'dropdown-menu'
  48. ));
  49. ?>
  50. </li>
  51. </ul>
  52. <?php
  53. }
  54. if (elgg_is_logged_in()) {
  55. // with topbar and logged in this menu hasn't sense
  56. // $user_url = elgg_get_logged_in_user_entity()->getURL();
  57. // $username = elgg_get_logged_in_user_entity()->username;
  58. // echo "<ul class='nav navbar-nav navbar-right'>";
  59. // echo "<li class='dropdown'>";
  60. // echo "<a href='#' class='dropdown-toggle' data-toggle='dropdown'>";
  61. // echo elgg_echo("your-account");
  62. // echo "<b class='caret'></b></a>";
  63. // echo "<ul class='dropdown-menu'>";
  64. // echo "<li role='presentation'><a href='$user_url'>";
  65. // echo elgg_echo("view-your-profile");
  66. // echo "</a></li>";
  67. // echo "<li role='presentation'>";
  68. // echo "<a href='{$url}dashboard'>";
  69. // echo elgg_echo("view-your-dashboard");
  70. // echo "</a></li>";
  71. // echo "<li role='presentation'>";
  72. // echo "<a href='{$url}messages/inbox/{$username}'>";
  73. // echo '<span class="badge pull-right">' . messages_count_unread() . '</span>' . elgg_echo("view-your-inbox");
  74. // echo "</a></li>";
  75. // echo "<li role='presentation'>";
  76. // echo "<a href='{$url}friends/{$username}'>";
  77. // echo elgg_echo("view-your-friends");
  78. // echo "</a></li>";
  79. // echo "<li role='presentation'>";
  80. // echo "<a href='{$url}whoviewedme'>";
  81. // echo elgg_echo("view-your-visitants");
  82. // echo "</a></li>";
  83. // echo "<li role='presentation' class='divider'></li>";
  84. // echo "<li role='presentation'>";
  85. // echo "<a href='{$url}settings/user/{$username}'>";
  86. // echo elgg_echo("view-your-settings");
  87. // echo "</a></li>";
  88. // echo "<li role='presentation'>";
  89. // echo "<a href='{$url}profile/{$username}/edit'>";
  90. // echo elgg_echo("edit-your-profile");
  91. // echo "</a></li>";
  92. // echo "<li role='presentation'>";
  93. // echo "<a href='{$url}avatar/edit/{$username}'>";
  94. // echo elgg_echo("edit-your-avatar");
  95. // echo "</a></li>";
  96. // if (elgg_is_admin_logged_in()) {
  97. // echo "<li role='presentation'>";
  98. // echo "<a href='{$url}admin'>";
  99. // echo elgg_echo("admin");
  100. // echo "</a></li>";
  101. // }
  102. // echo "<li role='presentation'>";
  103. // echo "<a href='{$url}action/logout'>";
  104. // echo elgg_echo("logout");
  105. // echo "</a></li>";
  106. // echo "</ul></li>";
  107. // echo "</ul>";
  108. } else {
  109. echo "<ul class='nav navbar-nav navbar-right'>";
  110. echo "<li><a href='" . elgg_get_site_url() . "login'>Login</a></li>";
  111. echo "<li><a href='" . elgg_get_site_url() . "register'>Register</a></li>";
  112. echo "</ul>";
  113. }
  114. ?>
  115. </div>
  116. </nav>
  117. </div>
  118. </div>