Skip to content

Commit

Permalink
Wip
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjepard committed Nov 11, 2024
1 parent d282b88 commit 2f9653e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String getApplicationType() {

private void buildDetailedViewTemplatePanel(ColumnStatus columnConfiguration) {
templateToDetailedView = new ColumnTemplateOptions(messages.columnManagementLabelForTemplateDetail(),
ColumnOptionUtils.getDefaultTextOrValue(columnConfiguration.getSearchStatus().getList().getTemplate()), true);
ColumnOptionUtils.getDefaultTextOrValue(columnConfiguration.getDetailsStatus().getTemplateStatus()), true);

templateToDetailedView.addStyleNameToLabel("form-label");
templateToDetailedView.addStyleNameToTextBox("form-textbox");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
*/
package com.databasepreservation.common.client.common.visualization.browse.configuration.columns.helpers;

import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE;
import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE;

import com.databasepreservation.common.client.ClientConfigurationManager;
import com.databasepreservation.common.client.ViewerConstants;
import com.databasepreservation.common.client.models.status.collection.ColumnStatus;
import com.databasepreservation.common.client.models.status.collection.TableStatus;
import com.databasepreservation.common.client.models.status.collection.TemplateStatus;
import com.databasepreservation.common.client.tools.ViewerStringUtils;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;

import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE;

/**
* @author Miguel Guimarães <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
package com.databasepreservation.common.utils;

import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE;
import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE;
import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_VIEWER_DOWNLOAD_LABEL_TEMPLATE;

Expand Down Expand Up @@ -123,14 +124,17 @@ public static ColumnStatus getColumnStatus(ViewerColumn column, boolean show, in
if (column.getType() != null && (column.getType().getDbType().equals(ViewerType.dbTypes.BINARY)
|| column.getType().getDbType().equals(ViewerType.dbTypes.CLOB))) {
final TemplateStatus template = getTemplateStatus();
final TemplateStatus detailedTemplate = getTemplateStatus();
if (ViewerConfiguration.getInstance().getViewerConfigurationAsBoolean(false,
ViewerConfiguration.VIEWER_ENABLED)) {
template.setTemplate(DEFAULT_VIEWER_DOWNLOAD_LABEL_TEMPLATE);
detailedTemplate.setTemplate(DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE);
} else {
template.setTemplate(DEFAULT_DOWNLOAD_LABEL_TEMPLATE);
detailedTemplate.setTemplate(DEFAULT_DOWNLOAD_LABEL_TEMPLATE);
}
status.updateSearchListTemplate(template);
status.updateDetailsTemplate(template);
status.updateDetailsTemplate(detailedTemplate);
}

return status;
Expand Down

0 comments on commit 2f9653e

Please sign in to comment.