Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Feature Request
File metadata description will now support html in JSF UI. Is already supported in SPA.
Comment thread
pdurbin marked this conversation as resolved.
2 changes: 1 addition & 1 deletion src/main/webapp/editFilesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
<label class="control-label" for="fileDescription" style="margin-right:1em; margin-top:.5em; vertical-align:top;">
#{bundle.description}
</label>
<p:inputTextarea id="fileDescription" rows="2" cols="40" value="#{fileMetadata.description}" style="width:60%; margin-top:.5em;"/>
<p:inputTextarea id="fileDescription" rows="2" cols="40" value="#{fileMetadata.description}" escape="false" style="width:60%; margin-top:.5em;"/>
<p:watermark for="fileDescription" value="#{bundle['file.addDescription']}"/>
<p:message for="fileDescription"/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/file-info-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</div>
</div>
<div class="fileDescription small" jsf:rendered="#{hasDescription}">
<h:outputText id="fileDescNonEmpty" value="#{fileMetadata.description}"/>
<h:outputText id="fileDescNonEmpty" value="#{MarkupChecker:sanitizeBasicHTML(fileMetadata.description)}" escape="false"/>
</div>
<div class="file-tags-block" jsf:rendered="#{hasCategories or hasTags}">
<ui:repeat value="#{fileMetadata.categories}" var="cat">
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/file.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@
<th scope="row">
#{bundle['file.metadataTab.fileMetadata.description.label']}
</th>
<td>#{FilePage.fileMetadata.description}</td>
<td><h:outputFormat value="#{MarkupChecker:sanitizeBasicHTML(FilePage.fileMetadata.description)}" escape="false"></h:outputFormat></td>
</tr>
</tbody>
</table>
Expand Down
22 changes: 11 additions & 11 deletions src/main/webapp/search-include-fragment.xhtml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:o="http://omnifaces.org/ui"
xmlns:of="http://omnifaces.org/functions"
xmlns:jsf="http://xmlns.jcp.org/jsf">
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:o="http://omnifaces.org/ui"
xmlns:of="http://omnifaces.org/functions"
xmlns:jsf="http://xmlns.jcp.org/jsf" xmlns:Strings="http://omnifaces.org/functions">
Comment thread
stevenwinship marked this conversation as resolved.
Outdated

<c:set var="page" value="/dataverse/#{DataversePage.dataverse.alias}"/>
<c:set var="cvocConf" value="#{settingsWrapper.getCVocConf(true)}"/>
Expand Down Expand Up @@ -539,7 +539,7 @@

<hr style="margin:.5em;border:0;"/>

<h:outputText value="#{Strings:abbreviate(result.descriptionNoSnippet, descriptionAbbreviationThreshold)}" rendered="#{result.descriptionSnippets.size() eq 0}"/>
<h:outputText value="#{Strings:abbreviate(MarkupChecker:sanitizeBasicHTML(result.descriptionNoSnippet), descriptionAbbreviationThreshold)}" escape="false" rendered="#{result.descriptionSnippets.size() eq 0}"/>

<ui:repeat value="#{result.descriptionSnippets}" var="snippet" varStatus="varStatus"
rendered="#{result.descriptionSnippets.size() gt 0}">
Expand Down Expand Up @@ -607,7 +607,7 @@
<h:outputText value="#{result.citationHtml != null ? result.citationHtml : result.citation}" escape="false"/>
</div>

<h:outputText value="#{Strings:abbreviate(result.descriptionNoSnippet, descriptionAbbreviationThreshold)}" rendered="#{result.descriptionSnippets.size() eq 0}"/>
<h:outputText value="#{Strings:abbreviate(MarkupChecker:sanitizeBasicHTML(result.descriptionNoSnippet), descriptionAbbreviationThreshold)}" escape="false" rendered="#{result.descriptionSnippets.size() eq 0}"/>

<ui:repeat value="#{result.descriptionSnippets}" var="snippet" varStatus="varStatus"
rendered="#{result.descriptionSnippets.size() gt 0}">
Expand Down Expand Up @@ -721,7 +721,7 @@
</ui:repeat>
</div>

<h:outputText value="#{Strings:abbreviate(result.descriptionNoSnippet, descriptionAbbreviationThreshold)}" rendered="#{result.descriptionSnippets.size() eq 0}"/>
<h:outputText value="#{Strings:abbreviate(MarkupChecker:sanitizeBasicHTML(result.descriptionNoSnippet), descriptionAbbreviationThreshold)}" escape="false" rendered="#{result.descriptionSnippets.size() eq 0}"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, we want the search card to not have a clickable link, just like the collection card and dataset card.


<ui:repeat value="#{result.descriptionSnippets}" var="snippet" varStatus="varStatus"
rendered="#{result.descriptionSnippets.size() gt 0}">
Comment thread
stevenwinship marked this conversation as resolved.
Expand Down