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

@ -18,6 +18,7 @@
@ -59,6 +60,7 @@
@ -100,6 +102,7 @@
@ -141,6 +144,7 @@
@ -182,6 +186,7 @@
@ -204,10 +209,7 @@
<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">
<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">
<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>
@ -229,6 +231,7 @@
@ -270,6 +273,7 @@
@ -311,6 +315,7 @@
@ -353,6 +358,7 @@

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

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