blob: 622787c4bcc6747f0209dafcc3b95fe36ba9ad05 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001{% 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 (pstb):"+e);
14 console.warn(e);
15 }
16 });
17</script>
18
19<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>
28 {% if project.is_default %}
29 <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>
30 {% endif %}
31 </h1>
32 <form id="project-name-change-form" class="form-inline" style="display: none;">
33 <div class="form-group">
34 <input class="form-control input-lg" type="text" id="project-name-change-input" autocomplete="off" value="{{project.name}}">
35 </div>
36 <button id="project-name-change-btn" class="btn btn-default btn-lg" type="button">Save</button>
37 <a href="#" id="project-name-change-cancel" class="btn btn-lg btn-link">Cancel</a>
38 </form>
39 </div>
40
41 {% with mrb_type='project' %}
42 {% include "mrb_section.html" %}
43 {% endwith %}
44
45 {% if not project.is_default %}
46 <div id="project-topbar">
47 <ul class="nav nav-tabs">
48 <li id="topbar-configuration-tab">
49 <a href="{% url 'project_specific' project.id %}">
50 Configuration
51 </a>
52 </li>
53 <li>
54 <a href="{% url 'importlayer' project.id %}">
55 Import layer
56 </a>
57 </li>
58 <li>
59 <a href="{% url 'newcustomimage' project.id %}">
60 New custom image
61 </a>
62 </li>
63 <li class="pull-right">
64 <form class="form-inline">
65 <div class="form-group">
66 <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>
67 <input id="build-input" type="text" class="form-control input-lg" placeholder="Select the default image recipe" autocomplete="off" disabled value="{{project.get_default_image}}">
68 </div>
69 {% if project.get_is_new %}
70 <button id="update-project-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}">Prepare Project</button>
71 {% else %}
72 <button id="cancel-project-button" class="btn info btn-lg" data-project-id="{{project.id}}">Cancel</button>
73 <button id="update-project-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}">Update</button>
74 {% endif %}
75 </form>
76 </li>
77 </ul>
78 </div>
79 {% endif %}
80</div>