PageRenderTime 47ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/skins/freepbx/layout.php

https://github.com/robertleeplummerjr/bluebox
PHP | 192 lines | 144 code | 36 blank | 12 comment | 15 complexity | 046afbf7b55b89f04f9536c71cc708af MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <?php echo $meta ?>
  6. <title>
  7. Bluebox<?php if (strlen($title) > 0) echo ' : ' . $title; ?>
  8. </title>
  9. <?php stylesheet::add(array('reset','layout', 'navigation', 'screen', 'forms'), 10); ?>
  10. <?php stylesheet::add('jquery.custom.css', 31); ?>
  11. <?php stylesheet::add('ie', array('cond' => 'ie', 'weight' => 10)); ?>
  12. <?php jquery::addPlugin(array('persistent', 'scrollTo', 'growl', 'qtip', 'infiniteCarousel', 'dropdowns', 'blockUI', 'form')); ?>
  13. <?php javascript::add('bluebox'); ?>
  14. <?php echo $css ?>
  15. <?php echo $js ?>
  16. <?php echo html::link('skins/bluebox/assets/img/favicon.ico', 'icon', 'image/x-icon'); ?>
  17. </head>
  18. <body>
  19. <div id="lang_bar"></div>
  20. <div class="container">
  21. <div class="header">
  22. <div class="topbar">
  23. <!-- Logo for the page -->
  24. <div id="logo_container">
  25. <?php
  26. $logoImg = html::image('assets/img/logo.png','the Bluebox Project!');
  27. echo html::anchor('/welcome', $logoImg, array(
  28. 'id' => 'logo'
  29. ));
  30. ?>
  31. </div>
  32. <!-- Profile/experience related quicklinks, like login/logout, language, etc. -->
  33. <div id="profileLinks">
  34. <!-- Login manager -->
  35. <div class="loginManager">
  36. <?php if (users::getAttr('user_id')): ?>
  37. <?php echo __('Welcome') . ' ' .users::getAttr('full_name'); ?>
  38. |
  39. <?php echo html::anchor('user/logout', __('Logout')); ?>
  40. <?php endif; ?>
  41. <?php
  42. /*
  43. echo ' | ';
  44. echo html::anchor('#', __('Language') , array('id' => 'change_lang'));
  45. echo form::dropdown(array(
  46. 'name' => 'lang',
  47. 'id' => 'lang',
  48. 'style' => 'display:none;',
  49. 'translate' => false
  50. ) , i18n::$langs, Session::instance()->get('lang', 'en'));
  51. */
  52. ?>
  53. <?php if (users::getAttr('user_id')): ?>
  54. <!-- dash board -->
  55. <div class="dash">
  56. <?php if (class_exists('DashManager', TRUE)) echo DashManager::renderActions(); ?>
  57. </div>
  58. <?php endif; ?>
  59. </div>
  60. </div>
  61. <!-- Quick access bar, for module access after login -->
  62. <div id="quickAccess"></div>
  63. </div>
  64. <div class="bottom"></div>
  65. </div>
  66. <!-- END OF HEADER -->
  67. <div class="content">
  68. <div class="wrapper">
  69. <div class="nav">
  70. <?php if (users::getAttr('user_id')): ?>
  71. <div id="navigation">
  72. <div class="navCategorySelection" >
  73. <div class="wrapper">
  74. <ul id="navCategories">
  75. <?php
  76. $navTree = navigation::getNavTree(1);
  77. foreach($navTree as $branch => $leafs) {
  78. echo '<li id="category_' . strtolower($branch) .'">' . ucfirst($branch) . '</li>';
  79. }
  80. ?>
  81. </ul>
  82. </div>
  83. </div>
  84. <?php foreach($navTree as $branch => $leafs) : ?>
  85. <div id="navGroup<?php echo ucfirst($branch); ?>" class="navGroup">
  86. <div class="wrapper">
  87. <ul>
  88. <?php
  89. foreach($leafs as $navStructure) {
  90. // determine if the nav items has a menu icon
  91. if($img = navigation::getNavIcon($navStructure)) {
  92. $icon = '<span class="navIcon ' . pathinfo($img, PATHINFO_FILENAME) . '" style="background-image: url(' . $img . ');">&nbsp;</span>';
  93. $text = $icon . '<span>' . $navStructure['navLabel'] . '</span>';
  94. } else {
  95. $text = '<span>' . $navStructure['navLabel'] . '</span>';
  96. }
  97. // create the link for this item
  98. echo '<li>';
  99. echo html::anchor($navStructure['navURL'], $text, array(
  100. 'title' => (isset($navStructure['navSummary']) ? $navStructure['navSummary'] : ''),
  101. 'class' => navigation::getNavClasses($navStructure)
  102. ));
  103. echo '</li>';
  104. }
  105. ?>
  106. </ul>
  107. </div>
  108. </div>
  109. <?php endforeach; ?>
  110. <div id="navCap"></div>
  111. </div>
  112. <?php endif; ?>
  113. </div>
  114. <div class="main">
  115. <?php message::render(); ?>
  116. <div class="sub_menu">
  117. <?php
  118. $submenu = navigation::getCurrentSubMenu();
  119. if (!empty($submenu)&& navigation::atUrl()) {
  120. foreach ($submenu as $menuItem => $parameters) {
  121. if (!empty($parameters['disabled'])) {
  122. continue;
  123. }
  124. if (navigation::atUrl($parameters['url'])) {
  125. continue;
  126. }
  127. echo html::anchor($parameters['url'], __($menuItem));
  128. }
  129. }
  130. ?>
  131. </div>
  132. <?php echo $content; ?>
  133. </div>
  134. </div>
  135. </div>
  136. <!-- END OF CONTENT -->
  137. <div class="footer">
  138. </div>
  139. <!-- END OF FOOTER -->
  140. </div>
  141. <?php
  142. if (class_exists('DashManager', TRUE) && users::getAttr('user_id'))
  143. {
  144. echo DashManager::renderDialogs();
  145. }
  146. ?>
  147. <?php javascript::renderCodeBlocks(); ?>
  148. </body>
  149. </html>
  150. <?php if (Kohana::config('core.render_stats') === TRUE) { ?>
  151. <!-- Kohana Version: {kohana_version} -->
  152. <!-- Kohana Codename: {kohana_codename} -->
  153. <!-- Execution Time: {execution_time} -->
  154. <!-- Memory Usage: {memory_usage} -->
  155. <!-- Included Files: {included_files} -->
  156. <?php } ?>