Improved the Moderation Enabled Flag

This commit is contained in:
Francesco Mangiacrapa 2023-03-02 16:52:59 +01:00
parent b8dc526855
commit 6b320cb216
3 changed files with 34 additions and 21 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -40,7 +41,8 @@
<wb-module deploy-name="gcube-ckan-datacatalog-2.2.5-SNAPSHOT">
@ -81,7 +83,8 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -122,7 +125,8 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -163,7 +167,8 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -204,13 +209,11 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="catalogue-util-library-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/catalogue-util-library/catalogue-util-library">
<dependent-module archiveName="storagehub-client-wrapper-1.2.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-client-wrapper/storagehub-client-wrapper">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ckan-content-moderator-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-content-moderator-widget/ckan-content-moderator-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -251,7 +254,8 @@
<property name="context-root" value="gcube-ckan-datacatalog"/>
@ -292,7 +296,8 @@
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
@ -333,7 +338,8 @@
</wb-module>

View File

@ -19,6 +19,7 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesE
import com.github.gwtbootstrap.client.ui.Alert;
import com.github.gwtbootstrap.client.ui.AlertBlock;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.Label;
import com.github.gwtbootstrap.client.ui.constants.AlertType;
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
import com.github.gwtbootstrap.client.ui.constants.IconType;
@ -41,7 +42,7 @@ import com.google.gwt.user.client.ui.InlineHTML;
*/
public class CkanMetadataManagementPanel extends FlowPanel {
private static final String MESSAGE_MODERATED_CATALOGUE = "Controlled Catalogue";
private static final String MESSAGE_MODERATED_CATALOGUE = "Moderation Enabled";
public static final String CATALOGUE_ITEMS_WERE_APPROVED_BY_CATALOGUE_MODERATOR_S = "Catalogue items were approved by Catalogue Moderator(s).";
@ -83,7 +84,7 @@ public class CkanMetadataManagementPanel extends FlowPanel {
private Button manageGRSFProduct = new Button("Manage GRSF Item"); // GRSF Manage
private Button manageCModS = new Button("Manage Items"); // Moderation
private Alert messageModerationEnanbled = new Alert(MESSAGE_MODERATED_CATALOGUE); // Moderation message
private Label messageModerationEnanbled = new Label(); // Moderation message
private HandlerManager eventBus;
@ -120,11 +121,12 @@ public class CkanMetadataManagementPanel extends FlowPanel {
manageCModS.setType(ButtonType.PRIMARY);
manageCModS.getElement().getStyle().setFloat(Float.RIGHT);
manageCModS.getElement().getStyle().setMarginRight(20, Unit.PX);
messageModerationEnanbled.setType(AlertType.INFO);
messageModerationEnanbled.setClose(false);
//messageModerationEnanbled.addStyleName("moderation-message");
messageModerationEnanbled.getElement().getStyle().setTextAlign(TextAlign.CENTER);
messageModerationEnanbled.setTitle(CATALOGUE_ITEMS_WERE_APPROVED_BY_CATALOGUE_MODERATOR_S);
// messageModerationEnanbled.setType(AlertType.INFO);
// messageModerationEnanbled.setClose(false);
// messageModerationEnanbled.addStyleName("moderation-message");
messageModerationEnanbled.setTitle(MESSAGE_MODERATED_CATALOGUE);
messageModerationEnanbled.getElement().setInnerHTML("<i class='icon-user'></i> " + MESSAGE_MODERATED_CATALOGUE);
messageModerationEnanbled.addStyleName("moderation-enabled-flag");
// set icons
home.setIcon(IconType.HOME);
@ -399,7 +401,6 @@ public class CkanMetadataManagementPanel extends FlowPanel {
manageCModS.setVisible(value);
}
/**
* Show message catalogue is moderated.
*

View File

@ -157,4 +157,10 @@ h1 {
.modal-content-moderator .modal-body {
min-height: 720px;
}
.moderation-enabled-flag {
float: right;
margin-right: 10px;
padding: 8px 4px !important;
}