This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docpublic:systemes:ssocas:castheme [2010/09/27 09:18] PROCACCIA created |
docpublic:systemes:ssocas:castheme [2011/09/08 13:36] (current) PROCACCIA |
||
---|---|---|---|
Line 3: | Line 3: | ||
==== Référence ==== | ==== Référence ==== | ||
- | http:// | + | |
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
==== Arborescence Custom ==== | ==== Arborescence Custom ==== | ||
Line 18: | Line 21: | ||
[root@cas2 cas-toolbox-3.3.5-3]# | [root@cas2 cas-toolbox-3.3.5-3]# | ||
cas.css | cas.css | ||
+ | </ | ||
+ | |||
+ | |||
+ | au final on aura ce type d' | ||
+ | |||
+ | < | ||
+ | [root@cas3 custom]# tree -a | ||
+ | . | ||
+ | └── webpages | ||
+ | ├── themes | ||
+ | │ ├── esup | ||
+ | │ │ ├── cas.css | ||
+ | │ │ ├── default-mobile-custom.css | ||
+ | │ │ └── images | ||
+ | │ │ | ||
+ | │ │ | ||
+ | │ └── tmsp1Theme | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | └── WEB-INF | ||
+ | ├── classes | ||
+ | │ ├── messages_fr.properties | ||
+ | │ ├── tmsp1Theme.properties | ||
+ | │ └── tmsp1Vues_views.properties | ||
+ | ├── usersFile | ||
+ | └── view | ||
+ | └── jsp | ||
+ | └── tmsp1Vues | ||
+ | └── ui | ||
+ | ├── casBlockedView.jsp | ||
+ | ├── casConfirmView.jsp | ||
+ | ├── casGenericSuccess.jsp | ||
+ | ├── casLoginView.jsp | ||
+ | ├── casLogoutView.jsp | ||
+ | ├── includes | ||
+ | │ ├── bottom.jsp | ||
+ | │ └── top.jsp | ||
+ | ├── serviceErrorSsoView.jsp | ||
+ | └── serviceErrorView.jsp | ||
+ | |||
+ | 14 directories, | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Theme ==== | ||
+ | |||
+ | === CSS === | ||
+ | |||
+ | Le theme est essentiellement le fichier css, ici ce sera tmsp1cas.css qui sera chargé par toutes les pages statiques (jsp) car elles inclus toutes top.jsp (et bottom.jsp) | ||
+ | |||
+ | < | ||
+ | [root@cas2 cas-toolbox-3.3.5-3]# | ||
+ | <style type=" | ||
+ | </ | ||
+ | |||
+ | cette directive @import | ||
+ | |||
+ | ce qui resultera au final en | ||
+ | |||
+ | < | ||
+ | <style type=" | ||
+ | </ | ||
+ | |||
+ | === parametrage === | ||
+ | |||
+ | Il faut indiquer a ant que nous allons utliser l' | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | custom.path=${basedir}/ | ||
+ | cas.custom.webpage.path=${custom.path}/ | ||
+ | cas.custom.source.path=${custom.path}/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | theme=tmsp1Theme | ||
+ | views=tmsp1Vue | ||
+ | </ | ||
+ | |||
+ | === Création === | ||
+ | |||
+ | Préparer l' | ||
+ | |||
+ | < | ||
+ | $ mkdir -p custom/ | ||
+ | </ | ||
+ | |||
+ | recopier le fichier esup.properties | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | </ | ||
+ | |||
+ | Fichier tmsp1Theme.properties appel les css: | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | mobile.custom.css.file=themes/ | ||
+ | standard.custom.css.file=themes/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== arborescence de theme tmsp1 ==== | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | </ | ||
+ | |||
+ | Recopie du modele de cas.css et ajout d' | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | background:# | ||
+ | |||
+ | </ | ||
+ | Logo dans la section | ||
+ | |||
+ | |||
+ | ==== views JSP ==== | ||
+ | |||
+ | Les views sont des pages statique (jsp) visibles dans / | ||
+ | |||
+ | === modele === | ||
+ | |||
+ | On reprend l' | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | custom/ | ||
+ | includes | ||
+ | casBlockedView.jsp | ||
+ | |||
+ | custom/ | ||
+ | bottom.jsp | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Attention a top.jsp qui peut-etre ecrasé par la manip ci-dessus, s' | ||
+ | |||
+ | < | ||
+ | $ grep css custom/ | ||
+ | <style type=" | ||
+ | </ | ||
+ | |||
+ | et non le top.jsp par defaut qui force l' | ||
+ | |||
+ | <style type=" | ||
+ | |||
+ | ==== Views tmsp1 ==== | ||
+ | |||
+ | Pour chaque jsp il faut definir son appel dans *theme_name*_views.properties | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | |||
+ | </ | ||
+ | |||
+ | On remplace toute occurence de " | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | ### Login view (/login) | ||
+ | casLoginView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | casLoginView.url=/ | ||
+ | |||
+ | ### Login confirmation view (logged in, warn=true) | ||
+ | casLoginConfirmView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | casLoginConfirmView.url=/ | ||
+ | |||
+ | ### Logged-in view (logged in, no service provided) | ||
+ | casLoginGenericSuccessView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | casLoginGenericSuccessView.url=/ | ||
+ | |||
+ | ### Logout view (/ | ||
+ | casLogoutView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | casLogoutView.url=/ | ||
+ | |||
+ | ### CAS error view | ||
+ | viewServiceErrorView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | viewServiceErrorView.url=/ | ||
+ | |||
+ | viewServiceSsoErrorView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | viewServiceSsoErrorView.url=/ | ||
+ | |||
+ | ### Services Management Views | ||
+ | addServiceView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | addServiceView.url=/ | ||
+ | |||
+ | editServiceView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | editServiceView.url=/ | ||
+ | |||
+ | manageServiceView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | manageServiceView.url=/ | ||
+ | |||
+ | serviceLogoutView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | serviceLogoutView.url=/ | ||
+ | |||
+ | viewStatisticsView.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | viewStatisticsView.url=/ | ||
+ | |||
+ | 403.(class)=org.springframework.web.servlet.view.JstlView | ||
+ | 403.url=/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Messages ==== | ||
+ | |||
+ | on peux aussi personnaliser les messages (intitulés) via messages_fr.properties | ||
+ | |||
+ | < | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | [root@cas3 cas-toolbox-3.4.7-1]# | ||
+ | </ | ||
+ | |||
+ | un ant init / deploy est necessaire apres chaque modification dans custom ! | ||
+ | |||
+ | ==== JSP Login ==== | ||
+ | |||
+ | Adaptation de la page premiere de Login CAS; casLoginView.jsp | ||
+ | |||
+ | < | ||
+ | [root@cas2 cas-toolbox-3.3.5-3]# | ||
+ | </ | ||
+ | |||
+ | Notament les images/ | ||
+ | |||
+ | < | ||
+ | <li class=" | ||
+ | ... | ||
+ | < | ||
+ | </ul> | ||
+ | </ | ||
+ | </ | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <ul> | ||
+ | <li id=" | ||
+ | <li id=" | ||
+ | </ul> | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
</ | </ | ||