mirror of
https://git.yoctoproject.org/poky
synced 2026-04-01 23:02:21 +02:00
Small changes to the project, new project and all layers pages to ensure consitency in release naming across the interface. The changes are: * In the new project page, change the label 'release version' to 'release' * In the new project page, sort the releases in the dropdown menu in ascending alphabetical order * In the new project page, remove the release name that was showing between brackets after the release description in the dropdown menu * In the project page, make sure the release information shows the release description field instead of the release name, to keep consistency with the new project page * In the all layers page, provide some help text for the branch 'HEAD' (Bitbake rev: 9a90bf201dab83060f0bdd6ac08c72b8d62f6060) Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
94 lines
3.6 KiB
HTML
94 lines
3.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load projecttags %}
|
|
{% load humanize %}
|
|
{% block pagecontent %}
|
|
<div class="row-fluid">
|
|
<div class="page-header">
|
|
<h1>Create a new project</h1>
|
|
</div>
|
|
<div class="container-fluid">
|
|
{% if alert %}
|
|
<div class="alert alert-error row-fluid" role="alert">{{alert}}</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if releases.count > 0 %}
|
|
<form method="POST">{% csrf_token %}
|
|
<fieldset>
|
|
<label>Project name <span class="muted">(required)</span></label>
|
|
<input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
|
|
{% if releases.count > 1 %}
|
|
<label class="project-form">
|
|
Release
|
|
<i class="icon-question-sign get-help" title="The version of the build system you want to use"></i>
|
|
</label>
|
|
<select name="projectversion" id="projectversion">
|
|
{% for release in releases %}
|
|
<option value="{{release.id}}"{%if projectversion == release.id %} selected{%endif%}>{{release.description}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% for release in releases %}
|
|
<div class="row-fluid helptext" id="description-{{release.id}}" style="display: none">
|
|
<span class="help-block span5">{{release.helptext|safe}}</span>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
|
|
{% endif %}
|
|
</fieldset>
|
|
|
|
<div class="form-actions">
|
|
<input type="submit" class="btn btn-primary btn-large" value="Create project"></input>
|
|
<span class="help-inline" style="vertical-align:middle;">To create a project, you need to enter a project name</span>
|
|
</div>
|
|
</form>
|
|
{% else %}
|
|
<br/>
|
|
<div class="alert alert-warning row-fluid span6">
|
|
<h3>No releases configured</h3>
|
|
<p>
|
|
It looks like Toaster releases have not been configured properly. Contact the person who set up Toaster, and tell them about it.
|
|
</p>
|
|
<p>
|
|
If you are the Toaster administrator, we are sorry: setting up Toaster is not easy.
|
|
<ul>
|
|
<li><a href="{% url 'admin:orm_release_changelist' %}">Log in to the Django administration interface</a> and check the "Releases" section.</li>
|
|
<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>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
// hide the new project button
|
|
$("#new-project-button").hide();
|
|
$('.btn-primary').attr('disabled', 'disabled');
|
|
|
|
// enable submit button when all required fields are populated
|
|
$("input#new-project-name").keyup(function() {
|
|
if ($("input#new-project-name").val().length > 0 ){
|
|
$('.btn-primary').removeAttr('disabled');
|
|
$(".help-inline").css('visibility','hidden');
|
|
}
|
|
else {
|
|
$('.btn-primary').attr('disabled', 'disabled');
|
|
$(".help-inline").css('visibility','visible');
|
|
}
|
|
});
|
|
|
|
// show relevant help text for the selected release
|
|
var selected_release = $('select').val();
|
|
$("#description-" + selected_release).show();
|
|
|
|
|
|
$('select').change(function(){
|
|
var new_release = $('select').val();
|
|
$(".helptext").hide();
|
|
$('#description-' + new_release).fadeIn();
|
|
});
|
|
})
|
|
</script>
|
|
</div>
|
|
{% endblock %}
|