BUGFIX: adding line breaks in front-end for Descriptions.

BUGFIX: including appropriate hiding based on embargo/expiry
This commit is contained in:
Julian Seidenberg 2012-11-13 10:42:43 +13:00
parent d207e8af34
commit 090c39c378
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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>
</div>
<% end_if %>