Download - [Alfresco]ドキュメントライブラリのUIカスタマイズ
![Page 1: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/1.jpg)
ドキュメントライブラリのUIカスタマイズ(一部)
Alfresco勉強会 第10回
2012.10.10 @terajun
![Page 2: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/2.jpg)
目次
2
1. 自己紹介
2. ドキュメントライブラリのアクションメニューのカスタマイズ方法
3. (デモ)ドキュメントライブラリのアクションメニューのカスタマイズ
4. ドキュメントライブラリのソートキーのカスタマイズ方法
5. (デモ)ドキュメントライブラリのソートキーのカスタマイズ
![Page 3: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/3.jpg)
自己紹介
3
aegif で主にAlfrescoまわりのコンサルタントをやっています。
生後2ヶ月の息子がかわいくて仕方がない。
ドラクエXをやるべきかどうか迷っているうちに2ヶ月経過してしまった。
![Page 4: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/4.jpg)
ドキュメントライブラリのアクションメニューのカスタマイズ方法
![Page 5: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/5.jpg)
ドキュメントライブラリのアクションメニュー
よくある要件
不要なアクションメニューは隠蔽したい。
よく使うメニューを上の方に(その他のアクションから出して)表示してほしい。 などなど
ファイル、フォルダ、リンクの それぞれに対して、 この2つがあるので3×2で計6種類
5
![Page 6: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/6.jpg)
カスタマイズ方法
<!-- 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
![Page 7: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/7.jpg)
(デモ)ドキュメントライブラリのアクションメニューのカスタマイズ
![Page 8: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/8.jpg)
デモ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
![Page 9: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/9.jpg)
デモ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
![Page 10: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/10.jpg)
ドキュメントライブラリのソートキーのカスタマイズ方法
![Page 11: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/11.jpg)
ドキュメントライブラリのソートキー
よくある要件
不要なキーは隠蔽したい。
よく使うキーを上の方に表示してほしい。 などなど
コンテンツをファイル名や 作成日等でソートするためのキー
11
![Page 12: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/12.jpg)
カスタマイズ方法
<!-- 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
![Page 13: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/13.jpg)
(デモ)ドキュメントライブラリのソートキーのカスタマイズ
![Page 14: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/14.jpg)
デモ:ソートキーの変更
<!-- 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
「作成日」を選ぶと 自動的に降順になる
![Page 15: [Alfresco]ドキュメントライブラリのUIカスタマイズ](https://reader030.vdocuments.pub/reader030/viewer/2022020116/559c1cd81a28ab14158b469d/html5/thumbnails/15.jpg)
参考
http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/doclib-web-tier.html
ここにもっと詳しい内容が載っています。
15