resourceService.createTagLikeResourceParent(adminSession, null, PeopleTypes.PEOPLE_MAILING_LIST, null,
getBasePath(null), PeopleTypes.PEOPLE_ENTITY, PeopleNames.PEOPLE_MAILING_LISTS);
+ // Initialise catalogues
+ importCatalogue(adminSession, initResources.get("SimpleTasks"), PeopleTypes.PEOPLE_TASK);
+
if (adminSession.hasPendingChanges()) {
adminSession.save();
log.info("Resources have been added to Argeo Suite model");
scope="prototype">
<property name="repository" ref="repository" />
</bean>
-
+
<bean id="openEntityEditor" class="org.argeo.suite.workbench.commands.OpenEntityEditor"
scope="prototype">
<property name="repository" ref="repository" />
<bean id="defaultDashboardEditor" class="org.argeo.suite.workbench.parts.DefaultDashboardEditor"
scope="prototype">
<property name="repository" ref="repository" />
- <property name="peopleService" ref="peopleService" />
<property name="appWorkbenchService" ref="appWorkbenchService" />
+ <property name="peopleService" ref="peopleService" />
+ <property name="documentsService" ref="documentsService" />
</bean>
</beans>
<perspective
class="org.argeo.suite.workbench.DashboardPerspective"
id="org.argeo.suite.workbench.rap.dashboardPerspective"
- icon="theme/argeo-classic/icons/favicon-16px.png"
+ icon="theme/argeo-classic/icons/favicon.ico"
name="Dashboard">
</perspective>
</extension>
<!-- VIEWS -->
<extension
point="org.eclipse.ui.views">
- <view
+ <!-- <view
id="org.argeo.connect.people.workbench.rap.quickSearchView"
class="org.argeo.eclipse.spring.SpringExtensionFactory"
icon="theme/argeo-classic/icons/favicon-16px.png"
name="Test View"
restorable="true">
- </view>
+ </view> -->
</extension>
<!-- EDITORS -->
<editor
id="org.argeo.suite.workbench.rap.defaultDashboardEditor"
class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="theme/argeo-classic/icons/favicon-16px.png"
+ icon="theme/argeo-classic/icons/dashboard.gif"
name="My Dashboard">
</editor>
</extension>
<branding
id="org.argeo.suite.workbench.rap.defaultBranding"
themeId="org.eclipse.rap.rwt.theme.Default"
- title="Smart Data Productivity Suite"
- favicon="theme/argeo-classic/icons/favicon.png">
+ title="Argeo Suite"
+ favicon="theme/argeo-classic/icons/favicon.ico">
<additionalHeaders>
<link
href="suite/theme/classic-headerExt.css"
</resource>
<!-- images -->
<resource
- alias="/ui/suite/img/logo.jpg"
- base-name="theme/argeo-classic/img/logo.jpg">
+ alias="/ui/suite/img/logo-argeo.png"
+ base-name="theme/argeo-classic/img/logo-argeo.png">
</resource>
<!-- javascript libraries -->
<!-- <resource
package org.argeo.suite.workbench.parts;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.Session;
+import org.argeo.cms.ui.workbench.util.CommandUtils;
import org.argeo.cms.util.CmsUtils;
+import org.argeo.connect.documents.DocumentsService;
import org.argeo.connect.people.PeopleService;
import org.argeo.connect.people.workbench.rap.PeopleStyles;
import org.argeo.connect.people.workbench.rap.editors.util.EntityEditorInput;
import org.argeo.jcr.JcrUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
// DEPENDENCY INJECTION
private Repository repository;
private PeopleService peopleService;
+ private DocumentsService documentsService;
private AppWorkbenchService appWorkbenchService;
private Session session;
return bodyCmp;
}
+ protected Link createOpenEntityEditorLink(final AppWorkbenchService peopleUiService, Composite parent,
+ final String label, final Node entity) {
+ Link link = new Link(parent, SWT.NONE);
+ link.setText("<a>" + label + "</a>");
+ link.setLayoutData(EclipseUiUtils.fillWidth());
+ link.addSelectionListener(new SelectionAdapter() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ Map<String, String> params = new HashMap<String, String>();
+ // FIXME
+ params.put("param.jcrId", ConnectJcrUtils.getIdentifier(entity));
+ CommandUtils.callCommand(peopleUiService.getOpenEntityEditorCmdId(), params);
+ }
+ });
+ return link;
+ }
+
// LIFE CYCLE
@Override
public void dispose() {
return logoImg;
}
+ protected DocumentsService getDocumentsService() {
+ return documentsService;
+ }
+
protected FormToolkit getFormToolkit() {
return toolkit;
}
this.appWorkbenchService = appWorkbenchService;
}
+ public void setDocumentsService(DocumentsService documentsService) {
+ this.documentsService = documentsService;
+ }
+
public void setPeopleService(PeopleService peopleService) {
this.peopleService = peopleService;
}
CmsUtils.markup(headerLbl);
// Images are declared via the resources extension point in plugin.xml
String headerStr = "<a href=\"http://argeo.org\" "
- + "title=\"Smart Data Productivity Suite, by Argeo\" target=\"_blank\"> "
- + "<img src=\"/ui/suite/img/logo.jpg\" width=\"200\" height=\"140\"></img> " + "</a>";
+ + "title=\"Smart Data Productivity Suite by Argeo\" target=\"_blank\"> "
+ + "<img src=\"/ui/suite/img/logo-argeo.png\" width=\"250\" height=\"250\"></img> " + "</a>";
headerLbl.setText(headerStr);
GridData gd = new GridData(SWT.LEFT, SWT.CENTER, true, false);
headerLbl.setLayoutData(gd);
String titleStr = "<big> Please sign in to your personal dashboard</big>";
titleLbl.setText(titleStr);
gd = new GridData(SWT.CENTER, SWT.BOTTOM, false, false);
- gd.verticalIndent = 80;
+ // gd.verticalIndent = 40;
titleLbl.setLayoutData(gd);
// Login composite
gd.verticalIndent = 15;
loginCmp.setLayoutData(gd);
- // Footer
- Label footerLbl = new Label(bodyCmp, SWT.WRAP | SWT.CENTER);
- CmsUtils.markup(footerLbl);
- String footerStr = "<small>SDPS is a private service. <br/>"
- + " Please <a href=\"mailto:contact@argeo.org\">contact us</a> if you have any question.</small>";
- footerLbl.setText(footerStr);
- footerLbl.setLayoutData(EclipseUiUtils.fillWidth());
+ // // Footer
+ // Label footerLbl = new Label(bodyCmp, SWT.WRAP | SWT.CENTER);
+ // CmsUtils.markup(footerLbl);
+ // String footerStr = "<small>SDPS is a private service. <br/>"
+ // + " Please <a href=\"mailto:contact@argeo.org\">contact us</a> if you
+ // have any question.</small>";
+ // footerLbl.setText(footerStr);
+ // footerLbl.setLayoutData(EclipseUiUtils.fillWidth());
}
}