- SciPublications: PropertySheets in SciPublications enthalten jetzt alle Properties des jeweiligen Contenttyps
- BasicItemForm: Zwei neue Methoden eingeführt, die das Label für Titel und URL zurückgeben. Dies erlaubt es, die Bezeichnungen für diese Felder durch überschreiben der Felder an den Contenttyp anzupassen. Die Benzeichnung 'Titel der Seite' ist doch ein wenig verwirrend, z.B. bei einer Abteilung. - Zusätzlich Konfigurationseinstellung für das Forum: isPublic. Diese soll festlegen, ob ein Forum öffentlich sichtbar ist oder nicht. git-svn-id: https://svn.libreccm.org/ccm/trunk@719 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
657e7e423f
commit
9458a60164
|
|
@ -69,12 +69,12 @@ public class GenericOrganizationalUnitPropertyForm
|
|||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(
|
||||
/*add(new Label(
|
||||
(String) ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorganunit.name").localize()));
|
||||
ParameterModel nameParam = new StringParameter(NAME);
|
||||
TextField name = new TextField(nameParam);
|
||||
add(name);
|
||||
add(name);*/
|
||||
|
||||
add(new Label(
|
||||
(String) ContenttypesGlobalizationUtil.globalize(
|
||||
|
|
@ -101,7 +101,7 @@ public class GenericOrganizationalUnitPropertyForm
|
|||
(GenericOrganizationalUnit) super.
|
||||
initBasicWidgets(fse);
|
||||
|
||||
data.put(NAME, orgaunit.getName());
|
||||
//data.put(NAME, orgaunit.getName());
|
||||
data.put(ADDENDUM, orgaunit.getAddendum());
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ public class GenericOrganizationalUnitPropertyForm
|
|||
if ((orgaunit != null)
|
||||
&& getSaveCancelSection().getSaveButton().isSelected(fse.
|
||||
getPageState())) {
|
||||
orgaunit.setName((String) data.get(NAME));
|
||||
//orgaunit.setName((String) data.get(NAME));
|
||||
orgaunit.setAddendum((String) data.get(ADDENDUM));
|
||||
|
||||
orgaunit.save();
|
||||
|
|
|
|||
|
|
@ -58,12 +58,11 @@ import java.util.Collection;
|
|||
public abstract class BasicItemForm extends FormSection
|
||||
implements FormInitListener, FormProcessListener,
|
||||
FormValidationListener {
|
||||
private static final Logger s_log = Logger.getLogger(BasicItemForm.class);
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(BasicItemForm.class);
|
||||
private final ItemSelectionModel m_itemModel;
|
||||
private SaveCancelSection m_saveCancelSection;
|
||||
private FormSection m_widgetSection;
|
||||
|
||||
public static final String NAME = ContentItem.NAME;
|
||||
public static final String TITLE = ContentPage.TITLE;
|
||||
public static final String LANGUAGE = ContentItem.LANGUAGE;
|
||||
|
|
@ -125,10 +124,9 @@ public abstract class BasicItemForm extends FormSection
|
|||
m_saveCancelSection = new SaveCancelSection();
|
||||
super.add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||
}
|
||||
|
||||
private Label m_script = new Label("<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>", false);
|
||||
|
||||
|
||||
private Label m_script = new Label(
|
||||
"<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>",
|
||||
false);
|
||||
|
||||
/**
|
||||
* Add various widgets to the form. Child classes should override
|
||||
|
|
@ -149,28 +147,33 @@ public abstract class BasicItemForm extends FormSection
|
|||
// it breaks URLs & potentially overwrites the user's
|
||||
// customizations.
|
||||
|
||||
add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.page_title")));
|
||||
//jensp 2011-01-28: For some content types it is maybe useful to change
|
||||
//the label of this field to something other than 'title'. This can now
|
||||
//be done by overwriting the getTitleLabel() method.
|
||||
//add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.page_title")));
|
||||
add(new Label(getTitleLabel()));
|
||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " +
|
||||
" defaulting = true; this.form." + NAME +
|
||||
".value = urlize(this.value); }");
|
||||
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { "
|
||||
+ " defaulting = true; this.form." + NAME
|
||||
+ ".value = urlize(this.value); }");
|
||||
titleWidget.setOnKeyUp(
|
||||
"if (defaulting) { this.form." + NAME +
|
||||
".value = urlize(this.value) }"
|
||||
);
|
||||
"if (defaulting) { this.form." + NAME
|
||||
+ ".value = urlize(this.value) }");
|
||||
add(titleWidget);
|
||||
|
||||
add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.name_url")));
|
||||
//jensp 2011-01-28: For some content types it is maybe useful to change
|
||||
//the label of this field to something other than 'title'. This can now
|
||||
//be done by overwriting the getNameLabel() method.
|
||||
//add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.name_url")));
|
||||
add(new Label(getNameLabel()));
|
||||
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
||||
nameWidget.addValidationListener(new NameValidationListener());
|
||||
nameWidget.setOnFocus("defaulting = false");
|
||||
nameWidget.setOnBlur(
|
||||
"if (this.value == '') " +
|
||||
"{ defaulting = true; this.value = urlize(this.form." + TITLE +
|
||||
".value) } " +
|
||||
" else { this.value = urlize(this.value); }"
|
||||
);
|
||||
"if (this.value == '') "
|
||||
+ "{ defaulting = true; this.value = urlize(this.form." + TITLE
|
||||
+ ".value) } " + " else { this.value = urlize(this.value); }");
|
||||
add(nameWidget);
|
||||
|
||||
}
|
||||
|
|
@ -234,7 +237,8 @@ public abstract class BasicItemForm extends FormSection
|
|||
validateNameUniqueness(parent, event, newName);
|
||||
}
|
||||
|
||||
public void validateNameUniqueness(Folder parent, FormSectionEvent event, String newName)
|
||||
public void validateNameUniqueness(Folder parent, FormSectionEvent event,
|
||||
String newName)
|
||||
throws FormProcessException {
|
||||
if (newName != null) {
|
||||
final String query = "com.arsdigita.cms.validateUniqueItemName";
|
||||
|
|
@ -251,28 +255,27 @@ public abstract class BasicItemForm extends FormSection
|
|||
|
||||
ContentItem item = null;
|
||||
if (getItemSelectionModel() != null) {
|
||||
item = (ContentItem) getItemSelectionModel()
|
||||
.getSelectedObject(event.getPageState());
|
||||
item = (ContentItem) getItemSelectionModel().
|
||||
getSelectedObject(event.getPageState());
|
||||
}
|
||||
if (item == null) {
|
||||
// this means it is a creation form
|
||||
throw new FormProcessException
|
||||
("An item with this name already exists");
|
||||
throw new FormProcessException(
|
||||
"An item with this name already exists");
|
||||
}
|
||||
Collection list = getAllVersionIDs(item);
|
||||
while (dq.next()) {
|
||||
itemID = (BigDecimal) dq.get("itemID");
|
||||
if (!list.contains(itemID)) {
|
||||
dq.close();
|
||||
throw new FormProcessException
|
||||
("An item with this name already exists");
|
||||
throw new FormProcessException(
|
||||
"An item with this name already exists");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ensure that the name of an item is unique within a category. This
|
||||
* should only be called from the validation listener of an "edit" form.
|
||||
|
|
@ -288,10 +291,10 @@ public abstract class BasicItemForm extends FormSection
|
|||
BigDecimal id)
|
||||
throws FormProcessException {
|
||||
if (id == null) {
|
||||
s_log.warn("Trying to validation the name uniqueness without " +
|
||||
" a valid item is invalid. This method should only " +
|
||||
" be called in \"edit\" forms. The passed in id " +
|
||||
" was null.");
|
||||
s_log.warn("Trying to validation the name uniqueness without "
|
||||
+ " a valid item is invalid. This method should only "
|
||||
+ " be called in \"edit\" forms. The passed in id "
|
||||
+ " was null.");
|
||||
return;
|
||||
}
|
||||
// now we check to make sure that the new name is valid
|
||||
|
|
@ -302,8 +305,9 @@ public abstract class BasicItemForm extends FormSection
|
|||
if (url == null) {
|
||||
return;
|
||||
}
|
||||
DataQuery query = SessionManager.getSession().retrieveQuery
|
||||
("com.arsdigita.categorization.getAllItemURLsForCategoryFromItem");
|
||||
DataQuery query =
|
||||
SessionManager.getSession().retrieveQuery(
|
||||
"com.arsdigita.categorization.getAllItemURLsForCategoryFromItem");
|
||||
query.setParameter("itemID", id);
|
||||
query.addEqualsFilter("lower(url)", url.toLowerCase());
|
||||
if (query.size() > 0) {
|
||||
|
|
@ -312,18 +316,18 @@ public abstract class BasicItemForm extends FormSection
|
|||
BigDecimal itemID = null;
|
||||
|
||||
ContentItem item =
|
||||
(ContentItem) getItemSelectionModel()
|
||||
.getSelectedObject(event.getPageState());
|
||||
(ContentItem) getItemSelectionModel().getSelectedObject(event.
|
||||
getPageState());
|
||||
Collection list = getAllVersionIDs(item);
|
||||
try {
|
||||
while (query.next()) {
|
||||
itemID = (BigDecimal) query.get("itemID");
|
||||
if (!list.contains(itemID)) {
|
||||
StringBuffer buffer =
|
||||
new StringBuffer("There are conflicts with this URL. " +
|
||||
"Specifically, there is at least one item " +
|
||||
"in the same category as this item with " +
|
||||
"the name (url) of ");
|
||||
new StringBuffer("There are conflicts with this URL. "
|
||||
+ "Specifically, there is at least one item "
|
||||
+ "in the same category as this item with "
|
||||
+ "the name (url) of ");
|
||||
buffer.append(url);
|
||||
throw new FormProcessException(buffer.toString());
|
||||
}
|
||||
|
|
@ -374,4 +378,32 @@ public abstract class BasicItemForm extends FormSection
|
|||
public void add(Component pc, int constraints) {
|
||||
m_widgetSection.add(pc, constraints);
|
||||
}
|
||||
|
||||
/**
|
||||
* jensp, 2011-01-28
|
||||
* This method can be overridden to change the label of the title field.
|
||||
* To change to label of the title field can be useful for some
|
||||
* content types. For example, for an organization the label "Title" for
|
||||
* the field is may confusing for the normal user. For such a content type,
|
||||
* the label would be changed to something like "Name of the organization".
|
||||
*
|
||||
* @return (Content for the) Label for the title field as string
|
||||
*/
|
||||
protected String getTitleLabel() {
|
||||
return (String) GlobalizationUtil.globalize(
|
||||
"cms.ui.authoring.page_title").
|
||||
localize();
|
||||
}
|
||||
|
||||
/**
|
||||
* jensp, 2011-01-28
|
||||
* This method does the same as {@link #getTitleLabel() } for the label of
|
||||
* the name (URL) field.
|
||||
*
|
||||
* @return (Content for the) Label for the name field as string
|
||||
*/
|
||||
protected String getNameLabel() {
|
||||
return (String) GlobalizationUtil.globalize("cms.ui.authoring.name_url").
|
||||
localize();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ object type Forum extends Application {
|
|||
|
||||
Boolean [1..1] isModerated = forum_forums.is_moderated;
|
||||
Boolean [1..1] isNoticeboard = forum_forums.is_noticeboard;
|
||||
Boolean [1..1] isPublic = forum_forums.is_public;
|
||||
|
||||
component Group [0..1] adminGroup =
|
||||
join forum_forums.admin_group_id to groups.group_id;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public class Forum extends Application {
|
|||
private static final String POSTS = "posts";
|
||||
private static final String SUBSCRIPTIONS = "subscriptions";
|
||||
private static final String MODERATION = "isModerated";
|
||||
private static final String PUBLIC = "isPublic";
|
||||
private static final String NOTICEBOARD = "isNoticeboard";
|
||||
|
||||
private static final String ADMIN_GROUP = "adminGroup";
|
||||
|
|
@ -205,6 +206,7 @@ public class Forum extends Application {
|
|||
title, parent, true);
|
||||
|
||||
forum.setModerated(moderated);
|
||||
forum.setPublic(true);
|
||||
// default settings ensure legacy forum users do not
|
||||
// see any change chris.gilbert@westsussex.gov.uk
|
||||
forum.setAllowFileAttachments(false);
|
||||
|
|
@ -768,6 +770,16 @@ public class Forum extends Application {
|
|||
return isModerated.booleanValue();
|
||||
}
|
||||
|
||||
public boolean isPublic() {
|
||||
Boolean isPublic = (Boolean)get(PUBLIC);
|
||||
Assert.exists(isPublic);
|
||||
return isPublic.booleanValue();
|
||||
}
|
||||
|
||||
public void setPublic(boolean isPublic) {
|
||||
set(PUBLIC, new Boolean(isPublic));
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables/disables the noticeboard functionality.
|
||||
* If enabled, no replies will be allowed.
|
||||
|
|
|
|||
|
|
@ -56,18 +56,19 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class SetupView
|
||||
extends Form
|
||||
implements FormInitListener, FormSubmissionListener, FormProcessListener, Constants {
|
||||
private static final Logger s_log = Logger.getLogger(SetupView.class);
|
||||
implements FormInitListener, FormSubmissionListener, FormProcessListener,
|
||||
Constants {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(SetupView.class);
|
||||
// values for checkboxes
|
||||
private static final String MODERATED = "moderated";
|
||||
private static final String PUBLIC = "public";
|
||||
private static final String NOTICEBOARD = "noticeboard";
|
||||
private static final String ALLOW_FILES = "filesAllowed";
|
||||
private static final String ALLOW_IMAGES = "imagesallowed";
|
||||
private static final String AUTOSUBSCRIBE_THREAD_STARTERS = "autosubscribe";
|
||||
private static final String NO_CATEGORY_POSTS_ALLOWED = "nocategory";
|
||||
private static final String ANONYMOUS_POSTS_ALLOWED = "anonymous";
|
||||
|
||||
private CheckboxGroup m_settings;
|
||||
private TextField m_expiry;
|
||||
private SaveCancelSection m_saveCancel;
|
||||
|
|
@ -81,10 +82,14 @@ public class SetupView
|
|||
new Option(
|
||||
MODERATED,
|
||||
(String) Text.gz("forum.ui.settings.moderated").localize()));
|
||||
m_settings.addOption(
|
||||
new Option(PUBLIC,
|
||||
(String) Text.gz("forum.ui.settings.public").localize()));
|
||||
m_settings.addOption(
|
||||
new Option(
|
||||
NOTICEBOARD,
|
||||
(String) Text.gz("forum.ui.settings.noticeboard").localize()));
|
||||
(String) Text.gz("forum.ui.settings.noticeboard").
|
||||
localize()));
|
||||
m_settings.addOption(
|
||||
new Option(
|
||||
ALLOW_FILES,
|
||||
|
|
@ -96,35 +101,34 @@ public class SetupView
|
|||
m_settings.addOption(
|
||||
new Option(
|
||||
AUTOSUBSCRIBE_THREAD_STARTERS,
|
||||
(String) Text
|
||||
.gz("forum.ui.settings.autosubscribe")
|
||||
.localize()));
|
||||
(String) Text.gz("forum.ui.settings.autosubscribe").localize()));
|
||||
|
||||
m_settings.addOption(
|
||||
new Option(
|
||||
NO_CATEGORY_POSTS_ALLOWED,
|
||||
(String) Text
|
||||
.gz("forum.ui.settings.noCategoryPosts")
|
||||
.localize()));
|
||||
(String) Text.gz("forum.ui.settings.noCategoryPosts").localize()));
|
||||
m_settings.addOption(
|
||||
new Option(
|
||||
ANONYMOUS_POSTS_ALLOWED,
|
||||
(String) Text
|
||||
.gz("forum.ui.settings.anonymousPosts")
|
||||
.localize()));
|
||||
(String) Text.gz("forum.ui.settings.anonymousPosts").localize()));
|
||||
|
||||
|
||||
|
||||
m_expiry = new TextField(new IntegerParameter("expiry"));
|
||||
m_expiry.setMetaDataAttribute("label", (String)Text.gz("forum.ui.noticeboard.expiry_after").localize());
|
||||
m_expiry.setMetaDataAttribute("label", (String) Text.gz(
|
||||
"forum.ui.noticeboard.expiry_after").localize());
|
||||
m_saveCancel = new SaveCancelSection();
|
||||
m_saveCancel.getSaveButton().setButtonLabel(Text.gz("forum.ui.settings.save"));
|
||||
m_saveCancel.getSaveButton().setButtonLabel(Text.gz(
|
||||
"forum.ui.settings.save"));
|
||||
m_introduction = new TextArea("introduction", 8, 60, TextArea.SOFT);
|
||||
m_introduction.addValidationListener(new StringInRangeValidationListener(0, 4000, Text.gz("forum.ui.validation.introduction_too_long")));
|
||||
m_introduction.setMetaDataAttribute("label", (String)Text.gz("forum.ui.settings.introduction").localize());
|
||||
m_introduction.addValidationListener(new StringInRangeValidationListener(
|
||||
0, 4000, Text.gz("forum.ui.validation.introduction_too_long")));
|
||||
m_introduction.setMetaDataAttribute("label", (String) Text.gz(
|
||||
"forum.ui.settings.introduction").localize());
|
||||
|
||||
m_title = new TextField("title");
|
||||
m_title.setMetaDataAttribute("label", (String)Text.gz("forum.ui.settings.title").localize());
|
||||
m_title.setMetaDataAttribute("label", (String) Text.gz(
|
||||
"forum.ui.settings.title").localize());
|
||||
m_title.setSize(70);
|
||||
|
||||
add(m_title);
|
||||
|
|
@ -192,17 +196,22 @@ public class SetupView
|
|||
settings = Arrays.asList(settingsArray);
|
||||
}
|
||||
forum.setModerated(settings.contains(MODERATED));
|
||||
forum.setPublic(settings.contains(PUBLIC));
|
||||
forum.setNoticeboard(settings.contains(NOTICEBOARD));
|
||||
// could remove any existing files but i don't think that would be desirable
|
||||
forum.setAllowFileAttachments(settings.contains(ALLOW_FILES));
|
||||
forum.setAllowImageUploads(settings.contains(ALLOW_IMAGES));
|
||||
forum.setAutoSubscribeThreadCreator(settings.contains(AUTOSUBSCRIBE_THREAD_STARTERS));
|
||||
forum.setNoCategoryPostsAllowed(settings.contains(NO_CATEGORY_POSTS_ALLOWED));
|
||||
forum.setAnonymousPostsAllowed(settings.contains(ANONYMOUS_POSTS_ALLOWED));
|
||||
forum.setAutoSubscribeThreadCreator(settings.contains(
|
||||
AUTOSUBSCRIBE_THREAD_STARTERS));
|
||||
forum.setNoCategoryPostsAllowed(settings.contains(
|
||||
NO_CATEGORY_POSTS_ALLOWED));
|
||||
forum.setAnonymousPostsAllowed(
|
||||
settings.contains(ANONYMOUS_POSTS_ALLOWED));
|
||||
|
||||
forum.setTitle((String) m_title.getValue(state));
|
||||
forum.setIntroduction((String) m_introduction.getValue(state));
|
||||
Integer expiry = (m_expiry.getValue(state) == null) ? new Integer(0) : (Integer) m_expiry.getValue(state);
|
||||
Integer expiry = (m_expiry.getValue(state) == null) ? new Integer(0) : (Integer) m_expiry.
|
||||
getValue(state);
|
||||
int newExpiry = expiry.intValue();
|
||||
if (forum.getExpireAfter() != newExpiry) {
|
||||
forum.setExpireAfter(newExpiry);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class CollectedVolumePropertiesStep
|
|||
public static Component getCollectedVolumePropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep.
|
||||
getPublicationPropertySheet(itemModel);
|
||||
getPublicationWithPublisherPropertySheet(itemModel);
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class InternetArticlePropertiesStep extends PublicationPropertiesStep {
|
|||
getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getPublicationPropertySheet(itemModel));
|
||||
getInternetArticlePropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ package com.arsdigita.cms.contenttypes.ui;
|
|||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Journal;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
|
|
@ -45,6 +46,10 @@ public class JournalPropertiesStep extends PublicationPropertiesStep {
|
|||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||
getPublicationPropertySheet(itemModel);
|
||||
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.journal.issn"),
|
||||
Journal.ISSN);
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class ProceedingsPropertiesStep
|
|||
getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getPublicationPropertySheet(itemModel));
|
||||
getProceedingsPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ public class ProceedingsPropertyForm
|
|||
|
||||
@Override
|
||||
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||
|
||||
super.init(fse);
|
||||
|
||||
FormData data = fse.getFormData();
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ public class PublicationPropertyForm
|
|||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
/*add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.title").localize()));
|
||||
ParameterModel titleParam = new StringParameter(Publication.TITLE);
|
||||
TextField title = new TextField(titleParam);
|
||||
add(title);
|
||||
add(title);*/
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.year_of_publication").localize()));
|
||||
|
|
@ -102,7 +102,7 @@ public class PublicationPropertyForm
|
|||
FormData data = fse.getFormData();
|
||||
Publication publication = (Publication) super.initBasicWidgets(fse);
|
||||
|
||||
data.put(Publication.TITLE, publication.getTitle());
|
||||
//data.put(Publication.TITLE, publication.getTitle());
|
||||
data.put(Publication.YEAR_OF_PUBLICATION, publication.
|
||||
getYearOfPublication());
|
||||
data.put(Publication.ABSTRACT, publication.getAbstract());
|
||||
|
|
@ -116,13 +116,15 @@ public class PublicationPropertyForm
|
|||
|
||||
if ((publication != null) && getSaveCancelSection().getSaveButton().
|
||||
isSelected(fse.getPageState())) {
|
||||
publication.setTitle((String) data.get(Publication.TITLE));
|
||||
//publication.setTitle((String) data.get(Publication.TITLE));
|
||||
publication.setYearOfPublication((Integer) data.get(
|
||||
Publication.YEAR_OF_PUBLICATION));
|
||||
publication.setAbstract((String) data.get(Publication.ABSTRACT));
|
||||
publication.setMisc((String) data.get(Publication.MISC));
|
||||
|
||||
publication.save();
|
||||
|
||||
init(fse);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -133,4 +135,10 @@ public class PublicationPropertyForm
|
|||
m_step.cancelStreamlinedCreation(fse.getPageState());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTitleLabel() {
|
||||
return (String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publication.title").localize();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ publications.ui.inproceedings.number_of_pages=Number of pages
|
|||
publications.ui.inproceedings.number_of_volumes=Number of volumes
|
||||
publications.ui.inproceedings.organizer_of_conference=Organizer of conference
|
||||
publications.ui.inproceedings.pages_from=First page
|
||||
publications.ui.inproceedings.pages_from=Last page
|
||||
publications.ui.inproceedings.pages_from=Pages to
|
||||
publications.ui.inproceedings.place_of_conference=Place of conference
|
||||
publications.ui.inproceedings.volume=Volume
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ publications.ui.series.volumes.remove=Remove volume
|
|||
publications.ui.series.volumes.remove.confirm=Really remove this volume?
|
||||
publications.ui.series.volumes.volume_of_series=Volume of series
|
||||
sciauthor.ui.edit_basic_properties=Basic properties
|
||||
publications.ui.inproceedings.pages_to=Pages to
|
||||
publications.ui.inproceedings.pages_to=Pages from
|
||||
publications.ui.internetarticle.issn=ISSN
|
||||
publications.ui.internetarticle.publication_date=Date of publication
|
||||
publications.ui.proceedings.add_paper=Add paper
|
||||
|
|
@ -270,3 +270,4 @@ publications.ui.inProceedings.selectProceedings=Selected proceedings
|
|||
publications.ui.inProceedings.proceedings.none=Not associated with a procedings publication yet
|
||||
publications.ui.inProceedings.proceedings.remove=Remove this association
|
||||
publications.ui.inProceedings.proceedings.confirm_remove=Do really want to remove this association
|
||||
publications.ui.series.name=Name (URL)
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ publications.ui.inproceedings.number_of_pages=Anzahl der Seiten
|
|||
publications.ui.inproceedings.number_of_volumes=Anzahl der B\u00e4nde
|
||||
publications.ui.inproceedings.organizer_of_conference=Veranstalter der Konferenz
|
||||
publications.ui.inproceedings.pages_from=Erste Seite
|
||||
publications.ui.inproceedings.pages_from=Letzte Seite
|
||||
publications.ui.inproceedings.pages_from=Seiten bis
|
||||
publications.ui.inproceedings.place_of_conference=Veranstaltungsort
|
||||
publications.ui.inproceedings.volume=Band
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ publications.ui.authors.selectAuthor=Autor ausw\u00e4hlen
|
|||
#=========
|
||||
publications.ui.publisher.basic_properties=Basiseigenschaften
|
||||
publications.ui.publisher.edit_basic_properties=Basiseigenschaften bearbeiten
|
||||
publications.ui.publisher.place=Erscheinungsort
|
||||
publications.ui.publisher.place=Sitz des Verlages
|
||||
|
||||
#Series
|
||||
#======
|
||||
|
|
@ -206,7 +206,7 @@ publications.ui.series.volumes.remove=Band entfernen.
|
|||
publications.ui.series.volumes.remove.confirm=Diesen Band wirklich entfernen
|
||||
publications.ui.series.volumes.volume_of_series=Band der Serie
|
||||
sciauthor.ui.edit_basic_properties=Basiseigenschaften
|
||||
publications.ui.inproceedings.pages_to=Seiten bis
|
||||
publications.ui.inproceedings.pages_to=Seiten von
|
||||
publications.ui.internetarticle.issn=ISSN
|
||||
publications.ui.internetarticle.publication_date=Publikationsdatum
|
||||
publications.ui.proceedings.add_paper=Beitrag hinzuf\u00fcgen
|
||||
|
|
@ -269,3 +269,4 @@ publications.ui.inProceedings.selectProceedings=Tagungsband ausw\u00e4hlen
|
|||
publications.ui.inProceedings.proceedings.none=Derzeit mit keinem Tagungsband verkn\u00fcpft
|
||||
publications.ui.inProceedings.proceedings.remove=Verkn\u00fcpfung entfernen
|
||||
publications.ui.inProceedings.proceedings.confirm_remove=Wollen Sie diese Verkn\u00fcpfung wirklich entfernen
|
||||
publications.ui.series.name=Name (URL)
|
||||
|
|
|
|||
|
|
@ -19,12 +19,15 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Publisher;
|
||||
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.toolbox.ui.DomainObjectPropertySheet;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -38,6 +41,18 @@ public class PublisherPropertiesStep
|
|||
super(itemModel, parent);
|
||||
}
|
||||
|
||||
public static Component getPublisherPropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getGenericOrganizationalUnitPropertySheet(
|
||||
itemModel);
|
||||
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.publisher.place"),
|
||||
Publisher.PLACE);
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||
AuthoringKitWizard parent) {
|
||||
|
|
@ -55,7 +70,7 @@ public class PublisherPropertiesStep
|
|||
getCancelButton());
|
||||
|
||||
basicProperties.setDisplayComponent(
|
||||
getGenericOrganizationalUnitPropertySheet(itemModel));
|
||||
getPublisherPropertySheet(itemModel));
|
||||
|
||||
getSegmentedPanel().addSegment(
|
||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
|||
|
||||
public static Component getReviewPropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||
getPublicationPropertySheet(itemModel);
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) ArticleInJournalPropertiesStep.
|
||||
getArticleInJournalPropertySheet(itemModel);
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
|||
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.authoring.WorkflowLockedComponentAccess;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||
import java.text.DateFormat;
|
||||
|
|
@ -64,8 +64,12 @@ public class SeriesPropertiesStep extends SimpleEditStep {
|
|||
itemModel);
|
||||
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.title"),
|
||||
"publications.ui.series.name"),
|
||||
Series.NAME);
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.title"),
|
||||
Series.TITLE);
|
||||
|
||||
|
||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
|
|
|
|||
|
|
@ -21,14 +21,10 @@ package com.arsdigita.cms.contenttypes.ui;
|
|||
|
||||
import com.arsdigita.bebop.FormData;
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.Label;
|
||||
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.form.TextField;
|
||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Series;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
|
|
@ -64,11 +60,11 @@ public class SeriesPropertyForm
|
|||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
/*add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.title").localize()));
|
||||
ParameterModel titleParam = new StringParameter(Series.NAME);
|
||||
TextField title = new TextField(titleParam);
|
||||
add(title);
|
||||
add(title);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -76,7 +72,7 @@ public class SeriesPropertyForm
|
|||
FormData data = fse.getFormData();
|
||||
Series series = (Series) super.initBasicWidgets(fse);
|
||||
|
||||
data.put(Series.NAME, series.getTitle());
|
||||
//data.put(Series.NAME, series.getTitle());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -86,9 +82,9 @@ public class SeriesPropertyForm
|
|||
|
||||
if ((series != null) && getSaveCancelSection().getSaveButton().
|
||||
isSelected(fse.getPageState())) {
|
||||
series.setTitle((String) data.get(Series.NAME));
|
||||
/*series.setTitle((String) data.get(Series.NAME));
|
||||
|
||||
series.save();
|
||||
series.save();*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -99,4 +95,10 @@ public class SeriesPropertyForm
|
|||
m_step.cancelStreamlinedCreation(fse.getPageState());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTitleLabel() {
|
||||
return (String) PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.series.title").localize();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue