mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
e4bc553521
* Add 2.0.0 changelog * Update DMSInterface and DMSDocumentInterface removing *page and adding getDocumentSetsByPage to DMSInterface * Update use documentation and update unit tests This commit changes the relationship from Pages has_many Documents to Pages has_many DocumentSets which are many_many to Documents. The upload field has been upated to attach documents to a set instead of a page, the tests updated and the DMSInterface and DMSDocumentInterface updated to be less relevant to pages and more relevant to document sets.
53 lines
2.1 KiB
Scheme
53 lines
2.1 KiB
Scheme
<ul class="ss-uploadfield-files files">
|
|
<% if $Items %>
|
|
<% loop $Items %>
|
|
<li class="ss-uploadfield-item template-download" data-fileid="$ID">
|
|
<div class="ss-uploadfield-item-preview preview"><span>
|
|
<img alt="$hasRelation" src="$UploadFieldThumbnailURL" />
|
|
</span></div>
|
|
<div class="ss-uploadfield-item-info">
|
|
<label class="ss-uploadfield-item-name">
|
|
<b>{$Title}.{$Extension}</b>
|
|
<span>$Size</span>
|
|
<div class="clear"><!-- --></div>
|
|
</label>
|
|
<div class="ss-uploadfield-item-actions">
|
|
<% if $Top.isDisabled || $Top.isReadonly %>
|
|
<% else %>
|
|
$UploadFieldFileButtons
|
|
<% end_if %>
|
|
</div>
|
|
</div>
|
|
<div class="ss-uploadfield-item-editform loading includeParent">
|
|
<iframe frameborder="0" src="$UploadFieldEditLink"></iframe>
|
|
</div>
|
|
</li>
|
|
<% end_loop %>
|
|
<% end_if %>
|
|
</ul>
|
|
<% if $isDisabled || $isReadonly %>
|
|
<% if $isSaveable %>
|
|
<% else %>
|
|
<div class="ss-uploadfield-item">
|
|
<em><%t FileIFrameField.ATTACHONCESAVED2 "Files can be attached once you have saved the record for the first time." %></em>
|
|
</div>
|
|
<% end_if %>
|
|
<% else %>
|
|
<div class="ss-uploadfield-item ss-uploadfield-addfile<% if $Items && $displayInput %> borderTop<% end_if %>" <% if not $displayInput %>style="display: none;"<% end_if %>>
|
|
<div class="ss-uploadfield-item-preview ss-uploadfield-dropzone ui-corner-all">
|
|
<% _t('UploadField.DROPFILE', 'drop a file') %>
|
|
</div>
|
|
<div class="ss-uploadfield-item-info">
|
|
<label class="ss-uploadfield-item-name"><b>
|
|
<% _t('UploadField.ATTACHFILE', 'Attach a file') %>
|
|
</b></label>
|
|
<label class="ss-uploadfield-fromcomputer ss-ui-button ui-corner-all" title="<%t UploadField.FROMCOMPUTERINFO 'Upload from your computer' %>" data-icon="drive-upload">
|
|
<%t UploadField.FROMCOMPUTER 'From your computer' %>
|
|
<input id="$id" name="$getName" class="$extraClass ss-uploadfield-fromcomputer-fileinput" data-config="$configString" type="file"<% if $multiple %> multiple="multiple"<% end_if %> />
|
|
</label>
|
|
<div class="clear"><!-- --></div>
|
|
</div>
|
|
<div class="clear"><!-- --></div>
|
|
</div>
|
|
<% end_if %>
|