mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: adding line breaks in front-end for Descriptions.
BUGFIX: including appropriate hiding based on embargo/expiry
This commit is contained in:
parent
d207e8af34
commit
090c39c378
@ -494,6 +494,14 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
||||
return $filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Description field with HTML <br> tags added when there is a line break
|
||||
* @return string Description
|
||||
*/
|
||||
function getDescriptionWithLineBreaks() {
|
||||
return nl2br($this->getField('Description'));
|
||||
}
|
||||
|
||||
|
||||
function getCMSFields() {
|
||||
//include JS to handling showing and hiding of bottom "action" tabs
|
||||
|
@ -1,3 +1,4 @@
|
||||
<% if isHidden != true %>
|
||||
<div class="document $Extension">
|
||||
<% if Title %>
|
||||
<h4><a href="$Link" title="Download $Title">$Title</a></h4>
|
||||
@ -12,6 +13,7 @@
|
||||
| Last Changed: $LastChanged.Nice
|
||||
</p>
|
||||
<% if Description %>
|
||||
<p>$Description</p>
|
||||
<p>$DescriptionWithLineBreaks</p>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
Loading…
Reference in New Issue
Block a user