Project

General

Profile

« Previous | Next » 

Revision fa39cfe4

Added by Katja Luther over 7 years ago

more changes for configurable name details view

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
67 67
	@Override
68 68
	protected void createControls(ICdmFormElement formElement,
69 69
			NonViralName entity, int style) {
70
	    if (isAdvancedView){
70
	    if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE)){
71 71
	        toggleable_cache = formFactory.createToggleableTextField(this,
72 72
				"Authorship Cache", entity.getAuthorshipCache(),
73 73
				entity.isProtectedAuthorshipCache(), style);
......
78 78
	    }
79 79
	    NomenclaturalCode code = entity.getNomenclaturalCode();
80 80

  
81
        selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
82
				getConversationHolder(),
83
				formElement, "Author",
84
				entity.getCombinationAuthorship(),
85
				EntitySelectionElement.ALL, style);
86
		addElement(selectionCombinationAuthor);
87
		selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
88
				getConversationHolder(),
89
				formElement, "Ex Author",
90
				entity.getExCombinationAuthorship(),
91
				EntitySelectionElement.ALL, style);
92
		addElement(selectionExCombinationAuthor);
93
		if (code != null){
94
            if (code.equals(NomenclaturalCode.ICZN)){
95
                text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style);
96

  
97
            }
98
         }
99
		selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
100
                formElement, "Basionym Author", entity.getBasionymAuthorship(),
101
                EntitySelectionElement.ALL, style);
102
		addElement(selectionBasionymAuthor);
103
		selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
104
		        formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
105
		        EntitySelectionElement.ALL, style);
106

  
107
		addElement(selectionExBasionymAuthor);
108
		 if (code != null){
109
	            if (code.equals(NomenclaturalCode.ICZN)){
110

  
111
	                text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style);
112

  
113
	            }
114
	         }
115

  
81
	    if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
82
            selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
83
    				getConversationHolder(),
84
    				formElement, "Author",
85
    				entity.getCombinationAuthorship(),
86
    				EntitySelectionElement.ALL, style);
87
    		addElement(selectionCombinationAuthor);
88
    		selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
89
    				getConversationHolder(),
90
    				formElement, "Ex Author",
91
    				entity.getExCombinationAuthorship(),
92
    				EntitySelectionElement.ALL, style);
93
    		addElement(selectionExCombinationAuthor);
94
    		if (code != null){
95
                if (code.equals(NomenclaturalCode.ICZN)){
96
                    text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style);
97

  
98
                }
99
             }
100
    		selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
101
                    formElement, "Basionym Author", entity.getBasionymAuthorship(),
102
                    EntitySelectionElement.ALL, style);
103
    		addElement(selectionBasionymAuthor);
104
    		selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
105
    		        formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
106
    		        EntitySelectionElement.ALL, style);
107

  
108
    		addElement(selectionExBasionymAuthor);
109
    		 if (code != null){
110
    	            if (code.equals(NomenclaturalCode.ICZN)){
111

  
112
    	                text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style);
113

  
114
    	            }
115
    	         }
116 116

  
117
	    }
117 118

  
118 119
	}
119 120

  

Also available in: Unified diff