blob: 768ca945541b9c6406b30ae1b4c2c6deb0c47cc5 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001{% load static %}
2<script src="{% static 'js/projecttopbar.js' %}"></script>
3<script>
4 $(document).ready(function () {
5 var ctx = {
6 numProjectLayers : {{project.get_project_layer_versions.count}},
7 machine : "{{project.get_current_machine_name|default_if_none:""}}",
8 }
9
10 try {
11 projectTopBarInit(ctx);
12 } catch (e) {
13 document.write("Sorry, An error has occurred loading this page");
14 console.warn(e);
15 }
16 });
17</script>
18
Patrick Williamsc0f7c042017-02-23 20:41:17 -060019<div class="col-md-12">
20 <div class="alert alert-success alert-dismissible change-notification" id="project-created-notification" style="display:none">
21 <button type="button" class="close" data-dismiss="alert">&times;</button>
22 <p>Your project <strong>{{project.name}}</strong> has been created. You can now <a class="alert-link" href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a class="alert-link" href="{% url 'projectimagerecipes' project.id %}">choose image recipes</a> to build.</p>
23 </div>
24 <!-- project name -->
25 <div class="page-header">
26 <h1 id="project-name-container">
27 <span class="project-name">{{project.name}}</span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029 <span class="glyphicon glyphicon-edit" id="project-change-form-toggle"></i>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050030
Patrick Williamsc0f7c042017-02-23 20:41:17 -060031 {% if project.is_default %}
32 <span class="glyphicon glyphicon-question-sign get-help" title="This project shows information about the builds you start from the command line while Toaster is running"></span>
33 {% endif %}
34 </h1>
35 <form id="project-name-change-form" class="form-inline" style="display: none;">
36 <div class="form-group">
37 <input class="form-control input-lg" type="text" id="project-name-change-input" autocomplete="off" value="{{project.name}}">
38 </div>
39 <button id="project-name-change-btn" class="btn btn-default btn-lg" type="button">Save</button>
40 <a href="#" id="project-name-change-cancel" class="btn btn-lg btn-link">Cancel</a>
41 </form>
42 </div>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050043
Patrick Williamsc0f7c042017-02-23 20:41:17 -060044 {% if not project.is_default %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050045 <div id="project-topbar">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046 <ul class="nav nav-tabs">
Patrick Williamsf1e5d692016-03-30 15:21:19 -050047 <li id="topbar-configuration-tab">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060048 <a href="{% url 'project' project.id %}">
49 Configuration
50 </a>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050051 </li>
52 <li>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060053 <a href="{% url 'projectbuilds' project.id %}">
54 Builds ({{project.get_number_of_builds}})
55 </a>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050056 </li>
57 <li>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060058 <a href="{% url 'importlayer' project.id %}">
59 Import layer
60 </a>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050061 </li>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050062 <li>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060063 <a href="{% url 'newcustomimage' project.id %}">
64 New custom image
65 </a>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050066 </li>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050067 <li class="pull-right">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060068 <form class="form-inline">
69 <div class="form-group">
70 <span class="glyphicon glyphicon-question-sign get-help" data-placement="left" title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a colon and a task name to the recipe name, like so: <code>busybox:clean</code>"></span>
71 <input id="build-input" type="text" class="form-control input-lg" placeholder="Type the recipe you want to build" autocomplete="off" disabled>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050072 </div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060073 <button id="build-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}" disabled>Build</button>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050074 </form>
75 </li>
76 </ul>
77 </div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060078 {% endif %}
79</div>