mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
FEATURE: add Documents.ss and Document.ss default templates which could be included in associated Page template
This commit is contained in:
parent
f933e1a335
commit
c08555479c
26
templates/Includes/Document.ss
Normal file
26
templates/Includes/Document.ss
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="document $File.ClassByExtension <% if ClassName = DocumentTextLabel %>documentLabel<% end_if %>">
|
||||
<a class="full-link" <% if ClassName = Document %>href="$Link"<% end_if %> title="Download $File.Name"></a>
|
||||
<% if Title %>
|
||||
<h4><a href="$Link" title="Download $File.Name">$Title</a></h4>
|
||||
<% else %>
|
||||
<h4><a href="$Link" title="Download $File.Name">$File.Name</a></h4>
|
||||
<% end_if %>
|
||||
<% if ClassName = Document %>
|
||||
<p class='details'>
|
||||
<strong>$File.Name</strong>
|
||||
| $File.Extension
|
||||
| $File.Size
|
||||
| Modified: <% control File.Document %> $LastEdited.Nice <% end_control %>
|
||||
</p>
|
||||
<% if Description %>
|
||||
<p>$Description</p>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% if ClassName = DocumentTextLabel %>
|
||||
<p class='details'>
|
||||
<% if Description %>
|
||||
<strong>$Description</strong>
|
||||
<% end_if %>
|
||||
</p>
|
||||
<% end_if %>
|
||||
</div>
|
5
templates/Includes/Documents.ss
Normal file
5
templates/Includes/Documents.ss
Normal file
@ -0,0 +1,5 @@
|
||||
<% if Documents %>
|
||||
<div><h3>Documents:</h3></div>
|
||||
<% control Documents %><% include Document %><% end_control %>
|
||||
</div>
|
||||
<% end_if %>
|
Loading…
Reference in New Issue
Block a user