Begutachtet (Reviewed-Feld) bei Publikationstyp Rezension (Review) ausgeblendet
git-svn-id: https://svn.libreccm.org/ccm/trunk@1902 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4cd1272548
commit
b2e919763c
|
|
@ -54,6 +54,7 @@ public class ArticleInJournalPropertyForm
|
||||||
private static final String REVIEWED = "reviewed";
|
private static final String REVIEWED = "reviewed";
|
||||||
private ArticleInJournalPropertiesStep m_step;
|
private ArticleInJournalPropertiesStep m_step;
|
||||||
public static final String ID = "ArticleInJournalEdit";
|
public static final String ID = "ArticleInJournalEdit";
|
||||||
|
private Label reviewedLabel;
|
||||||
private CheckboxGroup reviewed;
|
private CheckboxGroup reviewed;
|
||||||
|
|
||||||
public ArticleInJournalPropertyForm(ItemSelectionModel itemModel) {
|
public ArticleInJournalPropertyForm(ItemSelectionModel itemModel) {
|
||||||
|
|
@ -112,13 +113,22 @@ public class ArticleInJournalPropertyForm
|
||||||
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
||||||
add(pubDate);
|
add(pubDate);
|
||||||
|
|
||||||
add(new Label(PublicationGlobalizationUtil.globalize(
|
reviewedLabel = new Label(PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.articleinjournal.reviewed")));
|
"publications.ui.articleinjournal.reviewed"));
|
||||||
|
add(reviewedLabel);
|
||||||
reviewed = new CheckboxGroup("reviewedGroup");
|
reviewed = new CheckboxGroup("reviewedGroup");
|
||||||
reviewed.addOption(new Option(REVIEWED, ""));
|
reviewed.addOption(new Option(REVIEWED, ""));
|
||||||
add(reviewed);
|
add(reviewed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected final Label getReviewedLabel() {
|
||||||
|
return reviewedLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final CheckboxGroup getReviewed() {
|
||||||
|
return reviewed;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(FormSectionEvent fse) throws FormProcessException {
|
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||||
super.init(fse);
|
super.init(fse);
|
||||||
|
|
@ -167,4 +177,5 @@ public class ArticleInJournalPropertyForm
|
||||||
article.save();
|
article.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,17 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.ArticleInJournal;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -41,8 +46,45 @@ public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
||||||
|
|
||||||
public static Component getReviewPropertySheet(
|
public static Component getReviewPropertySheet(
|
||||||
ItemSelectionModel itemModel) {
|
ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) ArticleInJournalPropertiesStep.
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
getArticleInJournalPropertySheet(itemModel);
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.volume"),
|
||||||
|
ArticleInJournal.VOLUME);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.issue"),
|
||||||
|
ArticleInJournal.ISSUE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.pages_from"),
|
||||||
|
ArticleInJournal.PAGES_FROM);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.pages_to"),
|
||||||
|
ArticleInJournal.PAGES_TO);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.publication_date"),
|
||||||
|
ArticleInJournal.PUBLICATION_DATE,
|
||||||
|
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||||
|
public String format(DomainObject obj,
|
||||||
|
String attribute,
|
||||||
|
PageState state) {
|
||||||
|
|
||||||
|
ArticleInJournal article = (ArticleInJournal) obj;
|
||||||
|
|
||||||
|
if (article.getPublicationDate() != null) {
|
||||||
|
return DateFormat.getDateInstance(DateFormat.LONG).format(
|
||||||
|
article.getPublicationDate());
|
||||||
|
} else {
|
||||||
|
return (String) ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.ui.unknown").localize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
@ -73,4 +115,5 @@ public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
||||||
"publications.ui.publication.basic_properties").
|
"publications.ui.publication.basic_properties").
|
||||||
localize()), basicProperties);
|
localize()), basicProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
import com.arsdigita.bebop.FormData;
|
import com.arsdigita.bebop.FormData;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.bebop.event.FormInitListener;
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormProcessListener;
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
|
|
@ -70,15 +71,19 @@ public class ReviewPropertyForm
|
||||||
public void init(FormSectionEvent fse) throws FormProcessException {
|
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||||
super.init(fse);
|
super.init(fse);
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
final PageState state = fse.getPageState();
|
||||||
Review review = (Review) initBasicWidgets(fse);
|
getReviewedLabel().setVisible(state, false);
|
||||||
|
getReviewed().setVisible(state, false);
|
||||||
|
|
||||||
|
// FormData data = fse.getFormData();
|
||||||
|
// Review review = (Review) initBasicWidgets(fse);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(FormSectionEvent fse) throws FormProcessException {
|
public void process(FormSectionEvent fse) throws FormProcessException {
|
||||||
super.process(fse);
|
super.process(fse);
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
// FormData data = fse.getFormData();
|
||||||
Review review = (Review) processBasicWidgets(fse);
|
// Review review = (Review) processBasicWidgets(fse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue