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=\"{&quot;elmType&quot;:&quot;div&quot;,&quot;style&quot;:{&quot;flex-wrap&quot;:&quot;wrap&quot;,&quot;display&quot;:&quot;flex&quot;},&quot;children&quot;:[{&quot;elmType&quot;:&quot;div&quot;,&quot;style&quot;:{&quot;box-sizing&quot;:&quot;border-box&quot;,&quot;padding&quot;:&quot;4px 8px 5px 8px&quot;,&quot;display&quot;:&quot;flex&quot;,&quot;border-radius&quot;:&quot;16px&quot;,&quot;height&quot;:&quot;24px&quot;,&quot;align-items&quot;:&quot;center&quot;,&quot;white-space&quot;:&quot;nowrap&quot;,&quot;overflow&quot;:&quot;hidden&quot;,&quot;margin&quot;:&quot;4px 4px 4px 4px&quot;},&quot;attributes&quot;:{&quot;class&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Homepage&quot;]},&quot;sp-css-backgroundColor-blueBackground37&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Manage&quot;]},&quot;sp-css-backgroundColor-successBackground50&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Security&quot;]},&quot;sp-css-backgroundColor-warningBackground50&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Usage&quot;]},&quot;sp-css-backgroundColor-blockingBackground50&quot;,&quot;sp-field-borderAllRegular sp-field-borderAllSolid sp-css-borderColor-neutralSecondary&quot;]}]}]}]}]}},&quot;children&quot;:[{&quot;elmType&quot;:&quot;span&quot;,&quot;style&quot;:{&quot;line-height&quot;:&quot;16px&quot;,&quot;height&quot;:&quot;14px&quot;},&quot;attributes&quot;:{&quot;iconName&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Homepage&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Manage&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Security&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Usage&quot;]},&quot;&quot;,&quot;&quot;]}]}]}]}]}}},{&quot;elmType&quot;:&quot;span&quot;,&quot;style&quot;:{&quot;overflow&quot;:&quot;hidden&quot;,&quot;text-overflow&quot;:&quot;ellipsis&quot;,&quot;padding&quot;:&quot;0 3px&quot;},&quot;txtContent&quot;:&quot;@currentField&quot;,&quot;attributes&quot;:{&quot;class&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Homepage&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Manage&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Security&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Usage&quot;]},&quot;&quot;,&quot;&quot;]}]}]}]}]}}}]}],&quot;templateId&quot;:&quot;BgColorChoicePill&quot;}\" 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>&nbsp;</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>&nbsp;</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
        }
      ]
    }
  ]
}