base.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html>
  2. {% load static %}
  3. {% load projecttags %}
  4. {% load project_url_tag %}
  5. <html lang="en">
  6. <head>
  7. <title>
  8. {% block title %} Toaster {% endblock %}
  9. </title>
  10. <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
  11. <!--link rel="stylesheet" href="{% static 'css/bootstrap-theme.css' %}" type="text/css"/-->
  12. <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
  13. <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
  14. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  15. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  16. <script src="{% static 'js/jquery-2.0.3.min.js' %}">
  17. </script>
  18. <script src="{% static 'js/jquery.cookie.js' %}">
  19. </script>
  20. <script src="{% static 'js/bootstrap.min.js' %}">
  21. </script>
  22. <script src="{% static 'js/typeahead.jquery.js' %}">
  23. </script>
  24. <script src="{% static 'js/jsrender.min.js' %}">
  25. </script>
  26. <script src="{% static 'js/prettify.js' %}">
  27. </script>
  28. <script src="{% static 'js/libtoaster.js' %}">
  29. </script>
  30. {% if DEBUG %}
  31. <script>
  32. libtoaster.debug = true;
  33. </script>
  34. {% endif %}
  35. <script>
  36. $.views.settings.delimiters("<%", "%>");
  37. libtoaster.ctx = {
  38. jsUrl : "{% static 'js/' %}",
  39. htmlUrl : "{% static 'html/' %}",
  40. projectsUrl : "{% url 'all-projects' %}",
  41. projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}},
  42. {% if project.id %}
  43. projectId : {{project.id}},
  44. projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
  45. projectName : {{project.name|json}},
  46. recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
  47. layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
  48. machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
  49. projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
  50. xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
  51. projectId : {{project.id}},
  52. xhrBuildRequestUrl: "{% url 'xhr_buildrequest' project.id %}",
  53. mostRecentBuildsUrl: "{% url 'most_recent_builds' %}?project_id={{project.id}}",
  54. {% else %}
  55. mostRecentBuildsUrl: "{% url 'most_recent_builds' %}",
  56. projectId : undefined,
  57. projectPageUrl : undefined,
  58. projectName : undefined,
  59. {% endif %}
  60. };
  61. </script>
  62. {% block extraheadcontent %}
  63. {% endblock %}
  64. </head>
  65. <body>
  66. {% csrf_token %}
  67. <div id="loading-notification" class="alert alert-warning lead text-center" style="display:none">
  68. Loading <i class="fa-pulse icon-spinner"></i>
  69. </div>
  70. <div id="change-notification" class="alert alert-info alert-dismissible change-notification" style="display:none">
  71. <button type="button" class="close" id="hide-alert" data-dismiss="alert">&times;</button>
  72. <span id="change-notification-msg"></span>
  73. </div>
  74. <nav class="navbar navbar-default navbar-fixed-top">
  75. <div class="container-fluid">
  76. <div class="navbar-header">
  77. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#global-nav" aria-expanded="false">
  78. <span class="sr-only">Toggle navigation</span>
  79. <span class="icon-bar"></span>
  80. <span class="icon-bar"></span>
  81. <span class="icon-bar"></span>
  82. </button>
  83. <div class="toaster-navbar-brand">
  84. <a href="/">
  85. <img class="logo" src="{% static 'img/logo.png' %}" class="" alt="Yocto logo project"/>
  86. </a>
  87. <a class="brand" href="/">Toaster</a>
  88. {% if DEBUG %}
  89. <span class="glyphicon glyphicon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Git branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Git revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
  90. {% endif %}
  91. </div>
  92. </div>
  93. <div class="collapse navbar-collapse" id="global-nav">
  94. <ul class="nav navbar-nav">
  95. {% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
  96. <li {% if request.resolver_match.url_name == 'all-builds' %}
  97. class="active"
  98. {% endif %}>
  99. <a href="{% url 'all-builds' %}">
  100. <i class="glyphicon glyphicon-tasks"></i>
  101. All builds
  102. </a>
  103. </li>
  104. <li {% if request.resolver_match.url_name == 'all-projects' %}
  105. class="active"
  106. {% endif %}>
  107. <a href="{% url 'all-projects' %}">
  108. <i class="icon-folder-open"></i>
  109. All projects
  110. </a>
  111. </li>
  112. {% endif %}
  113. <li>
  114. <a target="_blank" href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
  115. <i class="glyphicon glyphicon-book"></i>
  116. Documentation
  117. </a>
  118. </li>
  119. </ul>
  120. <a class="btn btn-default navbar-btn navbar-right" id="new-project-button" href="{% url 'newproject' %}">New project</a>
  121. </div>
  122. </div>
  123. </nav>
  124. <div class="container-fluid">
  125. {% block pagecontent %}
  126. {% endblock %}
  127. </div>
  128. </body>
  129. </html>