fp_template.php

  1. 4.x themes/classic/fp_template.php
  2. 5.x themes/basic/fp_template.php
  3. 5.x themes/fp5_clean/fp_template.php
  4. 5.x themes/classic/fp_template.php

File

themes/basic/fp_template.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * This is the primary page template for FlightPath.
  5. *
  6. * Certain variables are set by the AdvisingScreen class, in its output_to_browser() method, which
  7. * are available here:
  8. *
  9. *
  10. * $page_content The actual content of the page which appears in the
  11. * center.
  12. * $page_on_load If the page performs any javascript onLoad, it goes here.
  13. * $page_tabs Contains the HTML to draw the correct tabs at the top of the page.
  14. * $page_is_popup Set to either TRUE or FALSE. If TRUE, do not display the header,
  15. * and possibly have different layout parameters. These are booleans
  16. * and not strings.
  17. * $page_title The HTML title of the browser window.
  18. * $page_has_search Either TRUE or FALSE. Is a boolean, not a string. If set to
  19. * TRUE, the page will have a search bar at the top.
  20. * $page_scroll_top If set, the page will automatically scroll to this position (and
  21. * the one below it) on load.
  22. * $page_hide_report_error if set to TRUE, the page will not display the link to report
  23. * an error.
  24. * $page_banner_is_link true or false. If true, the banner at the top will load FP in a
  25. * new window.
  26. * $page_extra_js_settings These are variable definitions set by other modules, using the fp_add_js() command.
  27. * $page_extra_css_files These are extra CSS files which other modules wish to include, using fp_add_css().
  28. * $page_extra_js_files Similar to extra_css files, but for extra javascript files.
  29. * $page_body_classes A string containing the CSS classes (space-separated) which should go on the body element.
  30. *
  31. **/
  32. $theme_location = fp_theme_location();
  33. // If this page is a popup, let's add that information to the body_classes.
  34. if ($page_is_popup) {
  35. $page_body_classes .= " page-is-popup ";
  36. }
  37. ?>
  38. <html>
  39. <head>
  40. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  41. <script src="<?php print base_path() ?>/inc/jquery-1.8.3.min.js" type="text/javascript"></script>
  42. <script src="<?php print base_path() ?>/inc/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
  43. <link rel='stylesheet' type='text/css' href='<?php print base_path() ?>/inc/jqueryui-css/ui-lightness/jquery-ui-1.9.2.custom.min.css' />
  44. <script type='text/javascript'>
  45. <?php print $page_extra_js_settings; ?>
  46. // perform any requested actions on page load...
  47. $(document).ready(function() { <?php print $page_on_load; ?> });
  48. </script>
  49. <?php
  50. // Add extra JS files.
  51. print $page_extra_js_files;
  52. // Load this theme's CSS file(s)
  53. print "<link rel='stylesheet' type='text/css' href='$theme_location/style.css?$page_css_js_query_string' /> \n";
  54. print "<link rel='stylesheet' type='text/css' href='$theme_location/layout.css?$page_css_js_query_string' /> \n";
  55. // Load any extra CSS files which addon modules might have added.
  56. print $page_extra_css_files;
  57. // Load the custom.css file for this theme...
  58. print "<link rel='stylesheet' type='text/css' href='$theme_location/custom.css?$page_css_js_query_string' /> \n";
  59. ?>
  60. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  61. <title><?php print $page_title; ?></title>
  62. </head>
  63. <body class='<?php print $page_body_classes; ?>'>
  64. <div class='top-banner'>
  65. <?php
  66. // ***************** Header Content *****************
  67. // ***************** *****************
  68. if ($page_banner_is_link == TRUE) {
  69. print "<a href='{$GLOBALS["fp_system_settings"]["self_url"]}' target='_blank'>";
  70. }
  71. ?><img src='<?php print "$theme_location/images/"; ?>fp_banner_default.png' border='0'><?php
  72. if ($page_banner_is_link == TRUE) {
  73. print "</a>";
  74. }
  75. ?>
  76. </div>
  77. <!-- Page tabs and search -->
  78. <table class='tabs-search-table'>
  79. <tr>
  80. <!-- ********** The tabs td ************-->
  81. <td class='tabs-td'>
  82. <table class='tabs-table-tabs'>
  83. <tr>
  84. <td align="left">
  85. <?php print $page_tabs; ?>
  86. </td>
  87. </tr>
  88. </table>
  89. </td>
  90. <!-- The possible search bar td -->
  91. <td class='search-td'>
  92. <?php
  93. // Insert a search bar if there is one.
  94. if ($page_has_search == TRUE && function_exists("student_search_menu")) {
  95. print student_search_render_small_search();
  96. }
  97. ?>
  98. </td>
  99. </tr>
  100. </table>
  101. <!-- Page content -->
  102. <div class='page-content'>
  103. <?php
  104. // ***************** Page specific content will be in here *****************
  105. print $page_content;
  106. // ***************** Page specific content was in here *****************
  107. ?>
  108. </div>
  109. <?php
  110. //------------------------------------------------
  111. // ------- MSG AT BOTTOM -------------------------
  112. //------------------------------------------------
  113. ?>
  114. <div class='fp-bottom-message'>
  115. <?php
  116. if ($page_hide_report_error != TRUE) {
  117. print "<a class='nounderline' href='javascript: popupreportcontact()'>" . t("Contact the @FlightPath production team", array("@FlightPath" => variable_get("system_name", "FlightPath"))) . "</a>";
  118. }
  119. ?>
  120. <!-- Optional copyright message could go here.
  121. <span>&copy; Date, Institution, etc.</span> -->
  122. </div>
  123. </body>
  124. </html>