[alfresco]ドキュメントライブラリのuiカスタマイズ
Post on 08-Jul-2015
1.996 Views
Preview:
TRANSCRIPT
ドキュメントライブラリのUIカスタマイズ(一部)
Alfresco勉強会 第10回
2012.10.10 @terajun
目次
2
1. 自己紹介
2. ドキュメントライブラリのアクションメニューのカスタマイズ方法
3. (デモ)ドキュメントライブラリのアクションメニューのカスタマイズ
4. ドキュメントライブラリのソートキーのカスタマイズ方法
5. (デモ)ドキュメントライブラリのソートキーのカスタマイズ
自己紹介
3
aegif で主にAlfrescoまわりのコンサルタントをやっています。
生後2ヶ月の息子がかわいくて仕方がない。
ドラクエXをやるべきかどうか迷っているうちに2ヶ月経過してしまった。
ドキュメントライブラリのアクションメニューのカスタマイズ方法
ドキュメントライブラリのアクションメニュー
よくある要件
不要なアクションメニューは隠蔽したい。
よく使うメニューを上の方に(その他のアクションから出して)表示してほしい。 などなど
ファイル、フォルダ、リンクの それぞれに対して、 この2つがあるので3×2で計6種類
5
カスタマイズ方法
<!-- Custom DocLibActions config section -->
<config evaluator="string-compare" condition="DocLibActions">
<actionGroups>
<actionGroup id="document-browse">
<action index="100" id="document-download" />
・・・
<action index="310" id="document-view-googlemaps" />
<action index="320" id="document-view-in-source-repository" />
</actionGroup>
</actionGroups>
</config>
share-config-custom.xml に share-documentlibrary-config.xml から以下のように必要な部分をコピペして編集
index はメニューの並び順を指定するために使う。
icon や label は別途それぞれのActionに定義されているが、ここで変更することもできる。
不要なものを隠ぺいする場合は replace = “true” にして設定を全て書き換える必要がある。
設定内容
6
(デモ)ドキュメントライブラリのアクションメニューのカスタマイズ
デモ1:表示順、ラベル、アイコンの変更
<!-- Custom DocLibActions config section -->
<config evaluator="string-compare" condition="DocLibActions">
<actionGroups>
<actionGroup id="document-browse">
<action index="010" id="document-copy-to" />
<action index="020" id="document-move-to" />
<action index="030" id="document-delete" label="actions.folder.delete"/>
<action index="280" id="document-assign-workflow" icon="document-publish" />
</actionGroup>
</actionGroups>
</config>
例えば share-config-custom.xml にこんな風に書くと・・・
indexを変えて表示順を変更
labelを変更
iconを変更
デフォルトではこうなっていたのが・・・
こうなる。
順番が変わっている
labelが変わっている
iconが変わっている
8
デモ2:REPLACE = “TRUE” にしてみる
<!-- Custom DocLibActions config section -->
<config evaluator=“string-compare” condition=“DocLibActions” replace=“true”>
<actionGroups>
<actionGroup id="document-browse">
<action index="010" id="document-copy-to" />
<action index="020" id="document-move-to" />
<action index="030" id="document-delete" label="actions.folder.delete"/>
<action index="280" id="document-assign-workflow" icon="document-publish" />
</actionGroup>
</actionGroups>
</config>
内容はさっきと同じで、replace = “true” にしてみると・・・
replace = “true” を追記
デフォルトではこうなっていたのが・・・
こうなる。
share-config-custom.xml に書いたものだけが表示される。
9
ドキュメントライブラリのソートキーのカスタマイズ方法
ドキュメントライブラリのソートキー
よくある要件
不要なキーは隠蔽したい。
よく使うキーを上の方に表示してほしい。 などなど
コンテンツをファイル名や 作成日等でソートするためのキー
11
カスタマイズ方法
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<sorting>
<sort label="label.name">cm:name|true</sort>
<sort label="label.popularity">cm:likesRatingSchemeCount|false</sort>
<sort label="label.created">cm:created</sort>
<sort label="label.creator">cm:creator</sort>
<sort label="label.modified">cm:modified</sort>
<sort label="label.modifier">cm:modifier</sort>
<sort label="label.mimetype">cm:content.mimetype</sort>
</sorting>
</config>
share-config-custom.xml に share-documentlibrary-config.xml から以下のように必要な部分をコピペして編集
キーの追加のみの場合は replace = “true” は不要。
|true または |false を付けると、それぞれデフォルトで昇順、降順になる。
設定内容
12
(デモ)ドキュメントライブラリのソートキーのカスタマイズ
デモ:ソートキーの変更
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<sorting>
<sort label="label.created">cm:created|false</sort>
<sort label="label.modified">cm:modified</sort>
<sort label="label.creator">cm:creator</sort>
<sort label="label.modifier">cm:modifier</sort>
<sort label="label.name">cm:name|true</sort>
<sort label="label.popularity">cm:likesRatingSchemeCount|false</sort>
<sort label="label.mimetype">cm:content.mimetype</sort>
</sorting>
</config>
例えば share-config-custom.xml にこんな風に書くと・・・
不要なものを削除して 並び順を変更
デフォルトではこうなっていたのが・・・ こうなる。
削除したキーがなくなり 並び順が変わっている
「作成日」はデフォルトを 降順に指定
14
「作成日」を選ぶと 自動的に降順になる
参考
http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/doclib-web-tier.html
ここにもっと詳しい内容が載っています。
15
top related