blob: c59247f8a32929ee9cb41c10518c282e3688c042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
{% extends "baseprojectpage.html" %}
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block localbreadcrumb %}
<li>Import layer</li>
{% endblock %}
{% block projectinfomain %}
<script src="{% static 'js/importlayer.js' %}"></script>
<script>
$(document).ready(function (){
var ctx = {};
ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}";
ctx.layerDetailsUrl = "{% url 'layerdetails' %}";
ctx.xhrImportLayerUrl = "{% url 'xhr_importlayer' %}";
ctx.xhrEditProjectUrl = "{% url 'xhr_projectedit' project.id %}";
ctx.projectPageUrl = "{% url 'project' project.id %}";
ctx.projectId = {{project.id}};
try {
importLayerPageInit(ctx);
} catch(e) {
document.write(e.stack);
console.log(e);
}
});
</script>
<div class="page-header">
<h1>Import layer</h1>
</div>
{% include "layers_dep_modal.html" %}
<form>
{% if project %}
<span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span>
{% endif %}
<fieldset class="air">
<legend>Layer repository information</legend>
<div class="alert alert-error" id="import-error" style="display:none">
<button type="button" class="close" data-dismiss="alert">×</button>
<h3></h3>
<span></span>
<ul></ul>
</div>
<div class="control-group" id="layer-name-ctrl">
<label class="control-label" for="import-layer-name">
Layer name
<span class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes" />
</label>
<div class="controls">
<input id="import-layer-name" type="text" required autofocus>
<span class="help-inline" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span>
<span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span>
</div>
</div>
<label for="layer-git-repo-url" class="project-form">
Git repository URL
<span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." />
</label>
<input type="text" id="layer-git-repo-url" class="input-xxlarge" required>
<label class="project-form" for="layer-subdir">
Repository subdirectory
<span class="muted">(optional)</span>
<span class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)" />
</label>
<input type="text" id="layer-subdir">
<div class="control-group" id="layer-revision-ctrl">
<label class="control-label" for="layer-git-ref">Revision
<span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span>
</label>
<div class="controls">
<input type="text" class="span4" id="layer-git-ref" required>
<span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span>
</div>
</div>
<label class="project-form" for="layer-description">Layer description
<span class="muted">(optional)</span>
<span class="icon-question-sign get-help" title="A short layer explanation" />
</label>
<textarea id="layer-description" class="input-xxlarge"></textarea>
</fieldset>
<fieldset class="air">
<legend>
Layer dependencies
<span class="muted">(optional)</span>
<span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon" />
</legend>
<ul class="unstyled configuration-list" id="layer-deps-list">
</ul>
<div class="input-append">
<input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" placeholder="Type a layer name" id="layer-dependency" class="input-xlarge">
<a class="btn" type="button" id="add-layer-dependency-btn" disabled>
Add layer
</a>
</div>
<span class="help-inline">You can only add layers Toaster knows about</span>
</fieldset>
<div class="form-actions" id="form-actions">
<button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button>
<span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span>
</div>
</form>
{% endblock %}
|