Create and Manage Workspaces

The Workspaces architecture provides a method to dynamically add pages to Anthology Student. Workspaces provide an opportunity for institutions to refine how their users can see and interact with Anthology Student without changing the underlying functionality or business logic.

Workspaces are always on, there is no registry key or setting to enable workspaces. However, if no workspace is created, no choices show for workspace selection within the staff group. A workspace is created as a script which then makes the workspace available as a choice for the staff group.

Once created, they are available as an option to the staff groups. Workspaces are associated with a staff group to allow users in that staff group to have a customized home page experience. If a user is associated with multiple staff groups and each staff group has an associated workspace, they can select which workspace they prefer to be their default workspace.

How Workspaces Function

A workspace is a dynamic web page with a unique URL slug that when rendered, retrieves all the associated components for that workspace and renders them on the page based on a specific region specification, and in a given order specified.

Example of Workspace

These workspaces are driven by SQL data. The application will find a matching URL slug and render components on the page based on records in the SQL Tables.

There are three primary SQL tables: workspace, component, and workspacecomponent which join the workspace table to the component tables.

Workspace Table

The workspace table represents a workspace with a unique URL slug.

Column Name Definition
WorkspaceIdentifier Unique identifier (GUID) for a given workspace. (Can be used to update an existing workspace).
Name Given name of the workspace. This is when you assign a workspace to a staff group or, as a user, you pick your default workspace.
UrlSlug Unique URL fragment that instructs the application which workspace to render.
UserId User ID of the user who is adding the workspace.
DateAdded Date/time it was added.
DateLstMod Date/time it was last modified.

Component Table

The component table represents a component or HTML fragment.

Column Name Definition
ComponentIdentifier The unique identifier (GUID) for a given Component. (Can be used to update an existing component).
Name Name of a given component.
Template An HTML fragment that AngularJs uses to render a component. It can also be plain HTML.
Binding Deprecated.
DateAdded The date/time the component was added.
DateLstMod The date/time the component was last modified.
UserId The user ID of the user who is adding the component.

WorkspaceComponent Table

The workspacecomponent table defines the list of components to render to a workspace.

Column Name Definition
WorkspaceComponentIdentifier Unique identifier (GUID) for a given workspace. (Can be used to update an existing workspace).
WorkspaceId Workspace ID for the associated workspace.
ComponentId Component ID for the associated component.
Bindings JSON representation of the custom settings a component will use to render (For example: the tile label, what URL a tile should point to, etc.).
Region Specifies where on the page the component should be rendered. (If root is specified, it will be rendered as the first template for the entire page).
SortOrder Specifies in what order a component should be rendered on the specified region.
StateParams URL parameters to pass to the component.
UrlSlug Deprecated.
NsaOperations When provided a list of strings of NSA permissions, the component will not be rendered for a user who is not in one of those permissions.
IsActive When false, the component will not render (The default is true).
DateAdded The date/time the workspace-component was added.
DateLstMod The date/time the workspace-component was last modified.
UserId The user id of the user who is adding the workspace-component.

Additional Information on Regions

The workspaces have one or many regions. The root region represents the region that renders first and is the layout for the entire page. Below is an example of the root region with specified sub-regions:

<div class="ws-heading-row"> <h1>Home - Workspace</h1> </div> <div class="ws-container-main"> <div class="ws-flex-1 wide"> <h3 class="ws-region-heading" translate>Summary</h3> <div class="cns-tile-set cns-workspace-region-summary"> </div> </div> <div class="ws-flex-2 wide"> <h3 class="ws-region-heading" translate>Navigate</h3> <div class="cns-tile-set cns-workspace-region-navigate"> </div> </div> <div class="ws-flex-recent"> <h3 class="ws-region-heading" translate>Recent</h3> <div class="cns-tile-set cns-workspace-region-recent"> </div> </div> <div class="ws-flex-2 cns-workspace-region-messages"> </div> <div class="ws-flex-2-wide cns-workspace-region-power-bi"> <h3 class="ws-region-heading" translate>Power BI</h3> </div> </div>

In the root class, specifying a class name on any element cns-workspace-region-<region name> causes the components with that region to render inside that element.

For example, the following insert statement causes a tile component to render inside the <div> element with the class name cns-workspace-region-summary.

INSERT INTO [dbo].[WorkspaceComponent] ([WorkspaceComponentIdentifier] ,[WorkspaceId] ,[ComponentId] ,[Bindings] ,[Region] ,[SortOrder] ,[StateParams] ,[UrlSlug] ,[NsaOperations] ,[IsActive] ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES (@HomeWorkspace_TotalProspects_WorkspaceComponentId ,@WorkspaceId ,@WorkspaceTileComponentId ,'{ "cns-label": "{{''Total Prospects'' | translate}}", "cns-class": "tile-secondary wide", "cns-query": "/ProspectInquiries?$format=json&$top=0&$count=true", "cns-skip-count": "false", "cns-disabled": "true", "cns-is-decimal": "true" }' ,'summary' ,0 ,null ,null ,'' ,1 ,GETDATE() ,GETDATE() ,1)

Additional Information on Tile Component Workspace Bindings

Bindings are a feature in AngularJs. Bindings pass information to a component that instructs it how to render itself. Bindings are listed in the WorkspaceComponent table as a JSON string. For example:

Bindings = '{ "cns-id": "urlTileLinkToIframe", "cns-label": "{{''Link to Iframe'' | translate}}", "cns-class": "tile-primary wide", "cns-location": "workspaces/iframe", "cns-font-set": "fa", "cns-font-name": "arrow-right" }'

Tile component binding list for a workspace tile component:

Column Name          Definition
cns-id The ID placed on the tile element.
cns-label The label displayed on the tile.
cns-url Performs a full URL redirect to a different web page.
cns-location The URL fragment after the #. Does not perform a full redirect.
cns-open-new Opens a new tab. (Does not work with cns-location)
cns-class A CSS class that is added to the parent DOM element.
cns-disabled Does not allow to be selected when true.
cns-live-class When using live tile options, adds a CSS class to the DOM element.
cns-font-set Prefix for which font set to use. (For example: cmc = Campus fonts, fa = Font Awesome)
cns-font-name

Font set to use.

  • Campus Fonts: blank, people, interactions, announce, events, settings, dashboard, logout, organization, kiosk, maps, back, menu, properties, filter, flag, chat, phone, edit, save, cr-back, student, save-send, search, add, insert, add-message, remove, undo, cancel, email, delete, personal, webform, reply, voip, fax, letter, schedule, cr, canned-responses, help, filter-active, search-active, data-views, form-builder, portal, query-builder, recruiter, web-client, workflow, report, expand, indent, outdent, arrow-right, filter-refresh, tiles-4, search-settings, remove-item, add-item, tasks, groups, document-tracking, standard-grid, standard-chart, standard-report, apply, ellipse, collapse, profile-male, profile-female, ferpa, export, import, accept-all, transfer-students, view-students, reassign, unlock, undo-override, merge, collapse-filled, expand-filled, expand-2, compress-2, distribute-equally, arrow-left, users-medical

  • Font Awesome (remove fa- prefix): https://fontawesome.com/v4.7.0/icons/

cns-query An OData URL that returns the count to be displayed on the tile.
cns-is-decimal Format large number as a decimal.
cns-skip-count When false, will turn off live tile number animation.

Manage Workspaces

Workspace helps to customize home screen. Once you have created workspaces, you need to assign workspaces to your staff group (Select the Settings tile > locate System > select Staff > select the Staff Groups tab, and select one or more workspaces for the staff group to have access). After assigning the workspaces to your staff group, you can use the Workspaces option from the user name drop-down list on the command bar. For more information, see the online help of Anthology Student.

Security

All workspaces, once created, are navigable via the URL. For example, if you create a workspace with the URL Slug sample, every user can then enter the URL/#/workspaces/sample and the page will render. In addition to controlling access to the workspace by selecting it for specific staff groups, you can secure workspace components using operations and authorizations in Anthology Student Security Console.

In the Component table, NsaOperations field, if the value is blank or null, then the component renders for all the users. When you add a comma delimited string of NSA Operations it causes that component to only render for those users who are approved for the operations. You could potentially add this field to a root-level component and then the only thing that will render if the user goes to a specific workspace URL is the navigation bar.

Once you have specified the operations, you can create tasks in Anthology Student Security Console that include the operations and then authorize users and groups for the tasks.

Additional Information on Iframe

The iframe is supported with certain browser restrictions. The specified iframe page must use HTTPS since the host page is HTTPS and it must not have any iframe header restrictions placed on it.

The SQL script in the following example creates a Home Page with a tile linking to an iframe workspace.

/************************************************************************************** * Home page with 1 tile that links to an workspace with an iframe on it ***************************************************************************************/ SET NOCOUNT ON; /************************************************************************************** * Unique Idendifiers to link workspaces and components together * (Ensure these are not already in Workspace, Component, and WorkspaceComponent tables) *****************************************************************************************/ --- Workspace.ID for home page workspace DECLARE @HomeWorkspaceIdentifier uniqueidentifier SELECT @HomeWorkspaceIdentifier = '18171A7E-87BE-419A-B7C0-CB9427AB2952' --- Workspace.ID for iframe page workspace DECLARE @IFrameWorkspaceIdentifier uniqueidentifier SELECT @IFrameWorkspaceIdentifier = 'A4BDEE91-985E-435B-BF31-64BE30D7210C' --- Component.Id for Home Page Root Layout Template DECLARE @HomeComponentIdentifier uniqueidentifier SELECT @HomeComponentIdentifier = '77F5521E-46D0-4EF8-B79C-754B9F5EC1D3' --- WorkspaceComponent.Id joining Home Workspace with Home Template component DECLARE @HomeWorkspace_HomeTemplate_WorkspaceComponentId uniqueidentifier SELECT @HomeWorkspace_HomeTemplate_WorkspaceComponentId = '688B1DE5-8681-4C67-8868-2EC205DCC3C1' --- WorkspaceComponent.Id joining Home Workspace with Workspace Tile component (Total Prospects Tile) DECLARE @HomeWorkspace_TotalProspects_WorkspaceComponentId uniqueidentifier SELECT @HomeWorkspace_TotalProspects_WorkspaceComponentId = 'D486D6B7-5C07-4183-9179-64CA6D8603FC' --- WorkspaceComponent.Id joining Home Workspace with Workspace Tile component (IFrame component) DECLARE @HomeWorkspace_Iframe_WorkspaceComponentId uniqueidentifier SELECT @HomeWorkspace_Iframe_WorkspaceComponentId = '453C0DEA-581B-482D-8793-912C3160CBE7' /*************************************************************** * Get existing component IDs ***************************************************************/ DECLARE @WorkspaceTileComponentId INT SELECT @WorkspaceTileComponentId = dbo.Component.Id FROM dbo.Component WHERE dbo.Component.ComponentIdentifier = 'D7DDDBB7-F114-42E5-A750-CD171923EE99' DECLARE @IFrameComponentId INT SELECT @IFrameComponentId = dbo.Component.Id FROM dbo.Component WHERE dbo.Component.ComponentIdentifier = '9339868C-076E-44D0-BECA-EDBB1B2ACA2E' /********************************************************************************* * Create/update home page workspace record *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[Workspace] WHERE [WorkspaceIdentifier] = @HomeWorkspaceIdentifier ) ) BEGIN PRINT 'Workspace Home Page - adding' INSERT INTO [dbo].[Workspace] ([WorkspaceIdentifier], [Name], UrlSlug, UserId, DateAdded, DateLstMod) VALUES ( @HomeWorkspaceIdentifier, -- Workspace.Id 'IFrame Home Page', -- Workspace.Name 'iframe-home', -- Workspace.UrlSlug 1, GETDATE(), GETDATE() ); END ELSE BEGIN PRINT 'Workspace Home Page Found - updating' UPDATE [dbo].[Workspace] SET Name = 'IFrame Home Page', UrlSlug = 'iframe-home', IsActive = 1, [UserId] = 1, [DateLstMod] = GETDATE() WHERE [WorkspaceIdentifier] = @HomeWorkspaceIdentifier; END DECLARE @WorkspaceId INT SELECT @WorkspaceId = dbo.Workspace.Id FROM dbo.Workspace WHERE dbo.Workspace.WorkspaceIdentifier = @HomeWorkspaceIdentifier /********************************************************************************* * Create/update home page tempalte (This contains HTML for entire section below nav bar *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[Component] WHERE [ComponentIdentifier] = @HomeComponentIdentifier ) ) BEGIN PRINT 'CREATE/UPDATE HOME PAGE LAYOUT COMPONENT not found - adding' INSERT INTO [dbo].[Component] ([ComponentIdentifier] ,[Name] ,[Template] ,[Bindings] ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES (@HomeComponentIdentifier ,'Home Page Layout' ,'<div class="ws-heading-row"> <h1 translate>Home</h1> </div> <div class="ws-container-main"> <div class="ws-flex-2 wide"> <h3 class="ws-region-heading" translate>Navigate</h3> <div class="cns-tile-set cns-workspace-region-navigate"> </div> </div> </div>' ,null ,GETDATE() ,GETDATE() ,1) END ELSE BEGIN PRINT 'CREATE/UPDATE HOME PAGE LAYOUT COMPONENT found - updating' UPDATE [dbo].[Component] SET Name = 'Home Page Layout', Template = '<div class="ws-heading-row"> <h1>Home - Workspace</h1> </div> <div class="ws-container-main"> <div class="ws-flex-2 wide"> <h3 class="ws-region-heading" translate>Navigate</h3> <div class="cns-tile-set cns-workspace-region-navigate"> </div> </div> </div>', [DateLstMod] = GETDATE() WHERE [ComponentIdentifier] = @HomeComponentIdentifier; END DECLARE @HomePageComponentId INT SELECT @HomePageComponentId = dbo.Component.Id FROM dbo.Component WHERE dbo.Component.ComponentIdentifier = @HomeComponentIdentifier /********************************************************************************* * Create/update Workspace/Component record that connects home workspace to home template. * This template should run at the root level of regions. *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[WorkspaceComponent] WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_HomeTemplate_WorkspaceComponentId ) ) BEGIN PRINT 'CREATE/UPDATE WORKSPACE--HOME PAGE TEMPLATE not found - adding' INSERT INTO [dbo].[WorkspaceComponent] ([WorkspaceComponentIdentifier] ,[WorkspaceId] ,[ComponentId] ,[Bindings] ,[Region] ,[SortOrder] ,[StateParams] ,[UrlSlug] ,[NsaOperations] ,[IsActive] ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES (@HomeWorkspace_HomeTemplate_WorkspaceComponentId ,@WorkspaceId ,@HomePageComponentId ,null ,'root' ,0 ,null ,null ,'' ,1 ,GETDATE() ,GETDATE() ,1) END ELSE BEGIN PRINT 'CREATE/UPDATE WORKSPACE--HOME PAGE TEMPLATE found - updating' UPDATE [dbo].[WorkspaceComponent] SET WorkspaceId = @WorkspaceId, ComponentId = @HomePageComponentId, Bindings = null, SortOrder = 0, IsActive = 1, [DateLstMod] = GETDATE() WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_HomeTemplate_WorkspaceComponentId; END /********************************************************************************* * Create/update the tile to be rendered on the home page. * It will be rendered at "navigate" region where DIV class cns-workspace-region-navigate *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[WorkspaceComponent] WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_TotalProspects_WorkspaceComponentId ) ) BEGIN PRINT 'CREATE/UPDATE WORKSPACE--IFRAME TILE not found - adding' INSERT INTO [dbo].[WorkspaceComponent] ([WorkspaceComponentIdentifier] ,[WorkspaceId] ,[ComponentId] ,[Bindings] ,[Region] ,[SortOrder] ,[StateParams] ,[UrlSlug] ,[NsaOperations] ,[IsActive] ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES (@HomeWorkspace_TotalProspects_WorkspaceComponentId ,@WorkspaceId ,@WorkspaceTileComponentId ,'{ "cns-id": "urlTileLinkToIframe", "cns-label": "{{''Link to Iframe'' | translate}}", "cns-class": "tile-primary wide", "cns-location": "workspaces/iframe2", "cns-font-set": "fa", "cns-font-name": "arrow-right", "cns-open-new": "true" }' ,'navigate' ,0 ,null ,null ,'' ,1 ,GETDATE() ,GETDATE() ,1) END ELSE BEGIN PRINT 'CREATE/UPDATE WORKSPACE--IFRAME TILE found - updating' UPDATE [dbo].[WorkspaceComponent] SET WorkspaceId = @WorkspaceId, ComponentId = @WorkspaceTileComponentId , Bindings = '{ "cns-id": "urlTileLinkToIframe", "cns-label": "{{''Link to Iframe'' | translate}}", "cns-class": "tile-primary wide", "cns-location": "workspaces/iframe2", "cns-font-set": "fa", "cns-font-name": "arrow-right", "cns-open-new": "true" }', Region = 'navigate', SortOrder = 0, IsActive = 1, [DateLstMod] = GETDATE() WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_TotalProspects_WorkspaceComponentId; END /********************************************************************************* * Create/update iframe page workspace record *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[Workspace] WHERE [WorkspaceIdentifier] = @IFrameWorkspaceIdentifier ) ) BEGIN PRINT 'CREATE/UPDATE IFRAME PAGE WORKSPACE RECORD - Not found adding' INSERT INTO [dbo].[Workspace] ( [WorkspaceIdentifier] ,[Name] ,UrlSlug ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES ( @IFrameWorkspaceIdentifier, -- Workspace.Id 'IFrame Example' -- Workspace.Name ,'iframe2' -- Workspace.UrlSlug ,GETDATE() ,GETDATE() ,1 ); END ELSE BEGIN PRINT 'CREATE/UPDATE IFRAME PAGE WORKSPACE RECORD Found - updating' UPDATE [dbo].[Workspace] SET Name = 'IFrame Example', UrlSlug = 'iframe2', IsActive = 1, [DateLstMod] = GETDATE() WHERE [WorkspaceIdentifier] = @IFrameWorkspaceIdentifier; END DECLARE @IFrameWorkspaceId INT SELECT @IFrameWorkspaceId = dbo.Workspace.Id FROM dbo.Workspace WHERE dbo.Workspace.WorkspaceIdentifier = @IFrameWorkspaceIdentifier /********************************************************************************* * Create/update add the iframe component at the root of the Iframe workspace *********************************************************************************/ IF( NOT EXISTS ( SELECT * FROM [dbo].[WorkspaceComponent] WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_Iframe_WorkspaceComponentId ) ) BEGIN PRINT 'CREATE/UPDATE WORKSPACE--IFRAME COMPONENT not found - adding' INSERT INTO [dbo].[WorkspaceComponent] ([WorkspaceComponentIdentifier] ,[WorkspaceId] ,[ComponentId] ,[Bindings] ,[Region] ,[SortOrder] ,[StateParams] ,[UrlSlug] ,[NsaOperations] ,[IsActive] ,[DateAdded] ,[DateLstMod] ,[UserId]) VALUES (@HomeWorkspace_Iframe_WorkspaceComponentId ,@IFrameWorkspaceId ,@IFrameComponentId ,'{ "cns-src": "http://community.campusmgmt.com/category/blog/" }' ,'root' ,0 ,null ,null ,'' ,1 ,GETDATE() ,GETDATE() ,1) END ELSE BEGIN PRINT 'CREATE/UPDATE WORKSPACE--IFRAME COMPONENT found - updating' UPDATE [dbo].[WorkspaceComponent] SET WorkspaceId = @IFrameWorkspaceId, ComponentId = @IFrameComponentId, Bindings = '{ "cns-src": "http://community.campusmgmt.com/category/blog/" }', Region = 'root', SortOrder = 0, IsActive = 1, [DateLstMod] = GETDATE() WHERE [WorkspaceComponentIdentifier] = @HomeWorkspace_Iframe_WorkspaceComponentId; END