[Résolu] Interface graphique d'Alfresco

cancel
Showing results for 
Search instead for 
Did you mean: 
rookie
Member II

[Résolu] Interface graphique d'Alfresco

Bonjour,

J'ai une autre question qui me passe par la tête sur la mise en forme de l'interface graphique d'Alfresco.
Lorsqu'on affiche les détails d'un document, plusieurs "champs" apparaissent : Vue personnalisée, Liens, Propriétés (contenant toutes les propriétés du document en cours), etc.
Est-ce qu'il est possible d'enlever un de ces champs ou pas (et d'en ajouter)? Je trouve que certains ne servent à rien, du coup je voudrais bien les faire disparaître. Cela peut paraître avec mon autre post précédent, mais je n'ai pas trouvé de section correspondante pour ça.

Je suis désolé si je poste beaucoup de messages sur ce forum, mais je trouve important de pouvoir customiser à son goût Alfresco pour une meilleure utilisation au quotidien.

Merci beaucoup par avance!
1 Reply
rookie
Member II

Re: [Résolu] Interface graphique d'Alfresco

J'ai trouvé la réponse à ma question tout seul.

J'ai modifié le fichier document-details.jsp dans tomcat\webapps\alfresco\jsp\content\.
J'ai viré les panels qui ne me convenaient pas et mon fichier final ressemble à ça.


<%–
* Copyright (C) 2005-2007 Alfresco Software Limited.

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception.  You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
–%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a"%>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>

<%@ page buffer="64kb" contentType="text/html;charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%>
<%@ page import="org.alfresco.web.app.Application"%>
<%@ page import="javax.faces.context.FacesContext"%>

<f:verbatim>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
</f:verbatim>
<h:panelGroup id="dashboard-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalChange">
<r:actionInstanceEvaluator id="eval1" value="#{DialogManager.bean.document}" evaluatorClassName="org.alfresco.web.action.evaluator.UnlockedDocEvaluator">
<a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyDocTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
<a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{DialogManager.bean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />
</r:actionInstanceEvaluator>
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>

<h:panelGroup id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/edit_properties.gif" action="#{DialogManager.bean.editContentProperties}" />
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="dialog:dialog-body:props-panel-facets" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
rendered="#{DialogManager.bean.locked == false}" expanded='#{DialogManager.bean.panels["properties-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<f:verbatim>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center><%– icon image for the doc –%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding: 4px"></f:verbatim><a:actionLink id="doc-logo1" value="#{DialogManager.bean.name}" href="#{DialogManager.bean.url}" target="new"
image="#{DialogManager.bean.document.properties.fileType32}" showLink="false" /><f:verbatim></div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td><%– properties for the doc –%> </f:verbatim><r:propertySheetGrid id="document-props" value="#{DialogManager.bean.document}" var="documentProps" columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" /> <h:outputText
id="no-inline-msg" value="<br/>#{msg.not_inline_editable}<br/><br/>" rendered="#{DialogManager.bean.inlineEditable == false}" escape="false" /> <r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write"
id="eval_inline">
<a:actionLink id="make-inline" value="#{msg.allow_inline_editing}" action="#{DialogManager.bean.applyInlineEditable}" rendered="#{DialogManager.bean.inlineEditable == false}" />
</r:permissionEvaluator> <h:message id="msg1" for="document-props" styleClass="statusMessage" /><f:verbatim></td>
</tr>
</table>
</f:verbatim>
</a:panel>
<a:panel label="#{msg.properties}" id="properties-panel-locked" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" rendered="#{DialogManager.bean.locked}"
expanded='#{DialogManager.bean.panels["properties-panel-locked"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<f:verbatim>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center><%– icon image for the doc –%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding: 4px"></f:verbatim><a:actionLink id="doc-logo2" value="#{DialogManager.bean.name}" href="#{DialogManager.bean.url}" target="new"
image="#{DialogManager.bean.document.properties.fileType32}" showLink="false" /><f:verbatim></div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td></f:verbatim><r:propertySheetGrid id="document-props-locked" value="#{DialogManager.bean.document}" var="documentProps" columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" /> <h:outputText id="no-inline-msg2"
value="<br/>#{msg.not_inline_editable}<br/>" rendered="#{DialogManager.bean.inlineEditable == false}" escape="false" /> <h:message id="msg2" for="document-props-locked" styleClass="statusMessage" /><f:verbatim></td>
</tr>
</table>
</f:verbatim>
</a:panel>

<f:verbatim>
<div style="padding: 4px"></div>
</f:verbatim>

<h:panelGroup id="workflow-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write">
<a:actionLink id="titleLink2" value="#{msg.title_edit_simple_workflow}" showLink="false" image="/images/icons/Change_details.gif" action="dialog:editContentSimpleWorkflow" rendered="#{DialogManager.bean.approveStepName != null}" />
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.workflows}" id="workflow-panel" facetsId="dialog:dialog-body:workflow-panel-facets" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
expanded='#{DialogManager.bean.panels["workflow-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<r:nodeWorkflowInfo id="workflow-info" value="#{DialogManager.bean.document}" />
</a:panel>

<f:verbatim>
<div style="padding: 4px"></div>
</f:verbatim>

<h:panelGroup id="category-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="eval_cat0">
<a:actionLink id="titleLink3" value="#{msg.change_category}" showLink="false" image="/images/icons/Change_details.gif" action="dialog:editNodeCategories" actionListener="#{DialogManager.setupParameters}">
<f:param name="nodeRef" value="#{DialogManager.bean.document.nodeRefAsString}" />
</a:actionLink>
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.category}" id="category-panel" facetsId="dialog:dialog-body:category-panel-facets" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
rendered="#{DialogManager.bean.categorised}" expanded='#{DialogManager.bean.panels["category-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<h:outputText id="category-overview" value="#{DialogManager.bean.categoriesOverviewHTML}" escape="false" />
</a:panel>
<a:panel label="#{msg.category}" id="no-category-panel" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" rendered="#{DialogManager.bean.categorised == false}"
expanded='#{DialogManager.bean.panels["category-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<h:outputText id="no-category-msg" value="#{msg.not_in_category}<br/><br/>" escape="false" />
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="eval_cat">
<a:actionLink id="make-classifiable" value="#{msg.allow_categorization}" action="#{DialogManager.bean.applyClassifiable}" rendered="#{DialogManager.bean.locked == false}" />
</r:permissionEvaluator>
</a:panel>

<f:verbatim>
<div style="padding: 4px"></div>
</f:verbatim>

<a:panel label="#{msg.version_history}" id="version-history-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
rendered="#{DialogManager.bean.versionable && !NavigationBean.isGuest}"
expanded='#{DialogManager.bean.panels["version-history-panel"]}'
expandedActionListener="#{DialogManager.bean.expandPanel}">

<a:richList id="versionHistoryList" viewMode="details" value="#{DialogManager.bean.versionHistory}" var="r" styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
pageSize="10" initialSortColumn="versionDate" initialSortDescending="true">

<%– Primary column for details view mode –%>
<a:column id="col1" primary="true" width="100" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink label="#{msg.version}" value="versionLabel" mode="case-insensitive" styleClass="header" />
</f:facet>
<a:actionLink id="label-link" value="#{r.versionLabel}" href="#{r.url}" target="new" rendered="#{r.url != null}" />
<a:actionLink id="label-no-link" value="#{r.versionLabel}" rendered="#{r.url == null}" />
</a:column>

<%– Version notes columns –%>
<a:column id="col2" width="170" style="text-align:left">
<f:facet name="header">
<a:sortLink label="#{msg.notes}" value="notes" styleClass="header" />
</f:facet>
<h:outputText id="notes" value="#{r.notes}" />
</a:column>

<%– Description columns –%>
<a:column id="col3" style="text-align:left">
<f:facet name="header">
<a:sortLink label="#{msg.author}" value="author" styleClass="header" />
</f:facet>
<h:outputText id="author" value="#{r.author}" />
</a:column>

<%– Created Date column for details view mode –%>
<a:column id="col4" style="text-align:left; white-space:nowrap">
<f:facet name="header">
<a:sortLink label="#{msg.date}" value="versionDate" styleClass="header" />
</f:facet>
<h:outputText id="date" value="#{r.versionDate}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText>
</a:column>

<%– view the contents of the specific version –%>
<a:column id="col5" style="text-align: left">
<f:facet name="header">
<h:outputText value="#{msg.actions}" />
</f:facet>
<a:actionLink id="view-version-props" value="#{msg.properties}" action="dialog:showVersionedDetails" actionListener="#{VersionedDocumentDetailsDialog.setBrowsingVersion}">
<f:param id="pm1" name="id" value="#{DialogManager.bean.document.id}" />
<f:param id="pm2" name="versionLabel" value="#{r.versionLabel}" />
</a:actionLink>
<h:outputText id="space" value=" " />
<a:actionLink id="view-link" value="#{msg.view}" href="#{r.url}" target="new" rendered="#{r.url != null}" />
</a:column>

<a:dataPager styleClass="pager" id="pager-version-history" />
</a:richList>
</a:panel>
<a:panel label="#{msg.version_history}" id="no-version-history-panel" progressive="true" border="white"
bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
rendered="#{DialogManager.bean.versionable == false && !NavigationBean.isGuest}"
expanded='#{DialogManager.bean.panels["version-history-panel"]}'
expandedActionListener="#{DialogManager.bean.expandPanel}">
<h:outputText id="no-history-msg" value="#{msg.not_versioned}<br/><br/>" escape="false" />
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="eval_ver">
<a:actionLink id="make-versionable" value="#{msg.allow_versioning}" action="#{DialogManager.bean.applyVersionable}" rendered="#{DialogManager.bean.locked == false}" />
</r:permissionEvaluator>
</a:panel>
<f:verbatim>
</td>

<td valign="top">

</f:verbatim>
<%– Document Actions –%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center" progressive="true"
expanded='#{DialogManager.bean.panels["actions-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
<r:actions id="actions_doc" value="doc_details_actions" context="#{DialogManager.bean.document}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel>
<f:verbatim>
</td>
</tr>
</table>
</f:verbatim>

Je ne sais pas si c'est bien joli de modifier le javascript comme ça en virant des panels mais c'est la seule solution que j'ai trouvée.
Voilà, en espérant que ça puisse aider des gens un de ces jours!