0

dspace 4.x XMLUI のサイドバーファセット

上記では、 「DDC Subject」以下の項目が'::'で表示されている -> "DEWEY DECIMAL CLASSIFICATION::GENERALITIES::Bibliography (1)"のように表示したい -> "Bibliography (1)"のように表示したい。この目的のために、次のスクリプトをファイル[dspace-install]/webapps/xmlui/static/js/discovery/search-control.js に記述しました->

function cutText(){
	
	  var headvalue =  $('div#aspect_discovery_Navigation_list_discovery ul li h2').innerHTML;

	  if(headvalue.match('DDC Subject')){
		var displaytext = $('#aspect_discovery_Navigation_list_discovery ul li ul li a').innerHTML;
		var y = displaytext.split("::");
		if(y.len>1)
			var display = y[y.len-1];

		alert(display);
		$('#aspect_discovery_Navigation_list_discovery ul li ul li a').innerHTML = display;

	}
     }

しかし、うまくいきません。誰でも助けることができますか?

@euler提案を受けて、次のことを行いました-> dspace.cfgファイルを次のように変更しました->

choices.plugin.dc.subject.ddc = ddcE
choices.presentation.dc.subject.ddc = lookup
vocabulary.plugin.ddcE.hierarchy.store = false
vocabulary.plugin.ddcE.hierarchy.suggest = false
vocabulary.plugin.ddcE.delimiter = "::"

ddcE」は私のinput-forms.xmlファイルで定義されています->

    <field>
         <dc-schema>dc</dc-schema>
         <dc-element>subject</dc-element>
         <dc-qualifier>ddc</dc-qualifier>
         <!-- An input-type of twobox MUST be marked as repeatable -->
         <repeatable>true</repeatable>
         <label>Subject (From DDC)</label>
         <input-type>twobox</input-type>
         <hint>Enter appropriate subject Division/Sub-division from DDC 23rd Edition(upto 3rd Summary)</hint>
         <required>You must enter at least one Division/Sub-division from DDC 23rd Edition(upto 3rd Summary)</required>
         <vocabulary>ddcE</vocabulary>
    </field>

しかし、Tomcatを再起動した後も何も反映されていません。

4

1 に答える 1

0

まず、 を編集してdspace.cfg、行を探してくださいvocabulary.plugin._plugin_.hierarchy.store(_plugin_は有効なDSpaceControlledVocabularyの名前です。例: srsc)。デフォルト値は true です。これをコメント解除して、値を false に変更します。

編集

たとえば、デフォルトの srsc 制御語彙を使用した場合:

## demo: subject code autocomplete, using srsc as authority
## (DSpaceControlledVocabulary plugin must be enabled)
## Warning: when enabling this feature any controlled vocabulary configuration in the input-forms.xml for the metadata field will be overridden.
choices.plugin.dc.subject = srsc
choices.presentation.dc.subject = lookup
vocabulary.plugin.srsc.hierarchy.store = false
vocabulary.plugin.srsc.hierarchy.suggest = false
vocabulary.plugin.srsc.delimiter = "::"

アップデート

上記の構成に追加authority.controlled.dc.subject = trueします。したがって、あなたの場合、追加する必要がありますauthority.controlled.dc.subject.ddc = true


別のオプションは<property name="skipFirstNodeLevel" value="true"/>、discovery.xml に追加することです

元。:

<bean id="searchFilterSubject" class="org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration">
<property name="indexFieldName" value="subject"/>
<property name="metadataFields">
    <list>
        <value>dc.subject</value>
    </list>
</property>
<property name="sortOrder" value="COUNT"/>
<property name="splitter" value="::"/>
<property name="skipFirstNodeLevel" value="true"/>

後者のオプションは試したことがないので、dspace.cfg最初のオプションを変更してみてください。この助けを願っています。

于 2015-03-03T01:37:55.403 に答える