SiteScripts/Links.json
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json", "actions": [ { "verb": "createSPList", "listName": "Links", "templateType": 103, "subactions": [ { "verb": "addSPFieldXml", "schemaXml": "<Field ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Type=\"Text\" Name=\"Title\" DisplayName=\"Title\" Required=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" FromBaseType=\"TRUE\" ReadOnly=\"FALSE\" Hidden=\"FALSE\" Group=\"Injury Report Group\" EnforceUniqueValues=\"FALSE\" CanToggleHidden=\"FALSE\" MaxLength=\"75\" Sealed=\"FALSE\" />" }, { "verb": "addSPFieldXml", "schemaXml": "<Field ID=\"{9da97a8a-1da5-4a77-98d3-4bc10456e700}\" Type=\"Note\" Name=\"Comments\" DisplayName=\"Notes\" Sortable=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Comments\" />" }, { "verb": "addSPFieldXml", "schemaXml": "<Field CustomFormatter=\"{"elmType":"div","style":{"flex-wrap":"wrap","display":"flex"},"children":[{"elmType":"div","style":{"box-sizing":"border-box","padding":"4px 8px 5px 8px","display":"flex","border-radius":"16px","height":"24px","align-items":"center","white-space":"nowrap","overflow":"hidden","margin":"4px 4px 4px 4px"},"attributes":{"class":{"operator":":","operands":[{"operator":"==","operands":["@currentField","Homepage"]},"sp-css-backgroundColor-blueBackground37",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Manage"]},"sp-css-backgroundColor-successBackground50",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Security"]},"sp-css-backgroundColor-warningBackground50",{"operator":":","operands":[{"operator":"==","operands":["@currentField",""]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Usage"]},"sp-css-backgroundColor-blockingBackground50","sp-field-borderAllRegular sp-field-borderAllSolid sp-css-borderColor-neutralSecondary"]}]}]}]}]}},"children":[{"elmType":"span","style":{"line-height":"16px","height":"14px"},"attributes":{"iconName":{"operator":":","operands":[{"operator":"==","operands":["@currentField","Homepage"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Manage"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Security"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField",""]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Usage"]},"",""]}]}]}]}]}}},{"elmType":"span","style":{"overflow":"hidden","text-overflow":"ellipsis","padding":"0 3px"},"txtContent":"@currentField","attributes":{"class":{"operator":":","operands":[{"operator":"==","operands":["@currentField","Homepage"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Manage"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Security"]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField",""]},"",{"operator":":","operands":[{"operator":"==","operands":["@currentField","Usage"]},"",""]}]}]}]}]}}}]}],"templateId":"BgColorChoicePill"}\" DisplayName=\"Category\" FillInChoice=\"FALSE\" Format=\"Dropdown\" Name=\"Category\" Title=\"Category\" Type=\"Choice\" ID=\"{04ae03da-6528-4fa6-974f-9c0bb43414f7}\" StaticName=\"Category\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\"><Default>Security</Default><CHOICES><CHOICE>Security</CHOICE><CHOICE>Manage</CHOICE><CHOICE>Usage</CHOICE><CHOICE>Admin</CHOICE></CHOICES></Field>" }, { "verb": "addSPFieldXml", "schemaXml": "<Field ID=\"{7a7f3660-d408-4734-9aa0-2d86e33d79ab}\" ReadOnly=\"TRUE\" Filterable=\"FALSE\" Type=\"Computed\" Name=\"URLwMenu2\" DisplayName=\"URL\" DisplayNameSrcField=\"URL\" ClassInfo=\"Menu\" AuthoringInfo=\"(URL with edit menu) (old)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"URLwMenu2\"><FieldRefs><FieldRef Name=\"URL\" /><FieldRef Name=\"FileLeafRef\" /><FieldRef Name=\"FileRef\" /><FieldRef Name=\"FSObjType\" /><FieldRef Name=\"_EditMenuTableStart\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Field Name=\"FileLeafRef\" /></Then><Else><Field Name=\"URL\" /></Else></IfEqual></Case><Default><Field Name=\"_EditMenuTableStart\" /><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Switch><Expr><GetVar Name=\"RecursiveView\" /></Expr><Case Value=\"1\"><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"javascript:SubmitFormPost()\" onclick='javascript:ClearSearchTerm(\"]]></HTML><GetVar Name=\"View\" /><HTML><![CDATA[\");ClearSearchTerm(\"\");javascript:SubmitFormPost(\"]]></HTML><SetVar Name=\"RootFolder\"><HTML>/</HTML><LookupColumn Name=\"FileRef\" /></SetVar><ScriptQuote NotAddingQuote=\"TRUE\"><FilterLink Default=\"\" Paged=\"FALSE\" /></ScriptQuote><HTML><![CDATA[\");javascript:return false;'>]]></HTML><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[</a>]]></HTML></Default></Switch></Then><Else><Switch><Expr><Column Name=\"URL\" /></Expr><Case Value=\"\"><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><FieldSwitch><Expr><FieldProperty Name=\"URL\" Select=\"Format\" /></Expr><Case Value=\"Image\"><HTML><![CDATA[<img onfocus=\"OnLink(this)\" src=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML>\" alt=\"</HTML><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\" />]]></HTML></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\">]]></HTML><Switch><Expr><Column2 Name=\"URL\" /></Expr><Case Value=\"\"><Column Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Default></Switch><HTML><![CDATA[</a>]]></HTML></Default></FieldSwitch></Default></Switch></Else></IfEqual><Field Name=\"_EditMenuTableEnd\" /></Default></FieldSwitch></DisplayPattern></Field>" }, { "verb": "addSPFieldXml", "schemaXml": "<Field ID=\"{2a9ab6d3-268a-4c1c-9897-e5f018f87e64}\" ReadOnly=\"TRUE\" Filterable=\"FALSE\" Type=\"Computed\" Name=\"URLwMenu\" DisplayName=\"URL\" DisplayNameSrcField=\"URL\" ClassInfo=\"Menu\" AuthoringInfo=\"(URL with edit menu)\" ListItemMenuAllowed=\"Required\" LinkToItemAllowed=\"Prohibited\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"URLwMenu\"><FieldRefs><FieldRef Name=\"URL\" /><FieldRef Name=\"FileLeafRef\" /><FieldRef Name=\"FileRef\" /><FieldRef Name=\"FSObjType\" /><FieldRef Name=\"_EditMenuTableStart2\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Field Name=\"FileLeafRef\" /></Then><Else><Field Name=\"URL\" /></Else></IfEqual></Case><Default><HTML><![CDATA[<div class=\"ms-vb itx\" onmouseover=\"OnItem(this)\" CTXName=\"ctx]]></HTML><Field Name=\"_EditMenuTableStart2\" /><HTML><![CDATA[\">]]></HTML><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Switch><Expr><GetVar Name=\"RecursiveView\" /></Expr><Case Value=\"1\"><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"javascript:SubmitFormPost()\" onclick='javascript:ClearSearchTerm(\"]]></HTML><GetVar Name=\"View\" /><HTML><![CDATA[\");ClearSearchTerm(\"\");SubmitFormPost(\"]]></HTML><SetVar Name=\"RootFolder\"><HTML>/</HTML><LookupColumn Name=\"FileRef\" /></SetVar><ScriptQuote NotAddingQuote=\"TRUE\"><FilterLink Default=\"\" Paged=\"FALSE\" /></ScriptQuote><HTML><![CDATA[\");javascript:return false;'>]]></HTML><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[</a>]]></HTML></Default></Switch></Then><Else><Switch><Expr><Column Name=\"URL\" /></Expr><Case Value=\"\"><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><FieldSwitch><Expr><FieldProperty Name=\"URL\" Select=\"Format\" /></Expr><Case Value=\"Image\"><HTML><![CDATA[<img onfocus=\"OnLink(this)\" src=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML>\" alt=\"</HTML><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\" />]]></HTML></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\">]]></HTML><Switch><Expr><Column2 Name=\"URL\" /></Expr><Case Value=\"\"><Column Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Default></Switch><HTML><![CDATA[</a>]]></HTML></Default></FieldSwitch></Default></Switch></Else></IfEqual><HTML><![CDATA[</div>]]></HTML><HTML><![CDATA[<div class=\"s4-ctx\" onmouseover=\"OnChildItem(this.parentNode); return false;\">]]></HTML><HTML><![CDATA[<span> </span>]]></HTML><HTML><![CDATA[<a onfocus=\"OnChildItem(this.parentNode.parentNode); return false;\" onclick=\"PopMenuFromChevron(event); return false;\" href=\"javascript:;\" title=\"Open Menu\"></a>]]></HTML><HTML><![CDATA[<span> </span>]]></HTML><HTML><![CDATA[</div>]]></HTML></Default></FieldSwitch></DisplayPattern></Field>" }, { "verb": "addSPFieldXml", "schemaXml": "<Field ID=\"{aeaf07ee-d2fb-448b-a7a3-cf7e062d6c2a}\" DisplaceOnUpgrade=\"TRUE\" ReadOnly=\"TRUE\" Filterable=\"FALSE\" Type=\"Computed\" Name=\"URLNoMenu\" DisplayName=\"URL\" DisplayNameSrcField=\"URL\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"URLNoMenu\"><FieldRefs><FieldRef Name=\"URL\" /><FieldRef Name=\"FileLeafRef\" /><FieldRef Name=\"FileRef\" /><FieldRef Name=\"FSObjType\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Field Name=\"FileLeafRef\" /></Then><Else><Field Name=\"URL\" /></Else></IfEqual></Case><Default><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Switch><Expr><GetVar Name=\"RecursiveView\" /></Expr><Case Value=\"1\"><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"javascript:SubmitFormPost()\" onclick='javascript:ClearSearchTerm(\"]]></HTML><GetVar Name=\"View\" /><HTML><![CDATA[\");ClearSearchTerm(\"\");javascript:SubmitFormPost(\"]]></HTML><SetVar Name=\"RootFolder\"><HTML>/</HTML><LookupColumn Name=\"FileRef\" /></SetVar><ScriptQuote NotAddingQuote=\"TRUE\"><FilterLink Default=\"\" Paged=\"FALSE\" /></ScriptQuote><HTML><![CDATA[\");javascript:return false;'>]]></HTML><LookupColumn Name=\"FileLeafRef\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[</a>]]></HTML></Default></Switch></Then><Else><Switch><Expr><Column Name=\"URL\" /></Expr><Case Value=\"\"><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><FieldSwitch><Expr><FieldProperty Name=\"URL\" Select=\"Format\" /></Expr><Case Value=\"Image\"><HTML><![CDATA[<img onfocus=\"OnLink(this)\" src=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML>\" alt=\"</HTML><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\" />]]></HTML></Case><Default><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><Column Name=\"URL\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\">]]></HTML><Switch><Expr><Column2 Name=\"URL\" /></Expr><Case Value=\"\"><Column Name=\"URL\" HTMLEncode=\"TRUE\" /></Case><Default><Column2 Name=\"URL\" HTMLEncode=\"TRUE\" /></Default></Switch><HTML><![CDATA[</a>]]></HTML></Default></FieldSwitch></Default></Switch></Else></IfEqual></Default></FieldSwitch></DisplayPattern></Field>" }, { "verb": "addSPView", "name": "All Links", "viewFields": [ "DocIcon", "Edit", "URLwMenu", "Comments", "Category" ], "query": "<OrderBy><FieldRef Name=\"Order\" Ascending=\"TRUE\" /></OrderBy>", "rowLimit": 30, "isPaged": true, "makeDefault": true, "replaceViewFields": true }, { "verb": "addSPView", "name": "Security", "viewFields": [ "URLNoMenu", "Comments" ], "query": "<OrderBy><FieldRef Name=\"URLNoMenu\" /></OrderBy><Where><Eq><FieldRef Name=\"Category\" /><Value Type=\"Text\">Security</Value></Eq></Where>", "rowLimit": 30, "isPaged": true, "replaceViewFields": true }, { "verb": "addSPView", "name": "Manage", "viewFields": [ "URLNoMenu", "Comments" ], "query": "<OrderBy><FieldRef Name=\"URLNoMenu\" /></OrderBy><Where><Eq><FieldRef Name=\"Category\" /><Value Type=\"Text\">Manage</Value></Eq></Where>", "rowLimit": 30, "isPaged": true, "replaceViewFields": true }, { "verb": "addSPView", "name": "Usage", "viewFields": [ "URLNoMenu", "Comments" ], "query": "<OrderBy><FieldRef Name=\"URLNoMenu\" /></OrderBy><Where><Eq><FieldRef Name=\"Category\" /><Value Type=\"Text\">Usage</Value></Eq></Where>", "rowLimit": 30, "isPaged": true, "replaceViewFields": true }, { "verb": "addSPView", "name": "Admin", "viewFields": [ "URLwMenu", "Comments" ], "query": "<OrderBy><FieldRef Name=\"URLNoMenu\" /></OrderBy><Where><Eq><FieldRef Name=\"Category\" /><Value Type=\"Text\">Admin</Value></Eq></Where>", "rowLimit": 30, "isPaged": true, "replaceViewFields": true } ] } ] } |