Add link to Admin section?

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member

Add link to Admin section?

How can I add a new link to this section?

5 Replies
Moderator
Moderator

Re: Add link to Admin section?

Which admin screen you are referring to ? Share admin tools or Alfresco admin console ?

For adding addition option to Share admin tools, you need to create a custom component and append to the admin tools AIKAU page. 

Same way you can customize for Alfresco Admin console.

Refer: 

https://docs.alfresco.com/6.1/concepts/adminconsole-custom-example.html

https://docs.alfresco.com/6.1/references/dev-extension-points-custom-admin-console.html

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)
Active Member

Re: Add link to Admin section?

Sorry for my English İ add the pic my post İdont know its share or alfresco admin page...

Moderator
Moderator

Re: Add link to Admin section?

So you want to add another link to the home screen of alfresco. All the links you see in the attached screen shot are added to the index.jsp page packaged as part of the alfresco.war file. 

I am not aware of any other approach but If you can overlay the war file during the build, you should be able to add additional link to the index.jsp page and package it as part of alfresco.war along with all your custom modules. 

I have highlighted all the links which you already see and added a custom link into it. 

Here is the index.jsp file:

<%--
#%L
Alfresco Repository WAR Community
%%
Copyright (C) 2005 - 2016 Alfresco Software Limited
%%
This file is part of the Alfresco software.
If the software was purchased under a paid Alfresco license, the terms of
the paid license agreement will prevail. Otherwise, the software is
provided under the following open source license terms:

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

Alfresco 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
#L%
--%>

<%@ page import="org.springframework.web.context.WebApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ page import="org.alfresco.repo.admin.SysAdminParams" %>
<%@ page import="org.alfresco.service.descriptor.DescriptorService" %>
<%@ page import="org.alfresco.service.transaction.TransactionService" %>
<%@ page import="org.alfresco.util.UrlUtil" %>
<%@ page import="org.alfresco.service.cmr.module.ModuleService" %>
<%@ page import="org.alfresco.service.cmr.module.ModuleDetails" %>
<%@ page import="org.alfresco.service.cmr.module.ModuleInstallState" %>
<%@ page import="java.util.Calendar" %>

<!-- Enterprise index-jsp placeholder -->
<%
// route WebDAV requests
if (request.getMethod().equalsIgnoreCase("PROPFIND") || request.getMethod().equalsIgnoreCase("OPTIONS"))
{
response.sendRedirect(request.getContextPath() + "/webdav/");
}
%>

<%
WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext());
SysAdminParams sysAdminParams = (SysAdminParams)context.getBean("sysAdminParams");
DescriptorService descriptorService = (DescriptorService)context.getBean("descriptorComponent");
TransactionService transactionService = (TransactionService)context.getBean("transactionService");
ModuleService moduleService = (ModuleService) context.getBean("moduleService");
ModuleDetails shareServicesModule = moduleService.getModule("alfresco-share-services");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Alfresco</title>
<link rel="stylesheet" type="text/css" href="./css/reset.css" />
<link rel="stylesheet" type="text/css" href="./css/alfresco.css" />
</head>
<body>
<div class="sticky-wrapper">
<div class="index">

<div class="title">
<span class="logo"><a href="http://www.alfresco.com"><img src="./images/logo/logo.png" width="145" height="48" alt="" border="0" /></a></span>
<span class="logo-separator"> </span>
<h1>Welcome to Alfresco</h1>
</div>

<div class="index-list">
<h4><%=descriptorService.getServerDescriptor().getEdition()%> - <%=descriptorService.getServerDescriptor().getVersion()%></h4>
<p></p>
<p><a href="http://docs.alfresco.com/">Online Documentation</a></p>
<p></p>
<%
if (shareServicesModule != null && ModuleInstallState.INSTALLED.equals(shareServicesModule.getInstallState()))
{
%>
<p><a href="<%=UrlUtil.getShareUrl(sysAdminParams)%>">Alfresco Share</a></p>
<p></p>
<%
}
%>
<p><a href="./webdav">Alfresco WebDav</a></p>
<p></p>
<p><a href="./s/index">Alfresco WebScripts Home</a> (admin only)</p>
<%
if (descriptorService.getLicenseDescriptor() == null && transactionService.isReadOnly())
{
%>
<p>WARNING: The system is in Read Only mode, the License may have failed to deploy. Please visit the <a href="./s/enterprise/admin">Alfresco Administration Console</a> (admin only)</p>
<%
}
if (descriptorService.getLicenseDescriptor() != null && descriptorService.getLicenseDescriptor().getLicenseMode().toString().equals("ENTERPRISE"))
{
%>
<p><a href="./s/enterprise/admin">Alfresco Administration Console</a> (admin only)</p>
<p></p>
<p><a href="http://support.alfresco.com">Alfresco Support</a></p>
<%
}
else
{
%>
<p><a href="./s/admin">Alfresco Administration Console</a> (admin only)</p>
<p></p>
<p><a href="http://forums.alfresco.com/">Alfresco Forums</a></p>
<p><a href="http://issues.alfresco.com/">Alfresco JIRA</a></p>
<%
}
%>
<p></p>
<p><a href="./api/-default-/public/cmis/versions/1.0/atom">CMIS 1.0 AtomPub Service Document</a></p>
<p><a href="./cmisws/cmis?wsdl">CMIS 1.0 Web Services WSDL Document</a></p>
<p><a href="./api/-default-/public/cmis/versions/1.1/atom">CMIS 1.1 AtomPub Service Document</a></p>
<p><a href="./api/-default-/public/cmis/versions/1.1/browser">CMIS 1.1 Browser Binding URL</a></p>

//Your new link here:

<p><a href="www.xyz.com">Custom Link</a></p>
</div>

</div>
<div class="push"></div>
</div>
<div class="footer">
Alfresco Software, Inc. &copy; 2005-<%=Calendar.getInstance().get(Calendar.YEAR)%> All rights reserved.
</div>
</body>
</html>

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)
Active Member

Re: Add link to Admin section?

Thank you.Have a nice days

Active Member

Re: Add link to Admin section?

ChangeHot deploymentDynamic reloading
Change an existing JavaServer Pages file.Not applicableYes
Add a new JSP file to an existing application.YesYes
Change an existing servlet class by editing and recompiling.Not applicableYes
Change a dependent class of an existing servlet class.Not applicableYes
Add a new servlet using the Invoker (Serve Servlets by class name) facility or add a dependent class...YesNot applicable
Add a new servlet, including a new definition of the servlet in the web.xml deployment descriptor fo...YesNot applicable
Change the web.xml file of a WAR file.YesYes
Change the ibm-web-ext.xmi file of a WAR file.Not applicableYes
Change the ibm-web-bnd.xmi file of a WAR file.Not applicableYes

Find the war files in alfresco  /tomcat/webapps/alfresco/index.jsp and edit like Abhinav Mishra answer than save and exit.

Bingo *jsp file means new file will be automatically detected and compiled on the first request to the page...