blob: 11ac2a035535468e64b7d7780db6ff9fee70d5cc [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001<!DOCTYPE html>
2{% load static %}
3{% load projecttags %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -05004{% load project_url_tag %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005<html lang="en">
6 <head>
Patrick Williamsf1e5d692016-03-30 15:21:19 -05007 <title>
8 {% block title %} Toaster {% endblock %}
9 </title>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
11<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.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/prettify.css' %}" type='text/css'/>
14<link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
15
16 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
17 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
18 <script src="{% static 'js/jquery-2.0.3.min.js' %}">
19 </script>
20 <script src="{% static 'js/jquery.cookie.js' %}">
21 </script>
22 <script src="{% static 'js/bootstrap.min.js' %}">
23 </script>
24 <script src="{% static 'js/prettify.js' %}">
25 </script>
26 <script src="{% static 'js/libtoaster.js' %}">
27 </script>
28 {% if DEBUG %}
29 <script>
30 libtoaster.debug = true;
31 </script>
32 {% endif %}
33 <script>
34 libtoaster.ctx = {
35 jsUrl : "{% static 'js/' %}",
36 htmlUrl : "{% static 'html/' %}",
37 projectsUrl : "{% url 'all-projects' %}",
38 projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}},
39 {% if project.id %}
40 projectId : {{project.id}},
Patrick Williamsf1e5d692016-03-30 15:21:19 -050041 projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042 projectName : {{project.name|json}},
Patrick Williamsf1e5d692016-03-30 15:21:19 -050043 projectIsDefault: {% if project.is_default %}true{% else %}false{% endif %},
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044 recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
45 layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
46 machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
47
48 projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
49 projectId : {{project.id}},
50 {% else %}
51 projectId : undefined,
52 projectPageUrl : undefined,
53 projectName : undefined,
Patrick Williamsf1e5d692016-03-30 15:21:19 -050054 projectIsDefault: false,
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055 {% endif %}
56 };
57 </script>
58 <script src="{% static 'js/base.js' %}"></script>
59 <script>
60 $(document).ready(function () {
61 /* Vars needed for base.js */
62 var ctx = {};
63 ctx.numProjects = {{projects|length}};
64 ctx.currentUrl = "{{request.path|escapejs}}";
65
66 basePageInit(ctx);
67 });
68 </script>
69
70{% block extraheadcontent %}
71{% endblock %}
72 </head>
73
74<body style="height: 100%">
75
76 {% csrf_token %}
77 <div id="loading-notification" class="alert lead text-center" style="display:none">
78 Loading <i class="fa-pulse icon-spinner"></i>
79 </div>
80
81 <div id="change-notification" class="alert lead alert-info" style="display:none">
82 <button type="button" class="close" id="hide-alert">&times;</button>
83 <span id="change-notification-msg"></span>
84 </div>
85
86 <div class="navbar navbar-fixed-top">
87 <div class="navbar-inner">
88 <div class="container-fluid">
89 <a class="brand logo" href="#"><img src="{% static 'img/logo.png' %}" class="" alt="Yocto logo project"/></a>
90 <span class="brand">
91 <a href="/">Toaster</a>
92 {% if DEBUG %}
93 <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
94 {% endif %}
95 </span>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050096 {% if BUILD_MODE and request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050097 <ul class="nav">
Patrick Williamsf1e5d692016-03-30 15:21:19 -050098 <li {% if request.resolver_match.url_name == 'all-builds' %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050099 class="active"
100 {% endif %}>
101 <a href="{% url 'all-builds' %}">
102 <i class="icon-tasks"></i>
103 All builds
104 </a>
105 </li>
106 <li {% if request.resolver_match.url_name == 'all-projects' %}
107 class="active"
108 {% endif %}>
109 <a href="{% url 'all-projects' %}">
110 <i class="icon-folder-open"></i>
111 All projects
112 </a>
113 </li>
114 </ul>
115 {% endif %}
116 <ul class="nav pull-right">
117 <li>
118 <a target="_blank" href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
119 <i class="icon-book"></i>
120 Manual
121 </a>
122 </li>
123 </ul>
124 <span class="pull-right divider-vertical"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500125
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500126 <!-- new project button; only show in build mode -->
127 {% if BUILD_MODE %}
128 <div class="btn-group pull-right">
129 <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
130 </div>
131 {% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500132
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500133 <!--
134 New build popover; only shown if there is at least one user-created project
135 and we're in build mode
136 -->
137 {% if BUILD_MODE and non_cli_projects.count > 0 %}
138 <div class="btn-group pull-right" id="new-build-button" style="display:none">
139 <button class="btn dropdown-toggle" data-toggle="dropdown">
140 New build
141 <i class="icon-caret-down"></i>
142 </button>
143 <ul class="dropdown-menu new-build multi-select">
144 <li>
145 <h3>New build</h3>
146 <h6>
147 Project:
148 <span id="project">
149 {% if project.id and not project.is_default %}
150 <a class="lead" href="{% project_url project %}">{{project.name}}</a>
151 {% else %}
152 <a class="lead" href="#"></a>
153 {% endif %}
154 <i class="icon-pencil"></i>
155 </span>
156 </h6>
157 <form id="change-project-form" style="display:none;">
158 <div class="input-append">
159 <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
160 <button id="save-project-button" class="btn" type="button">Save</button>
161 <a href="#" id="cancel-change-project" class="btn btn-link" style="display: none">Cancel</a>
162 </div>
163 <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
164 </form>
165 </li>
166 <li>
167 <div class="alert" style="display:none;">
168 <p>This project configuration is incomplete, so you cannot run builds.</p>
169 <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
170 </div>
171 </li>
172 <li id="targets-form">
173 <h6>Recipe(s):</h6>
174 <form>
175 <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
176 <div class="row-fluid">
177 <button class="btn btn-primary build-button" disabled>Build</button>
178 </div>
179 </form>
180 </li>
181 </ul>
182 </div>
183 {% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500184 </div>
185 </div>
186</div>
187
188<div class="container-fluid top-padded">
189<div class="row-fluid">
190{% block pagecontent %}
191{% endblock %}
192</div>
193</div>
194</body>
195</html>
196