Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 from umco/develop
Browse files Browse the repository at this point in the history
Release 1.0.4
  • Loading branch information
leekelleher authored Mar 18, 2017
2 parents fe82d1c + 07ba627 commit b4ae138
Show file tree
Hide file tree
Showing 21 changed files with 319 additions and 348 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2014 Umbrella Inc, Our Umbraco and other contributors
Copyright © 2016 UMCO, Our Umbraco and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
67 changes: 65 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,77 @@
# Stacked Content

[![Build status](https://img.shields.io/appveyor/ci/UMCO/umbraco-stacked-content.svg)](https://ci.appveyor.com/project/UMCO/umbraco-stacked-content)
[![NuGet release](https://img.shields.io/nuget/v/Our.Umbraco.StackedContent.svg)](https://www.nuget.org/packages/Our.Umbraco.StackedContent)
[![Our Umbraco project page](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/backoffice-extensions/stacked-content)

An Umbraco property editor for creating stacked content blocks.


## Getting Started

### Installation

> *Note:* Stacked Content has been developed against **Umbraco v7.4.0** and will support that version and above.
Stacked Content can be installed from either Our Umbraco or NuGet package repositories, or build manually from the source-code:

#### Our Umbraco package repository

To install from Our Umbraco, please download the package from:

> <https://our.umbraco.org/projects/backoffice-extensions/stacked-content>
#### NuGet package repository

To [install from NuGet](https://www.nuget.org/packages/Our.Umbraco.StackedContent), you can run the following command from within Visual Studio:

PM> Install-Package Our.Umbraco.StackedContent

We also have a [MyGet package repository](https://www.myget.org/gallery/umbraco-packages) - for bleeding-edge / development releases.

#### Manual build

If you prefer, you can compile Stacked Content yourself, you'll need:

* Visual Studio 2015 (or above)

To clone it locally click the "Clone in Windows" button above or run the following git commands.

git clone https://github.com/umco/umbraco-stacked-content.git umbraco-stacked-content
cd umbraco-stacked-content
.\build.cmd

---

## Known Issues

* _[TBC]_

---

## Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md).

* [Bug reports](CONTRIBUTING.md#bugs)
* [Feature requests](CONTRIBUTING.md#features)
* [Pull requests](CONTRIBUTING.md#pull-requests)

---

## Contact

Have a question?

* [Stacked Content Forum](https://our.umbraco.org/projects/backoffice-extensions/stacked-content/stacked-content-feedback) on Our Umbraco
* [Raise an issue](https://github.com/umco/umbraco-stacked-content/issues) on GitHub

## Dev Team

* [Matt Brailsford](https://github.com/mattbrailsford)
* [Lee Kelleher](https://github.com/leekelleher)

## License

Copyright &copy; 2016 Umco, Our Umbraco and [other contributors](https://github.com/umco/umbraco-stacked-content/graphs/contributors)
Copyright &copy; 2016 UMCO, Our Umbraco and [other contributors](https://github.com/umco/umbraco-stacked-content/graphs/contributors)

Licensed under the [MIT License](LICENSE.md)
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
os: Visual Studio 2015

# version format
version: 1.0.3.{build}
version: 1.0.4.{build}

# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
Expand Down
2 changes: 1 addition & 1 deletion build-appveyor.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ECHO APPVEYOR_REPO_TAG: %APPVEYOR_REPO_TAG%
ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER%
ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION%

CALL src\.nuget\NuGet.exe restore src\Our.Umbraco.NestedContent.sln
CALL build\tools\NuGet\NuGet.exe restore src\Our.Umbraco.StackedContent.sln
CALL "%programfiles(x86)%\MSBuild\14.0\Bin\amd64\MsBuild.exe" build\package.proj
2 changes: 1 addition & 1 deletion build/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (!$contentFolder)
$projectPath = Join-Path $projDirectory -ChildPath "App_Plugins"
$projectPathExists = Test-Path $projectPath

if ($projectPathExists) {
if ($projectPathExists) {
Write-Host "Updating Stacked Content App_Plugin files using PS as they have been excluded from the project"
Copy-Item $newPackageFiles $projectPath -Recurse -Force
}
Expand Down
3 changes: 1 addition & 2 deletions build/package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
<language></language>
<tags></tags>
<dependencies>
<dependency id="Our.Umbraco.InnerContent" version="1.0.2" />
<dependency id="UmbracoCms.Core" version="0.0.0" />
<dependency id="Our.Umbraco.InnerContent" version="1.0.3" />
</dependencies>
</metadata>
<files />
Expand Down
6 changes: 3 additions & 3 deletions build/package.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ProjectName>Our.Umbraco.StackedContent</ProjectName>
<PackageName>Stacked Content</PackageName>
<MinUmbracoVersion>7.4.0</MinUmbracoVersion>
<Readme>Stacked Content is a stacked content editing property editor for Umbraco 7.4+</Readme>
<Readme>Stacked Content is an Umbraco property-editor for creating stacked content blocks.</Readme>
<AuthorName>Matt Brailsford, Lee Kelleher</AuthorName>
<AuthorUrl>https://github.com/umco/umbraco-stacked-content/graphs/contributors</AuthorUrl>
<PackageLicenseName>MIT license</PackageLicenseName>
Expand All @@ -31,7 +31,7 @@
<PropertyGroup>
<PackageId>Our.Umbraco.StackedContent</PackageId>
<NuGetPackageName>Stacked Content for Umbraco</NuGetPackageName>
<Copyright>Copyright &#169; 2016 Umco, Our Umbraco and other contributors</Copyright>
<Copyright>Copyright &#169; 2016 UMCO, Our Umbraco and other contributors</Copyright>
<Owners>Matt Brailsford, Lee Kelleher</Owners>
<IconUrl>https://raw.githubusercontent.com/umco/umbraco-stacked-content/master/docs/img/logo.png</IconUrl>
<Tags>umbraco umco</Tags>
Expand Down Expand Up @@ -193,7 +193,7 @@
OutputDirectory="$(ArtifactsDir)"
Files="@(PackageFiles)" />

<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\packages\NuGet.CommandLine.3.4.4-rtm-final\tools\NuGet.exe"
<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(MSBuildProjectDirectory)\tools\NuGet\NuGet.exe"
ManifestFile="$(BuildNuGetDir)\package.nuspec"
BasePath="$(BuildNuGetDir)"
Version="$(ProductVersion)"
Expand Down
Binary file added build/tools/NuGet/NuGet.exe
Binary file not shown.
23 changes: 22 additions & 1 deletion src/Our.Umbraco.StackedContent.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.StackedContent", "Our.Umbraco.StackedContent\Our.Umbraco.StackedContent.csproj", "{E0F6B57D-F549-4EF0-B5A7-5C1A9B49FD80}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{52A49C4D-441F-4D54-A23F-444AF47DB250}"
ProjectSection(SolutionItems) = preProject
..\..\umbraco-stacked-content\CONTRIBUTING.md = ..\..\umbraco-stacked-content\CONTRIBUTING.md
..\..\umbraco-stacked-content\LICENSE.md = ..\..\umbraco-stacked-content\LICENSE.md
..\..\umbraco-stacked-content\README.md = ..\..\umbraco-stacked-content\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{95F00400-1FCA-4D98-9643-ACBC2203C1D0}"
ProjectSection(SolutionItems) = preProject
..\..\umbraco-stacked-content\appveyor.yml = ..\..\umbraco-stacked-content\appveyor.yml
..\..\umbraco-stacked-content\build-appveyor.cmd = ..\..\umbraco-stacked-content\build-appveyor.cmd
..\..\umbraco-stacked-content\build.cmd = ..\..\umbraco-stacked-content\build.cmd
..\..\umbraco-stacked-content\build\install.ps1 = ..\..\umbraco-stacked-content\build\install.ps1
..\..\umbraco-stacked-content\build\package.nuspec = ..\..\umbraco-stacked-content\build\package.nuspec
..\..\umbraco-stacked-content\build\package.proj = ..\..\umbraco-stacked-content\build\package.proj
..\..\umbraco-stacked-content\build\package.xml = ..\..\umbraco-stacked-content\build\package.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -19,4 +37,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{95F00400-1FCA-4D98-9643-ACBC2203C1D0} = {52A49C4D-441F-4D54-A23F-444AF47DB250}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Our.Umbraco.InnerContent.Converters;
using Our.Umbraco.StackedContent.PropertyEditors;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;

namespace Our.Umbraco.StackedContent.Converters
{
[PropertyValueType(typeof(IEnumerable<IPublishedContent>))]
public class StackedContentValueConverter : InnerContentValueConverter
{

public override bool IsConverter(PublishedPropertyType propertyType)
{
return propertyType.PropertyEditorAlias.InvariantEquals(StackedContentPropertyEditor.PropertyEditorAlias);
Expand All @@ -26,9 +29,7 @@ public override object ConvertDataToSource(PublishedPropertyType propertyType, o
var rawValue = JsonConvert.DeserializeObject<JArray>(source.ToString());

return ConvertInnerContentDataToSource(rawValue, null, 1, preview);

}

}
catch (Exception e)
{
Expand All @@ -38,4 +39,4 @@ public override object ConvertDataToSource(PublishedPropertyType propertyType, o
return null;
}
}
}
}
Loading

0 comments on commit b4ae138

Please sign in to comment.