Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -53,7 +53,8 @@ protected ResponseValues processRequest(VitroRequest vreq) throws InstantiationE
}*/
body.put("dataServiceUrlVClassesForVClassGroup", UrlBuilder.getUrl("/dataservice?getVClassesForVClassGroup=1&classgroupUri="));
body.put("geoFocusMapsEnabled", getGeoFocusMapsFlag(vreq));

body.put("title","Home");

return new TemplateResponseValues(BODY_TEMPLATE, body);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ private EditConfigurationVTwo setupEditConfiguration(String editConfGeneratorNam
String editKey = EditConfigurationUtils.getEditKey(vreq);
editConfig.setEditKey(editKey);

// Browser/tab title comes from EditConfigurationTemplateModel#getPageTitle:
// optional editConfig newResource "pageTitle" (set by a generator if needed),
// otherwise i18n key edit_page_title with optional subject name suffix.

//put edit configuration in session so it can be accessed on form submit.
EditConfigurationVTwo.putConfigInSession(editConfig, session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,20 @@ private String getSelectedValue(String field) {
}

public String getPageTitle() {
String title = editConfig.getNewResources().get("pageTitle");
if (title != null && !title.isEmpty()) {
return title;
}

String pageTitle = i18n.text("edit_page_title");
return pageTitle != null ? pageTitle : "Edit";
if (StringUtils.isBlank(pageTitle)) {
pageTitle = "Edit";
}
Individual subject = EditConfigurationUtils.getSubjectIndividual(vreq);
if (subject != null && StringUtils.isNotBlank(subject.getName())) {
pageTitle = pageTitle + " - " + subject.getName();
}
return pageTitle;
}

private void setFormTitle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3062,6 +3062,14 @@ uil-data:share_profile_uri.Vitro
uil:hasKey "share_profile_uri" ;
uil:hasPackage "Vitro-languages" .

uil-data:uri_input_label.Vitro
rdf:type owl:NamedIndividual ;
rdf:type uil:UILabel ;
rdfs:label "URI Link"@en-US ;
uil:hasApp "Vitro" ;
uil:hasKey "uri_input_label" ;
uil:hasPackage "Vitro-languages" .

uil-data:no_html_specified.Vitro
rdf:type owl:NamedIndividual ;
rdf:type uil:UILabel ;
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/main/webapp/js/individual/individualUriRdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(document).ready(function(){
{
querySelector: "span#iconControlsLeftSide > img#uriIcon",
data: {
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" title="'+ this.uriInputString +'" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
trigger: "click",
customClass: "vitroTooltip",
placements: ['top', 'right', 'bottom', 'left'],
Expand All @@ -18,7 +18,7 @@ $(document).ready(function(){
{
querySelector: "span#iconControlsVitro > img#uriIcon",
data: {
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" title="'+ this.uriInputString +'" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
trigger: "click",
customClass: "vitroTooltip",
placements: ['top', 'right', 'bottom', 'left'],
Expand All @@ -28,7 +28,7 @@ $(document).ready(function(){
{
querySelector: "span#iconControlsRightSide > img#uriIcon",
data: {
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
title: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" title="'+ this.uriInputString +'" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><div class="close-footer"><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a></div>',
trigger: "click",
customClass: "vitroTooltip",
placements: ['top', 'left', 'bottom', 'right'],
Expand Down
1 change: 1 addition & 0 deletions webapp/src/main/webapp/js/individual/moreLessController.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ $(document).ready(function(){
$itemContainer.hide();
$(this).attr('href', '#show more content');
$(this).text(i18nStrings.displayMoreEllipsis);
$(this).focus();
togglePropDisplay.showMore($toggleLink, $itemContainer);
return false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@
var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri?js_string}',
viewRDFProfile: '${i18n().view_profile_in_rdf?js_string}',
closeString: '${i18n().close?js_string}'
closeString: '${i18n().close?js_string}',
uriInputString: '${i18n().uri_input_label?js_string}'

};
var i18nStrings = {
displayLess: '${i18n().display_less?js_string}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<#assign groupNameHtmlId = "${i18n().properties}" >
</#if>
<#if tabCount = 1 >
<li class="selectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${groupName}</li>
<li class="selectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${p.capitalizeGroupName(groupName)}</li>
<li class="groupTabSpacer">&nbsp;</li>
<#assign tabCount = 2>
<#else>
<li class="nonSelectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${groupName}</li>
<li class="nonSelectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${p.capitalizeGroupName(groupName)}</li>
<li class="groupTabSpacer">&nbsp;</li>
</#if>
</#if>
Expand All @@ -50,7 +50,7 @@
<#if groupName?has_content>
<#--the function replaces spaces in the name with underscores, also called for the property group menu-->
<#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) >
<h2 id="${groupNameHtmlId?replace("/","-")}" pgroup="tabs" class="hidden">${groupName}</h2>
<h2 id="${groupNameHtmlId?replace("/","-")}" pgroup="tabs" class="hidden">${p.capitalizeGroupName(groupName)}</h2>
<#else>
<h2 id="properties" pgroup="tabs" class="hidden">${i18n().properties_capitalized}</h2>
</#if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ var customForm = {
// boolean controls whether the acSelector value gets cleared.

var clearAcSelectorVal = true;
let focus = null;

if ( $(selectedObj).attr('id') == "typeSelector" ) {
$acSelectionObj = customForm.acSelections[$(selectedObj).attr('acGroupName')];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,7 @@ name will be used as the label. -->
<#local groupName = groupName?replace("&", "-and-")>
<#return groupName>
</#function>

<#function capitalizeGroupName propertyGroupName>
<#return propertyGroupName?cap_first>
</#function>
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<#-- $This file is distributed under the terms of the license in LICENSE$ -->

<title>${(title?html)!siteName!}</title>
<#if title?? && title?has_content>
<title>${title?html} | ${siteName}</title>
<#else>
<title>${siteName}</title>
</#if>
Loading