Skip to content

Commit

Permalink
Templates for 13.2 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
RuzmanovDev authored Dec 9, 2020
1 parent 05e3397 commit 73ed129
Show file tree
Hide file tree
Showing 189 changed files with 31,518 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* {{> sign}} */

using {{projectDefaultNamespace}}.Mvc.Models;
using System.Web.Mvc;
using Telerik.Sitefinity.Mvc;
using Telerik.Sitefinity.Personalization;

namespace {{projectDefaultNamespace}}.Mvc.Controllers
{
[ControllerToolboxItem(Name = "{{pascalCaseName}}_MVC", Title = "{{name}}", SectionName = "CustomWidgets")]
public class {{pascalCaseName}}Controller : Controller, IPersonalizable
{
// GET: {{name}}
public ActionResult Index()
{
var model = new {{pascalCaseName}}Model();
model.Message = this.Message;
return View(model);
}

protected override void HandleUnknownAction(string actionName)
{
this.ActionInvoker.InvokeAction(this.ControllerContext, "Index");
}

public string Message { get; set; }
}
}
12 changes: 12 additions & 0 deletions Sitefinity CLI/Templates/13.2/CustomWidget/Default/Model.Template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* {{> sign}} */

using System.Web.Mvc;
using Telerik.Sitefinity.Mvc;

namespace {{projectDefaultNamespace}}.Mvc.Models
{
public class {{pascalCaseName}}Model
{
public string Message { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@* {{> sign}} *@

@model {{projectDefaultNamespace}}.Mvc.Models.{{pascalCaseName}}Model
<div>
@Model.Message
</div>
14 changes: 14 additions & 0 deletions Sitefinity CLI/Templates/13.2/CustomWidget/Default/templates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"FilePath": "Controllers\\{0}Controller.cs",
"TemplatePath": "Controller.Template"
},
{
"FilePath": "Models\\{0}Model.cs",
"TemplatePath": "Model.Template"
},
{
"FilePath": "Views\\{0}\\Index.cshtml",
"TemplatePath": "View.Template"
}
]
8 changes: 8 additions & 0 deletions Sitefinity CLI/Templates/13.2/GridWidget/grid-6+6.Template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- {{> sign}} -->

<div class="row" data-sf-element="Row">
<div class="sf_colsIn col-lg-6" data-sf-element="Column 1" data-placeholder-label="Column 1">
</div>
<div class="sf_colsIn col-lg-6" data-sf-element="Column 2" data-placeholder-label="Column 2">
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Telerik.WebTestRunner.Server.Attributes;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("{{pascalCaseName}}")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SitefinityWebApp.Tests.Integration")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("{{projectGuid}}")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: IntegrationTests]
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* {{> sign}} */

using MbUnit.Framework;
using System;

namespace {{pascalCaseName}}
{
/// <summary>
/// Represents sample integration tests class to demonstrate the usage of some attributes.
/// For more information on creating and running integration tests with Sitefinity CMS web test runner see the Sitefinity documentation: https://www.progress.com/documentation/sitefinity-cms/tutorial-create-integration-tests-with-sitefinity-web-test-runner
/// For sample integration tests see this project in the Sitefinity GitHub repo: https://github.com/Sitefinity/Telerik.Sitefinity.Samples.IntegrationTests
/// For more information on the integration tests infrastructure and framework see the MbUnit documentation: http://www.gallio.org/doku-id-mbunit-documentation/
/// </summary>
[TestFixture]
[Description("Integration tests project")]
[Author(TestAuthors.SitefinityCLI)]
public class DemoTests
{
/// <summary>
/// This method is invoked once prior to executing any tests in the fixture.
/// </summary>
[FixtureSetUp]
public void FixtureSetUp()
{
throw new NotImplementedException();
}

/// <summary>
/// This method is invoked once after all tests in the fixture have been executed.
/// </summary>
[FixtureTearDown]
public void FixtureTearDown()
{
throw new NotImplementedException();
}

/// <summary>
/// This method is invoked just before each test method is executed.
/// </summary>
[SetUp]
public void SetUp()
{
throw new NotImplementedException();
}

/// <summary>
/// This method is invoked after each test method.
/// </summary>
public void TearDown()
{
throw new NotImplementedException();
}

/// <summary>
/// Write your integration test
/// </summary>
[Test]
[Category(TestCategories.Demo)]
[Description("Write your integration test")]
[Author(TestAuthors.SitefinityCLI)]
public void Test()
{
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* {{> sign}} */

namespace {{pascalCaseName}}
{
internal class TestAuthors
{
public const string SitefinityCLI = "Sitefinity CLI";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* {{> sign}} */

using MbUnit.Framework;

namespace {{pascalCaseName}}
{
public class TestCategories
{
public const string Demo = "Demo";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ {{~projectGuid~}} }</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>{{pascalCaseName}}</RootNamespace>
<AssemblyName>{{pascalCaseName}}</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>{{binFolder}}</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>{{binFolder}}</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Gallio, Version=3.4.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e, processorArchitecture=MSIL">
<HintPath>..\packages\Sitefinity.Gallio_MbUnit.3.4.11.0\lib\net40\Gallio.dll</HintPath>
</Reference>
<Reference Include="MbUnit, Version=3.4.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e, processorArchitecture=MSIL">
<HintPath>..\packages\Sitefinity.Gallio_MbUnit.3.4.11.0\lib\net40\MbUnit.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Telerik.WebTestRunner.Server, Version=2.0.0.1, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL">
<HintPath>..\packages\Telerik.Sitefinity.WebTestRunner.Server.2.0.0.1\lib\net40\Telerik.WebTestRunner.Server.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Sitefinity.Gallio_MbUnit" version="3.4.11.0" targetFramework="net472" />
<package id="Telerik.Sitefinity.WebTestRunner.Server" version="2.0.0.1" targetFramework="net472" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"FilePath": "Properties\\AssemblyInfo.cs",
"TemplatePath": "AssemblyInfo.Template"
},
{
"FilePath": "{0}.csproj",
"TemplatePath": "csproj.Template"
},
{
"FilePath": "DemoTests.cs",
"TemplatePath": "DemoTests.Template"
},
{
"FilePath": "packages.config",
"TemplatePath": "packages.config.Template"
},
{
"FilePath": "TestAuthors.cs",
"TemplatePath": "TestAuthors.Template"
},
{
"FilePath": "TestCategories.cs",
"TemplatePath": "TestCategories.Template"
}
]
37 changes: 37 additions & 0 deletions Sitefinity CLI/Templates/13.2/Module/Default/AssemblyInfo.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using {{pascalCaseName}};
using System.Reflection;
using System.Runtime.InteropServices;
using Telerik.Sitefinity.Services;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("{{pascalCaseName}}")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("{{pascalCaseName}}")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("{{projectGuid}}")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 73ed129

Please sign in to comment.