Forms for Review publication type
parent
77deea649a
commit
c9ed92fd1c
|
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class ReviewController {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
|
import org.scientificcms.publications.SciPublicationsConstants;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
||||||
|
|
||||||
|
private final StringParameter selectedLangParam;
|
||||||
|
|
||||||
|
public ReviewPropertiesStep(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final AuthoringKitWizard parent,
|
||||||
|
final StringParameter selectedLangParam
|
||||||
|
) {
|
||||||
|
super(itemModel, parent, selectedLangParam);
|
||||||
|
this.selectedLangParam = selectedLangParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component getReviewPropertySheet(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final StringParameter selectedLangParam
|
||||||
|
) {
|
||||||
|
final DomainObjectPropertySheet sheet
|
||||||
|
= (DomainObjectPropertySheet) ArticleInJournalPropertiesStep
|
||||||
|
.getArticleInJournalPropertySheet(itemModel, selectedLangParam);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addBasicProperties(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final AuthoringKitWizard parent
|
||||||
|
) {
|
||||||
|
final SimpleEditStep basicProperties = new SimpleEditStep(
|
||||||
|
itemModel,
|
||||||
|
parent,
|
||||||
|
selectedLangParam,
|
||||||
|
EDIT_SHEET_NAME
|
||||||
|
);
|
||||||
|
|
||||||
|
BasicPageForm editBasicSheet = new ReviewPropertyForm(
|
||||||
|
itemModel, this, selectedLangParam
|
||||||
|
);
|
||||||
|
|
||||||
|
basicProperties.add(
|
||||||
|
EDIT_SHEET_NAME,
|
||||||
|
new GlobalizedMessage(
|
||||||
|
"publications.ui.review.edit_basic_sheet",
|
||||||
|
SciPublicationsConstants.BUNDLE
|
||||||
|
),
|
||||||
|
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
|
||||||
|
editBasicSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
basicProperties.setDisplayComponent(
|
||||||
|
getReviewPropertySheet(itemModel, selectedLangParam)
|
||||||
|
);
|
||||||
|
|
||||||
|
getSegmentedPanel().addSegment(
|
||||||
|
new Label(
|
||||||
|
new GlobalizedMessage(
|
||||||
|
"publications.ui.publication.basic_properties",
|
||||||
|
SciPublicationsConstants.BUNDLE
|
||||||
|
)
|
||||||
|
),
|
||||||
|
basicProperties
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class ReviewPropertyForm extends ArticleInJournalPropertyForm
|
||||||
|
implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
||||||
|
|
||||||
|
public static final String ID = "ReviewEdit";
|
||||||
|
|
||||||
|
private ReviewPropertiesStep step;
|
||||||
|
|
||||||
|
public ReviewPropertyForm(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final StringParameter selectedLangParam
|
||||||
|
) {
|
||||||
|
this(itemModel, null, selectedLangParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReviewPropertyForm(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final ReviewPropertiesStep step,
|
||||||
|
final StringParameter selectedLangParam
|
||||||
|
) {
|
||||||
|
super(itemModel, step, selectedLangParam);
|
||||||
|
this.step = step;
|
||||||
|
addSubmissionListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addWidgets() {
|
||||||
|
super.addWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(final FormSectionEvent event) throws FormProcessException {
|
||||||
|
super.init(event);
|
||||||
|
|
||||||
|
final PageState state = event.getPageState();
|
||||||
|
getReviewed().setVisible(state, false);
|
||||||
|
|
||||||
|
// FormData data = fse.getFormData();
|
||||||
|
// Review review = (Review) initBasicWidgets(fse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process(final FormSectionEvent event)
|
||||||
|
throws FormProcessException {
|
||||||
|
super.process(event);
|
||||||
|
|
||||||
|
// FormData data = fse.getFormData();
|
||||||
|
// Review review = (Review) processBasicWidgets(fse);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue