1{% 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
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
29      <span class="glyphicon glyphicon-edit" id="project-change-form-toggle"></i>
30
31      {% 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>
43
44  {% if not project.is_default %}
45  <div id="project-topbar">
46    <ul class="nav nav-tabs">
47      <li id="topbar-configuration-tab">
48      <a href="{% url 'project' project.id %}">
49        Configuration
50      </a>
51      </li>
52      <li>
53      <a href="{% url 'projectbuilds' project.id %}">
54        Builds ({{project.get_number_of_builds}})
55      </a>
56      </li>
57      <li>
58      <a href="{% url 'importlayer' project.id %}">
59        Import layer
60      </a>
61      </li>
62      <li>
63      <a href="{% url 'newcustomimage' project.id %}">
64        New custom image
65      </a>
66      </li>
67      <li class="pull-right">
68        <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>
72          </div>
73          <button id="build-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}" disabled>Build</button>
74        </form>
75      </li>
76    </ul>
77  </div>
78  {% endif %}
79</div>
80