]> source.dussan.org Git - archiva.git/blob
3625ad8f152bdd093964cf4fa5afff5ef7a76385
[archiva.git] /
1 <script id="file-upload-screen" type="text/html">
2   <div id="file-upload-main" data-bind='template:{name:"file-upload-tmpl"}'></div>
3 </script>
4
5 <script id="file-upload-tmpl" type="text/html">
6   <div class="page-header">
7     <h3>${$.i18n.prop('fileupload.header')}</h3>
8   </div>
9   <form id="fileupload" action="restServices/archivaUiServices/fileUploadService" method="POST"
10         enctype="multipart/form-data" class="well form-horizontal">
11
12     <fieldset id="network-proxy-edit-fieldset">
13       <div class="control-group">
14         <label class="control-label" for="repositoryId">${$.i18n.prop('fileupload.repositoryId')}</label>
15         <div class="controls">
16           <select id="repositoryId"
17                     data-bind="options: managedRepositories, optionsText: 'name',optionsValue:'id',
18                      value: repositoryId"></select>
19          </div>
20         </div>
21       <div class="control-group">
22         <label class="control-label" for="groupId">${$.i18n.prop('fileupload.groupId')}</label>
23         <div class="controls">
24           <input type="text" class="xlarge required" data-bind="value: groupId" id="groupId" name="groupId" size="10" />
25           </div>
26         </div>
27       </div>
28       <div class="control-group">
29         <label class="control-label" for="artifactId">${$.i18n.prop('fileupload.artifactId')}</label>
30         <div class="controls">
31           <input type="text" class="xlarge required" data-bind="value: artifactId" id="artifactId" name="artifactId" size="10" />
32           </div>
33         </div>
34       </div>
35       <div class="control-group">
36         <label class="control-label" for="version">${$.i18n.prop('fileupload.version')}</label>
37         <div class="controls">
38           <input type="text" class="xlarge required" data-bind="value: version" id="version" name="version" size="10" />
39           </div>
40         </div>
41       </div>
42       <div class="control-group">
43         <label class="control-label" for="packaging">${$.i18n.prop('fileupload.packaging')}</label>
44         <div class="controls">
45           <input type="text" class="xlarge required" data-bind="value: packaging" id="packaging" name="packaging" size="10" />
46           </div>
47         </div>
48       </div>
49       <div class="control-group">
50         <label class="control-label" for="generatePom">${$.i18n.prop('fileupload.generatePom')}</label>
51         <div class="controls">
52           <input type="checkbox" class="xlarge" data-bind="value: generatePom" id="generatePom" name="generatePom" />
53           </div>
54         </div>
55       </div>
56     </fieldset>
57
58     <div class="row fileupload-buttonbar">
59       <div class="span7">
60         <span class="btn btn-success fileinput-button">
61           <i class="icon-plus icon-white"></i>
62           <span>${$.i18n.prop('fileupload.file.choose')}</span>
63           <input type="file" name="files[]" multiple="">
64         </span>
65         <button type="submit" class="btn btn-primary start">
66           <i class="icon-upload icon-white"></i>
67           <span>${$.i18n.prop('fileupload.start')}</span>
68         </button>
69         <button type="reset" class="btn btn-warning cancel">
70           <i class="icon-ban-circle icon-white"></i>
71           <span>${$.i18n.prop('fileupload.cancel')}</span>
72         </button>
73         <button type="button" class="btn btn-danger delete">
74           <i class="icon-trash icon-white"></i>
75           <span>${$.i18n.prop('fileupload.delete')}</span>
76         </button>
77         <input type="checkbox" class="toggle">
78       </div>
79       <div class="span5">
80         <div class="progress progress-success progress-striped active">
81           <div class="bar" style="width:0%;"></div>
82         </div>
83       </div>
84     </div>
85     <div>
86       <a href="#" id="fileupload-save-files">
87         <span class="btn btn-info" data-bind='click: saveArtifacts'>
88           <i class="icon-file icon-white"></i>
89           <span>${$.i18n.prop('fileupload.save')}</span>
90         </span>
91       </a>
92     </div>
93     <div class="fileupload-loading"></div>
94     <br>
95     <table class="table table-striped">
96       <tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>
97     </table>
98 </form>
99
100 </script>
101
102
103 <script id="template-upload" type="text/html">
104   {% for (var i=0, file; file=o.files[i]; i++) { %}
105     <tr class="template-upload">
106       <td class="name"><span>{%=file.name%}</span></td>
107       <td><input type="text" id="classifier" name="classifier" placeholder="classifier" value=""/></td>
108       <td><span>pomFile:</span><input type="checkbox" id="pomFile" name="pomFile"/></td>
109       <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
110       {% if (file.error) { %}
111       <td class="error" colspan="2">
112         <span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span>
113         {%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%}
114       </td>
115       {% } else if (o.files.valid && !i) { %}
116       <td>
117         <div class="progress progress-success progress-striped active">
118           <div class="bar" style="width:0%;"></div>
119         </div>
120       </td>
121       <td class="start">
122         {% if (!o.options.autoUpload) { %}
123         <button class="btn btn-primary">
124           <i class="icon-upload icon-white"></i>
125           <span>{%=$.i18n.prop('fileupload.start')%}</span>
126         </button>
127         {% } %}
128       </td>
129       {% } else { %}
130       <td colspan="2"></td>
131       {% } %}
132       <td class="cancel">
133       {% if (!i) { %}
134         <button class="btn btn-warning">
135           <i class="icon-ban-circle icon-white"></i>
136           <span>{%=$.i18n.prop('fileupload.cancel')%}</span>
137         </button>
138       {% } %}
139       </td>
140     </tr>
141   {% } %}
142 </script>
143
144 <script id="template-download" type="text/html">
145   {% for (var i=0, file; file=o.files[i]; i++) { %}
146   <tr class="template-download">
147       <td class="name"><span>{%=file.name%}</span></td>
148       <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
149     {% if (file.error) { %}
150       <td class="error" colspan="2">
151         <span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span>
152         {%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%}
153       </td>
154     {% } else { %}
155       <td colspan="2"></td>
156     {% } %}
157       <td class="delete">
158         <button class="btn btn-danger" data-type="{%=file.deleteType%}"
159                 data-url="restServices/archivaUiServices/fileUploadService/{%=file.deleteUrl%}">
160           <i class="icon-trash icon-white"></i>
161           <span>{%=$.i18n.prop('fileupload.destroy')%}</span>
162         </button>
163         <input type="checkbox" name="delete" value="1">
164       </td>
165     </tr>
166 {% } %}
167 </script>