INFRA-132 - CRM/Dedupe - phpcbf
[civicrm-core.git] / partials / crmAttachment / attachments.html
CommitLineData
f44610a1
TO
1<div nv-file-drop nv-file-over uploader="att.uploader" class="crm-attachments">
2 <table>
3 <tbody>
4 <!-- Files from DB -->
5 <tr ng-repeat="file in att.files">
6 <td class="filename filename-existing">
7 <a ng-href="{{file.url}}" target="_blank">{{file.name}}</a>
8 </td>
9 <td>
10 <input ng-model="file.description" class="crm-form-text" placeholder="{{ts('Description')}}"/>
11 </td>
12 <td>
13 <a crm-confirm="{message: ts('Deleting an attachment will completely remove it from server.'), title: ts('Delete Attachment?')}" on-yes="att.deleteFile(file)" class="crm-hover-button">
14 <span class="icon delete-icon" title="{{ts('Delete attachment')}}"></span>
15 </a>
16 </td>
17 </tr>
18 <!-- Newly selected files -->
19 <!-- This is fairly minimal. For examples with progress-bars and file-sizes, see https://github.com/nervgh/angular-file-upload/blob/master/examples/simple/index.html -->
20 <tr ng-repeat="item in att.uploader.queue" ng-class="{nvReady: item.isReady, nvUploading:item.isUploading, nvUploaded:item.isUploaded,nvSuccess:item.isSuccess,nvCancel:item.isCancel,nvError:item.isError}">
21 <td class="filename filename-new">{{item.file.name}}</td>
22 <td>
23 <input ng-model="item.crmData.description" class="crm-form-text" placeholder="{{ts('Description')}}"/>
24 <!-- item.isReady item.isUploading item.isUploaded item.isSuccess item.isCancel item.isError -->
25 </td>
26 <td>
27 <a ng-click="item.remove()" class="crm-hover-button"><span class="icon close-icon" title="{{ts('Remove unsaved attachment')}}"></span></a>
28 </td>
29 </tr>
30 </tbody>
31 </table>
32
33 <!--
34 WISHLIST Improve styling of the 'Add file' / 'Browse' button
35 e.g. http://www.quirksmode.org/dom/inputfile.html
36 -->
37 <div>
38 {{ts('Add file:')}} <input type="file" nv-file-select uploader="att.uploader" multiple/><br/>
39 </div>
40 <div>
41 {{ts('Alternatively, you may add new files using drag/drop.')}}
42 </div>
43</div>