mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-09-28 20:29:04 +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;
|
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() {
|
function getCMSFields() {
|
||||||
//include JS to handling showing and hiding of bottom "action" tabs
|
//include JS to handling showing and hiding of bottom "action" tabs
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<% if isHidden != true %>
|
||||||
<div class="document $Extension">
|
<div class="document $Extension">
|
||||||
<% if Title %>
|
<% if Title %>
|
||||||
<h4><a href="$Link" title="Download $Title">$Title</a></h4>
|
<h4><a href="$Link" title="Download $Title">$Title</a></h4>
|
||||||
@ -12,6 +13,7 @@
|
|||||||
| Last Changed: $LastChanged.Nice
|
| Last Changed: $LastChanged.Nice
|
||||||
</p>
|
</p>
|
||||||
<% if Description %>
|
<% if Description %>
|
||||||
<p>$Description</p>
|
<p>$DescriptionWithLineBreaks</p>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
|
<% end_if %>
|
Loading…
Reference in New Issue
Block a user