Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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">×</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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 29 | <span class="glyphicon glyphicon-edit" id="project-change-form-toggle"></i> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 30 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 43 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 44 | {% if not project.is_default %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 45 | <div id="project-topbar"> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 46 | <ul class="nav nav-tabs"> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 47 | <li id="topbar-configuration-tab"> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 48 | <a href="{% url 'project' project.id %}"> |
| 49 | Configuration |
| 50 | </a> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 51 | </li> |
| 52 | <li> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 53 | <a href="{% url 'projectbuilds' project.id %}"> |
| 54 | Builds ({{project.get_number_of_builds}}) |
| 55 | </a> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 56 | </li> |
| 57 | <li> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 58 | <a href="{% url 'importlayer' project.id %}"> |
| 59 | Import layer |
| 60 | </a> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 61 | </li> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 62 | <li> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 63 | <a href="{% url 'newcustomimage' project.id %}"> |
| 64 | New custom image |
| 65 | </a> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 66 | </li> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 67 | <li class="pull-right"> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 72 | </div> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 73 | <button id="build-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}" disabled>Build</button> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 74 | </form> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 78 | {% endif %} |
| 79 | </div> |