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