Project

General

Profile

Revision 22daad3e

ID22daad3e3e3b9eed49f1532d771ec76fee86dfef
Parent 9e01ec16
Child 9be67535

Added by Patrick Plitzner 11 months ago

ref #7679 Change order of UI elements

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
134 134
		    textNewTaxonName = formFactory.createTextWithLabelElement(formElement,"Taxon", "", style);
135 135

  
136 136
		}
137
		if (entity instanceof TaxonNode) {
138
		    checkbox_publish = formFactory.createCheckbox(formElement,
139
		            "Taxon is public", ((TaxonNode)entity).getTaxon().isPublish(), style);
140

  
141
		    if(isCreateNew()){
142
		        CdmPreference defaultPublish = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag);
143
		        if (defaultPublish != null && defaultPublish.getValue().equals(IPreferenceKeys.PUBLISH)){
144
		            checkbox_publish.setSelection(true);
145
		        } else if (defaultPublish != null && defaultPublish.getValue().equals(IPreferenceKeys.DO_NOT_PUBLISH)){
146
		            checkbox_publish.setSelection(false);
147
		        }else{
148
		            if((this.getParentTreeNode()).isInstanceOf(TaxonNode.class)){
149
		                checkbox_publish.setSelection(((TaxonNode)this.getParentTreeNode()).getTaxon().isPublish());
150
		            }else{
151
		                checkbox_publish.setSelection(true);
152
		            }
153
		        }
154
		    }
155
		}
137 156

  
138 157
		if (isCreateNew()){
139 158
            setParentTreeNode(entity);
......
146 165
		            "Taxon is unplaced", ((TaxonNode)entity).isUnplaced(), style);
147 166
		}
148 167

  
149
		if (!isCreateNew()){
150
            selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), style);
151
            selectionNodeAgentRelation.setEntity((TaxonNode)entity);
152
            selectionNodeAgentRelation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
153
        }
154 168
		preFillTaxonName();
155 169

  
156 170
		if (entity instanceof TaxonNode) {
......
158 172
		            "Taxon is excluded", ((TaxonNode)entity).isExcluded(), style);
159 173
		    multiLanguageTextExcludedNotes = formFactory.createMultiLanguageTextElement(formElement, "Excluded Notes", ((TaxonNode)entity).getExcludedNote(), 50, style);
160 174
		    multiLanguageTextExcludedNotes.setEnabled(((TaxonNode) entity).isExcluded());
161

  
162
		    checkbox_publish = formFactory.createCheckbox(formElement,
163
                        "Taxon is public", ((TaxonNode)entity).getTaxon().isPublish(), style);
164

  
165
		    if(isCreateNew()){
166
		        CdmPreference defaultPublish = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag);
167
	            if (defaultPublish != null && defaultPublish.getValue().equals(IPreferenceKeys.PUBLISH)){
168
	                checkbox_publish.setSelection(true);
169
	            } else if (defaultPublish != null && defaultPublish.getValue().equals(IPreferenceKeys.DO_NOT_PUBLISH)){
170
	                checkbox_publish.setSelection(false);
171
	            }else{
172
	                if((this.getParentTreeNode()).isInstanceOf(TaxonNode.class)){
173
	                    checkbox_publish.setSelection(((TaxonNode)this.getParentTreeNode()).getTaxon().isPublish());
174
	                }else{
175
	                    checkbox_publish.setSelection(true);
176
	                }
177
	            }
178
		    }
175
		}
176
		if (!isCreateNew()){
177
		    selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), style);
178
		    selectionNodeAgentRelation.setEntity((TaxonNode)entity);
179
		    selectionNodeAgentRelation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
179 180
		}
180 181
		checkbox_openInEditor = formFactory.createCheckbox(formElement,
181 182
		        "Open in Editor", true, style);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)