Liferayフロントエンド管理バー

管理バーを使用することで、管理者は検索コンテナの結果を管理できます。 検索結果の表示スタイルをフィルター処理、並べ替え、選択できるため、ドキュメント、Webコンテンツ、アセットエントリなど、アプリで探しているものをすばやく特定できます。管理バーは完全にカスタマイズ可能であるため、すべてのコントロールを実装することも、アプリに必要なコントロールのみを実装することもできます。

図1:管理バーを使用して、ユーザーはアプリでコンテンツを表示する方法をカスタマイズできます。

**注:**Liferayフロントエンド管理バーは、Liferay DXP 7.1では推奨されていません。 代わりに、Clay Management Toolbarを使用することを推奨しています。

管理バーにはいくつかの重要なセクションがあります。各セクションは、異なるtaglibを使用してグループ化されて構成されます。

<liferay-frontend:management-bar-buttons>タグは、管理バーのボタン要素をラップします:

図2:management-bar-buttonsタグには、管理バーのメインボタンが含まれています。

<liferay-frontend:management-bar-sidenav-toggler-button>タグは、情報ボタンのスライドアウトナビゲーションを実装します。

<liferay-frontend:management-bar-display-buttons>タグは、アプリの表示スタイルオプションをレンダリングします。

図3:management-bar-display-buttonsタグにはコンテンツの表示オプションが含まれています。

<liferay-frontend:management-bar-filters>タグは、アプリのフィルタリングオプションをラップします。このフィルターは、すべてのコントロールパネルアプリケーションに含める必要があります。フィルターオプションには、並べ替え条件、並べ替え順序などを含めることができます。

図4:management-bar-filtersタグにはコンテンツフィルタリングオプションが含まれています。

最後に、<liferay-frontend:management-bar-action-buttons>タグは、選択した項目に対して実行できるアクションをラップします。ページ間で複数の項目を選択できます。管理バーは、選択された項目の数を追跡します。

図5:管理バーは、選択された項目を追跡し、それらに対して実行するアクションを表示します。

たとえば、ゴミ箱アプリの管理バーの構成は次のとおりです。

<liferay-frontend:management-bar
includeCheckBox="<%= true %>"
searchContainerId="trash"
>
<liferay-frontend:management-bar-buttons>
<liferay-frontend:management-bar-sidenav-toggler-button />

<liferay-portlet:actionURL name="changeDisplayStyle"
varImpl="changeDisplayStyleURL">
<portlet:param name="redirect" value="<%= currentURL %>" />
</liferay-portlet:actionURL>

<liferay-frontend:management-bar-display-buttons
displayViews='<%= new String[] {"descriptive", "icon",
"list"} %>'
portletURL="<%= changeDisplayStyleURL %>"
selectedDisplayStyle="<%= trashDisplayContext.getDisplayStyle()
%>"
/>
</liferay-frontend:management-bar-buttons>

<liferay-frontend:management-bar-filters>
<liferay-frontend:management-bar-navigation
navigationKeys='<%= new String[] {"all"} %>'
portletURL="<%= trashDisplayContext.getPortletURL() %>"
/>

<liferay-frontend:management-bar-sort
orderByCol="<%= trashDisplayContext.getOrderByCol() %>"
orderByType="<%= trashDisplayContext.getOrderByType() %>"
orderColumns='<%= new String[] {"removed-date"} %>'
portletURL="<%= trashDisplayContext.getPortletURL() %>"
/>
</liferay-frontend:management-bar-filters>

<liferay-frontend:management-bar-action-buttons>
<liferay-frontend:management-bar-sidenav-toggler-button />

<liferay-frontend:management-bar-button href="javascript:;"
icon="trash" id="deleteSelectedEntries" label="delete" />
</liferay-frontend:management-bar-action-buttons>
</liferay-frontend:management-bar>
« Liferayフロントエンド情報バー管理バーにアクションを含める »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています