summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/newproject.html
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/newproject.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/newproject.html99
1 files changed, 64 insertions, 35 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/newproject.html b/bitbake/lib/toaster/toastergui/templates/newproject.html
index ed3a279052..1159d717ae 100644
--- a/bitbake/lib/toaster/toastergui/templates/newproject.html
+++ b/bitbake/lib/toaster/toastergui/templates/newproject.html
@@ -11,60 +11,74 @@
11 <div class="alert alert-error row-fluid" role="alert">{{alert}}</div> 11 <div class="alert alert-error row-fluid" role="alert">{{alert}}</div>
12 {% endif %} 12 {% endif %}
13 </div> 13 </div>
14 {% if releases.count > 0 %} 14
15 <div class="row-fluid">
16 <div class="span6">
15 <form method="POST">{% csrf_token %} 17 <form method="POST">{% csrf_token %}
18
16 <fieldset> 19 <fieldset>
17 <label>Project name <span class="muted">(required)</span></label> 20 <label>Project name <span class="muted">(required)</span></label>
18 <input type="text" class="input-xlarge" required id="new-project-name" name="projectname"> 21 <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
19 {% if releases.count > 1 %} 22 </fieldset>
23
24 <fieldset>
25 <label class="project-form">Project type</label>
26 <label class="project-form radio"><input type="radio" name="ptype" value="analysis" checked/> Analysis Project</label>
27
28 {% if releases.count > 0 %}
29 <label class="project-form radio"><input type="radio" name="ptype" value="build" checked /> Build Project</label>
30 {% endif %}
31 </fieldset>
32
33 {% if releases.count > 0 %}
34 <fieldset class="release">
35 {% if releases.count > 1 %}
20 <label class="project-form"> 36 <label class="project-form">
21 Release 37 Release
22 <i class="icon-question-sign get-help" title="The version of the build system you want to use"></i> 38 <i class="icon-question-sign get-help" title="The version of the build system you want to use"></i>
23 </label> 39 </label>
24 <select name="projectversion" id="projectversion"> 40 <select name="projectversion" id="projectversion">
25 {% for release in releases %} 41 {% for release in releases %}
26 <option value="{{release.id}}" 42 <option value="{{release.id}}"
27 {%if defaultbranch == release.name %} 43 {%if defaultbranch == release.name %}
28 selected 44 selected
29 {%endif%} 45 {%endif%}
30 46 >{{release.description}}</option>
31 >{{release.description}}</option> 47 {% endfor %}
32 {% endfor %}
33 </select> 48 </select>
34 {% for release in releases %} 49 {% for release in releases %}
35 <div class="row-fluid helptext" id="description-{{release.id}}" style="display: none"> 50 <div class="row-fluid helptext" id="description-{{release.id}}" style="display: none">
36 <span class="help-block span5">{{release.helptext|safe}}</span> 51 <span class="help-block span5">{{release.helptext|safe}}</span>
37 </div> 52 </div>
38 {% endfor %} 53 {% endfor %}
39 {% else %} 54 {% else %}
40 <input type="hidden" name="projectversion" value="{{releases.0.id}}"/> 55 <input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
41 {% endif %} 56 {% endif %}
42
43 </fieldset> 57 </fieldset>
58 {% endif %}
44 59
45 <div class="form-actions"> 60 <div class="form-actions">
46 <input type="submit" class="btn btn-primary btn-large" value="Create project"/> 61 <input type="submit" class="btn btn-primary btn-large" value="Create project"/>
47 <span class="help-inline" style="vertical-align:middle;">To create a project, you need to enter a project name</span> 62 <span class="help-inline" style="vertical-align:middle;">To create a project, you need to enter a project name</span>
48 </div> 63 </div>
49 </form> 64 </form>
50 {% else %} 65 </div>
51 <br/>
52 <div class="alert alert-warning row-fluid span6">
53 <h3>No releases configured</h3>
54 <p>
55 It looks like Toaster releases have not been configured properly. Contact the person who set up Toaster, and tell them about it.
56 </p>
57 <p>
58 If you are the Toaster administrator, we are sorry: setting up Toaster is not easy.
59 <ul>
60 <li><a href="{% url 'admin:orm_release_changelist' %}">Log in to the Django administration interface</a> and check the "Releases" section.</li>
61 <li>Check out the <a href="https://wiki.yoctoproject.org/wiki/Setting_up_a_hosted_managed_mode_for_Toaster#Releases">documentation about configuring releases</a></li>
62 </ul>
63 </p>
64 </div>
65 {% endif %}
66 66
67</div> 67 <div class="span5 well">
68 <span class="help-block">
69 <h4>Toaster project types</h4>
70 <p>With a <strong>build project</strong> you configure and run your builds from Toaster.</p>
71 <p>With an <strong>analysis project</strong>, the builds are configured and run by another tool
72 (something like Buildbot or Jenkins), and the project only collects the information about the
73 builds (packages, recipes, dependencies, logs, etc). </p>
74 <p>You can read more on <a href="#">how to set up an analysis project</a>
75 in the Toaster manual.</p>
76 <h4>Release</h4>
77 <p>If you create a <strong>build project</strong>, you will need to select a <strong>release</strong>,
78 which is the version of the build system you want to use to run your builds.</p>
79 </div>
80 </div>
81 </div>
68 82
69 <script type="text/javascript"> 83 <script type="text/javascript">
70 $(document).ready(function () { 84 $(document).ready(function () {
@@ -94,6 +108,21 @@
94 $(".helptext").hide(); 108 $(".helptext").hide();
95 $('#description-' + new_release).fadeIn(); 109 $('#description-' + new_release).fadeIn();
96 }); 110 });
111
112 // Hide the project release when you select an analysis project
113 function projectType() {
114 if ($("input[type='radio']:checked").val() == 'build') {
115 $('.release').fadeIn();
116 }
117 else {
118 $('.release').fadeOut();
119 }
120 }
121 projectType();
122
123 $('input:radio').change(function(){
124 projectType();
125 });
97 }) 126 })
98 </script> 127 </script>
99 128