Pour rechercher vos contenus proposés, vous pouvez définir un moteur de recherche back-office dédié, avec un droit d'accès spécifique.
Voici ci-dessous l'exemple du plugin Classified Ads qui définit un moteur de recherche dédié aux petites annonces :
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<feature name="org.ametys.plugins.classified.ads.search">
<extensions>
<extension id="search-ui.classified.ads"
point="org.ametys.cms.search.ui.model.SearchUIModelExtensionPoint"
config="search/ads.xml">
</extension>
<extension point="org.ametys.core.right.RightsExtensionPoint"
id="org.ametys.plugins.classified.ads.search.right">
<right id="Classified_Ads_Right_BOSearch">
<label>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_LABEL</label>
<description>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_DESC</description>
<category>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_RIGHT_CATEGORY</category>
</right>
</extension>
<extension id="org.ametys.plugins.classified.ads.Search"
point="org.ametys.core.ui.RibbonControlsManager"
class="org.ametys.core.ui.StaticClientSideElement">
<class name="Ametys.ribbon.element.ui.button.OpenToolButtonController">
<opentool-id>uitool-web-search</opentool-id>
<opentool-params>
<id>search-ui.classified.ads</id>
<title i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</title>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</opentool-params>
<label i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</label>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</class>
<right context-prefix="/cms">Classified_Ads_Right_BOSearch</right>
<depends>
<org.ametys.core.ui.UIToolsFactoriesManager>uitool-web-search</org.ametys.core.ui.UIToolsFactoriesManager>
</depends>
</extension>
</extensions>
</feature>
<feature name="org.ametys.plugins.classified.ads.search">
<extensions>
<extension id="search-ui.classified.ads"
point="org.ametys.cms.search.ui.model.SearchUIModelExtensionPoint"
config="search/ads.xml">
</extension>
<extension point="org.ametys.core.right.RightsExtensionPoint"
id="org.ametys.plugins.classified.ads.search.right">
<right id="Classified_Ads_Right_BOSearch">
<label>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_LABEL</label>
<description>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_DESC</description>
<category>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_RIGHT_CATEGORY</category>
</right>
</extension>
<extension id="org.ametys.plugins.classified.ads.Search"
point="org.ametys.core.ui.RibbonControlsManager"
class="org.ametys.core.ui.StaticClientSideElement">
<class name="Ametys.ribbon.element.ui.button.OpenToolButtonController">
<opentool-id>uitool-web-search</opentool-id>
<opentool-params>
<id>search-ui.classified.ads</id>
<title i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</title>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</opentool-params>
<label i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</label>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</class>
<right context-prefix="/cms">Classified_Ads_Right_BOSearch</right>
<depends>
<org.ametys.core.ui.UIToolsFactoriesManager>uitool-web-search</org.ametys.core.ui.UIToolsFactoriesManager>
</depends>
</extension>
</extensions>
</feature>
<feature name="org.ametys.plugins.classified.ads.search">
<extensions>
<extension id="search-ui.classified.ads"
point="org.ametys.cms.search.ui.model.SearchUIModelExtensionPoint"
config="search/ads.xml">
</extension>
<extension point="org.ametys.core.right.RightsExtensionPoint"
id="org.ametys.plugins.classified.ads.search.right">
<right id="Classified_Ads_Right_BOSearch">
<label>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_LABEL</label>
<description>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_RIGHT_DESC</description>
<category>PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_RIGHT_CATEGORY</category>
</right>
</extension>
<extension id="org.ametys.plugins.classified.ads.Search"
point="org.ametys.core.ui.RibbonControlsManager"
class="org.ametys.core.ui.StaticClientSideElement">
<class name="Ametys.ribbon.element.ui.button.OpenToolButtonController">
<opentool-id>uitool-web-search</opentool-id>
<opentool-params>
<id>search-ui.classified.ads</id>
<title i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</title>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</opentool-params>
<label i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_LABEL</label>
<description i18n="true">PLUGINS_CLASSIFIED_ADS_CONTENT_ADS_SEARCH_DESC</description>
<icon-glyph>ametysicon-newspaper1</icon-glyph>
<icon-decorator>decorator-ametysicon-magnifier12</icon-decorator>
<icon-decorator-type>action-default</icon-decorator-type>
</class>
<right context-prefix="/cms">Classified_Ads_Right_BOSearch</right>
<depends>
<org.ametys.core.ui.UIToolsFactoriesManager>uitool-web-search</org.ametys.core.ui.UIToolsFactoriesManager>
</depends>
</extension>
</extensions>
</feature>
Pour ajouter ce bouton dans le ribbon, il faudra surcharger le ribbon.
Le plugin Classified Ads ajoute par exemple dans le bouton le groupe "Outils" de l'onglet Accueil comme ceci:
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<tab label="plugin.cms:RIBBON_TABS_TAB_HOME_LABEL" override="true">
<groups>
<group label="plugin.cms:RIBBON_TABS_TAB_HOME_GROUPS_GROUP_TOOL_LABEL" override="true" controlsOrder="0.30">
<control id="org.ametys.plugins.classified.ads.Search"/>
</group>
</groups>
</tab>
<tab label="plugin.cms:RIBBON_TABS_TAB_HOME_LABEL" override="true">
<groups>
<group label="plugin.cms:RIBBON_TABS_TAB_HOME_GROUPS_GROUP_TOOL_LABEL" override="true" controlsOrder="0.30">
<control id="org.ametys.plugins.classified.ads.Search"/>
</group>
</groups>
</tab>
<tab label="plugin.cms:RIBBON_TABS_TAB_HOME_LABEL" override="true">
<groups>
<group label="plugin.cms:RIBBON_TABS_TAB_HOME_GROUPS_GROUP_TOOL_LABEL" override="true" controlsOrder="0.30">
<control id="org.ametys.plugins.classified.ads.Search"/>
</group>
</groups>
</tab>