<?xml version="1.0" encoding="utf-8"?>
<Template featureToggle="module:Helpdesk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServiceDesk" displayName="Service Desk" hidden="false" webTemplate="CMSPUBLISHING#0">
  <!-- Register instance in db   -->
  <Action xsi:type="ExecuteCodeAction">
    <Type>BusinessApp.AppService.V2.DomainLogic.SiteTemplateActions.InstanceCreator, BusinessApp.AppService</Type>
    <Method>RegisterInstanceCreated</Method>
    <Parameters>
      <Parameter type="System.String">{Web.FullUrl}</Parameter>
      <Parameter type="System.String">{Web.Title}</Parameter>
      <Parameter type="System.String">Helpdesk</Parameter>
      <Parameter type="System.String">Agile</Parameter>
      <Parameter type="System.String">None</Parameter>
    </Parameters>
  </Action>

  <Action xsi:type="CheckOutFileAction" src="{Pages}/default.aspx" />
  
  <!-- Add webpart(s)   -->
  <Action xsi:type="AddWebpartAction" src="{Pages}/default.aspx" scope="Web">
    <WebpartObject>
      <Webpart ZoneId="TopVar3" PartOrder="0">
        <webParts>
          <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
            <metaData>
              <type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
              <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
            </metaData>
            <data>
              <properties>
                <property name="ExportMode" type="exportmode">All</property>
                <property name="HelpUrl" type="string" />
                <property name="Hidden" type="bool">False</property>
                <property name="Description" type="string">Overview</property>
                <property name="Content" type="string"><![CDATA[ <div wizdom365-helpdesk-overview webpart-Properties='{"instanceIds":[{context.items["instanceId"]}] }'></div> ]]></property>
                <property name="CatalogIconImageUrl" type="string" />
                <property name="Title" type="string">TitleToChange</property>
                <property name="AllowHide" type="bool">True</property>
                <property name="AllowMinimize" type="bool">True</property>
                <property name="AllowZoneChange" type="bool">True</property>
                <property name="TitleUrl" type="string" />
                <property name="ChromeType" type="chrometype">None</property>
                <property name="AllowConnect" type="bool">True</property>
                <property name="Width" type="unit" />
                <property name="Height" type="unit" />
                <property name="HelpMode" type="helpmode">Navigate</property>
                <property name="AllowEdit" type="bool">True</property>
                <property name="TitleIconImageUrl" type="string" />
                <property name="Direction" type="direction">NotSet</property>
                <property name="AllowClose" type="bool">True</property>
                <property name="ChromeState" type="chromestate">Normal</property>
              </properties>
            </data>
          </webPart>
        </webParts>
      </Webpart>
      <Properties>
        <Property name="TitleToChange" value="Overview">
          <Translation target="Value" key="Overview" />
        </Property>
      </Properties>
    </WebpartObject>
  </Action>

  <!-- Set page properties and publish -->
  <Action xsi:type="SetPropertiesAction" src="{Pages}/default.aspx" scope="Web">
    <Properties>
      <Property name="Title" value="{Web.Title}">
        <Translation target="Value" key="Service Desk" />
      </Property>
      <Property name="ContentTypeId" value="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900E1A7B5EB4F6D4536ABA24236F66055A10009EAA0415C6C41B6BF661A416532A8FD" />
      <Property name="PublishingPageLayout" value="~sitecollection/_catalogs/masterpage/wizdom3ColumnType2.aspx" />
      <Property name="W365_HidePageContact" value="true"></Property>
      <Property name="W365_HideLeftMenu" value="true"></Property>
      <Property name="W365_HidePageInfo" value="true"></Property>
    </Properties>
  </Action>
  <Action xsi:type="CheckInFileAction" src="{Pages}/default.aspx" comment="Checked in by Wizdom Service Desk Management creation" checkInType="MajorCheckIn" />
  <Action xsi:type="PublishFileAction" src="{Pages}/default.aspx" comment="Published by Wizdom Service Desk Management creation" onErrorContinue="true" />
  <Action xsi:type="ApproveFileAction" src="{Pages}/default.aspx" comment="Approved by Wizdom Service Desk Management creation" onErrorContinue="true" />
  <!--Set navigation-->
  <Action xsi:type="SetNavigationAction" GlobalNavigationSource="" CurrentNavigationSource="PortalProvider" scope="Web"></Action>
</Template>

