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 | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | <div class="alert alert-success lead" id="project-created-notification" style="margin-top:15px; display:none"> |
| 20 | <button type="button" class="close" data-dismiss="alert">×</button> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 21 | Your project <strong>{{project.name}}</strong> has been created. You can now <a href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a href="{% url 'projectimagerecipes' project.id %}">choose image recipes</a> to build. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | </div> |
| 23 | |
| 24 | <!-- project name --> |
| 25 | <div class="page-header"> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 26 | <h1 id="project-name-container"> |
| 27 | <span id="project-name">{{project.name}}</span> |
| 28 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | <i class="icon-pencil" data-original-title="" id="project-change-form-toggle" title=""></i> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 30 | |
| 31 | {% if project.is_default %} |
| 32 | <i class="icon-question-sign get-help heading-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running"></i> |
| 33 | {% endif %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | </h1> |
| 35 | <form id="project-name-change-form" style="margin-bottom: 0px; display: none;"> |
| 36 | <div class="input-append"> |
| 37 | <input class="huge input-xxlarge" type="text" id="project-name-change-input" autocomplete="off" value="{{project.name}}"> |
| 38 | <button id="project-name-change-btn" class="btn btn-large" type="button">Save</button> |
| 39 | <a href="#" id="project-name-change-cancel" class="btn btn-large btn-link">Cancel</a> |
| 40 | </div> |
| 41 | </form> |
| 42 | </div> |
| 43 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 44 | {% if not project.is_default %} |
| 45 | <div id="project-topbar"> |
| 46 | <ul class="nav nav-pills"> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 47 | <li id="topbar-configuration-tab"> |
| 48 | <a href="{% url 'project' project.id %}"> |
| 49 | Configuration |
| 50 | </a> |
| 51 | </li> |
| 52 | <li> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 53 | <a href="{% url 'projectbuilds' project.id %}"> |
| 54 | Builds ({{project.get_number_of_builds}}) |
| 55 | </a> |
| 56 | </li> |
| 57 | <li> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 58 | <a href="{% url 'importlayer' project.id %}"> |
| 59 | Import layer |
| 60 | </a> |
| 61 | </li> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 62 | <li> |
| 63 | <a href="{% url 'newcustomimage' project.id %}"> |
| 64 | New custom image |
| 65 | </a> |
| 66 | </li> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 67 | <li class="pull-right"> |
| 68 | <form class="form-inline" style="margin-bottom:0px;"> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 69 | <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-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>"></i> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 70 | <div class="input-append"> |
| 71 | <input id="build-input" type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled> |
| 72 | <button id="build-button" class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build</button> |
| 73 | </div> |
| 74 | </form> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
| 78 | {% endif %} |