Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 9dde0b1

Browse files
committed
updates version number, credentials, readme, and dev guide.
1 parent 4e29b40 commit 9dde0b1

15 files changed

+79
-54
lines changed

LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Copyright © 2019 Søren Kottal, Our Umbraco and other contributors
12
Copyright © 2017 UMCO, Our Umbraco and other contributors
23
Copyright © 2014 Umbrella Inc
34

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
[![Our Umbraco project page](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor)
66

77

8-
A grid editor for Umbraco 7 that allows you to use Doc Types as a blue print for grid-cell data.
8+
A grid editor for Umbraco 8 that allows you to use Doc Types as a blue print for grid-cell data.
99

1010

1111
## Getting Started
1212

1313
### Installation
1414

15-
> *Note:* Doc Type Grid Editor has been developed against **Umbraco v7.6.0** and will support that version and above.
15+
> *Note:* Doc Type Grid Editor has been developed against **Umbraco v8.1.0** and will support that version and above.
1616
1717
Doc Type Grid Editor can be installed from either Our Umbraco package repository, or build manually from the source-code.
1818

@@ -83,18 +83,20 @@ Have a question?
8383

8484
## Dev Team
8585

86-
* [Matt Brailsford](https://github.com/mattbrailsford)
87-
* [Lee Kelleher](https://github.com/leekelleher)
86+
* [Søren Kottal](https://github.com/skttl)
8887

8988
### Special thanks
9089

90+
* Thanks to [Matt Brailsford](https://github.com/mattbrailsford) and [Lee Kelleher](https://github.com/leekelleher) for building this great package.
9191
* Thanks to [Jeavon Leopold](https://github.com/Jeavon) for being a rockstar and adding AppVeyor & NuGet support.
9292
* Thanks to [Dave Woestenborghs](https://github.com/dawoe) for helping solve showstopper issues.
93-
* Thanks to [Søren Kottal](https://github.com/skttl) for help with localization.
93+
* Thanks to [Arnold Visser](https://github.com/ArnoldV) and [Bjarne Fyrstenborg](https://github.com/bjarnef) for help with porting the package to Umbraco 8.
9494

9595

9696
## License
9797

98+
Copyright © 2019 Søren Kottal, Our Umbraco and [other contributors](https://github.com/umco/umbraco-doc-type-grid-editor/graphs/contributors)
99+
98100
Copyright © 2017 UMCO, Our Umbraco and [other contributors](https://github.com/umco/umbraco-doc-type-grid-editor/graphs/contributors)
99101

100102
Copyright © 2014 Umbrella Inc

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22

33
# version format
4-
version: 0.6.2.{build}
4+
version: 1.0.0.{build}
55

66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta

build/package.proj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<ProjectName>Our.Umbraco.DocTypeGridEditor</ProjectName>
2020
<PackageName>Doc Type Grid Editor</PackageName>
2121
<MinUmbracoVersion>8.0.0</MinUmbracoVersion>
22-
<Readme>Doc Type Grid Editor is an advanced grid editor for Umbraco 7</Readme>
23-
<AuthorName>Matt Brailsford, Lee Kelleher</AuthorName>
22+
<Readme>Doc Type Grid Editor is an advanced grid editor for Umbraco 8</Readme>
23+
<AuthorName>Matt Brailsford, Lee Kelleher, Søren Kottal</AuthorName>
2424
<AuthorUrl>https://github.com/umco/umbraco-doc-type-grid-editor/graphs/contributors</AuthorUrl>
2525
<PackageLicenseName>MIT license</PackageLicenseName>
2626
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
@@ -32,7 +32,7 @@
3232
<PackageId>Our.Umbraco.DocTypeGridEditor</PackageId>
3333
<NuGetPackageName>Doc Type Grid Editor for Umbraco</NuGetPackageName>
3434
<Copyright>Copyright &#169; 2019 UMCO</Copyright>
35-
<Owners>Matt Brailsford, Lee Kelleher</Owners>
35+
<Owners>Matt Brailsford, Lee Kelleher, Søren Kottal</Owners>
3636
<IconUrl>https://our.umbraco.org/media/wiki/145708/635623742802070736_dtgepng.png</IconUrl>
3737
<Tags>umbraco grid document type editor</Tags>
3838
<Language>en-GB</Language>

build/readme.txt

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
____ _____ ____ _ _ _____ _ _ _
2-
| _ \ ___ __|_ _| _ _ __ ___ / ___|_ __(_) __| | ____|__| (_) |_ ___ _ __
3-
| | | |/ _ \ / __|| || | | | '_ \ / _ \ | _| '__| |/ _` | _| / _` | | __/ _ \| '__|
4-
| |_| | (_) | (__ | || |_| | |_) | __/ |_| | | | | (_| | |__| (_| | | || (_) | |
5-
|____/ \___/ \___||_| \__, | .__/ \___|\____|_| |_|\__,_|_____\__,_|_|\__\___/|_|
6-
|___/|_|
1+
 ██████████████
2+
████████████████████████
3+
██████████████████████████████
4+
████████████████████████████████████
5+
██████████████████████████████████████
6+
███████ ███████ _
7+
████████ ████████ _ _ _ __ ___ | |__ _ __ __ _ ___ ___
8+
██████████████████████████████████████████████ | | | | '_ ` _ \| '_ \| '__/ _` |/ __/ _ \
9+
██████████ ████ ████ ██████████ | |_| | | | | | | |_) | | | (_| | (_| (_) |
10+
██████████ ████ ████ ██████████ \__,_|_| |_| |_|_.__/|_| \__,_|\___\___/
11+
███████████ ████ ████ █ ██████ ____ _____
12+
███████████████████████████████████████ █████ | _ \ ___ ___ |_ _| _ _ __ ___
13+
███████████ ████ ███████ | | | |/ _ \ / __| | || | | | '_ \ / _ \
14+
███████████ █ ██████████ | |_| | (_) | (__ | || |_| | |_) | __/
15+
█████████████████████████████████ ████████████ |____/ \___/ \___| |_| \__, | .__/ \___|
16+
██████████ ████ ████ ██ ██████████ ____ _ _ ___|___/|_|_ _
17+
█████████ ████ ███ ██ █████████ / ___|_ __(_) __| | | ____|__| (_) |_ ___ _ __
18+
█████████ ████ ██ █ █████████ | | _| '__| |/ _` | | _| / _` | | __/ _ \| '__|
19+
████████ ████ ██ ███ ████████ | |_| | | | | (_| | | |__| (_| | | || (_) | |
20+
████████████████████ ████████████████ \____|_| |_|\__,_| |_____\__,_|_|\__\___/|_|
21+
██████████████████████████████████████
22+
████████████████████████████████
23+
████████████████████████████
24+
████████████████████
25+
████████████
26+
727

828
--------------------------------------------------------------------------------------
929

10-
To enable DocTypeGridEditor you must add the following JSON snippet to "grid.editors.config.js" found in the Config folder.
30+
Thanks for installing Doc Type Grid Editor.
1131

12-
{
13-
"name": "Doc Type",
14-
"alias": "docType",
15-
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
16-
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
17-
"icon": "icon-item-arrangement",
18-
"config": {
19-
"allowedDocTypes": [],
20-
"nameTemplate": "",
21-
"enablePreview": true,
22-
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
23-
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
24-
"previewCssFilePath": "",
25-
"previewJsFilePath": ""
26-
}
27-
}
32+
We have added an universal grid editor allowing all your element types, in a package.manifest file in /App_Plugins/DocTypeGridEditor/package.manifest.
33+
You can add your own and target specific doctypes, for single purpose grid editors if you'd like. Checkout the Developers Guide for more info at:
34+
https://github.com/umco/umbraco-doc-type-grid-editor/blob/master/docs/developers-guide.md

docs/developers-guide.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Introduction
1818

19-
**Doc Type Grid Editor** is an advanced grid editor for the new Umbraco grid, offering similar functionality as the macro grid editor but using the full power of the Doc Type editor and data types.
19+
**Doc Type Grid Editor** is an advanced grid editor for the Umbraco grid, offering similar functionality as the macro grid editor but using the full power of the Doc Type editor and data types.
2020

2121
With the macro grid editor you are limited to only using the macro builder and thus the handful of parameter editors that are available. Of course you can create / config your own parameter editors, however this is cumbersome compared to how we can configure data types.
2222

@@ -31,7 +31,7 @@ With the **Doc Type Grid Editor** then, we bridge that gap, allowing you to reus
3131
Before you get started, there are a number of things you will need:
3232

3333
1. .NET 4.7.2+
34-
2. Umbraco 8.0.2+
34+
2. Umbraco 8.1.0+
3535
3. The **Doc Type Grid Editor** package installed
3636

3737
---
@@ -68,8 +68,6 @@ You can also add your editors using a package.manifest file in a folder in the `
6868
]
6969
```
7070

71-
![Doc Type Grid Editor - JSON configuration](img/screenshot-07.png)
72-
7371
For the main part, the root properties shouldn’t need to be modified, however the only properties that MUST not be changed are the **view** and **render** properties.
7472

7573
| Member | Type | Description |
@@ -85,33 +83,40 @@ The **Doc Type Grid Editor** supports 3 config options, all of which are optiona
8583

8684
| Member | Type | Description |
8785
|-----------------|----------|-------------|
88-
| AllowedDocTypes | String[] | An array of doc type aliases of which should be allowed to be selected in the grid editor. Strings can be REGEX patterns to allow matching groups of doc types in a single entry. e.g. "Widget$" will match all doc types with an alias ending in "Widget". However if a single doc type is matched, (aka **Single Doc Type Mode**), then dropdown selection stage (in the DTGE panel) will be skipped. |
86+
| AllowedDocTypes | String[] | An array of doc type aliases of which should be allowed to be selected in the grid editor. Strings can be REGEX patterns to allow matching groups of doc types in a single entry. e.g. "Widget$" will match all doc types with an alias ending in "Widget". However if a single doc type is matched, (aka **Single Doc Type Mode**), then doc type selection stage (in the DTGE panel) will be skipped. Note, your document type must be an Element type, in order to be usable in DTGE. |
8987
| EnablePreview | Boolean | Enables rendering a preview of the grid cell in the grid editor. |
9088
| LargeDialog | Boolean | Makes the editing dialog larger. Especially useful for grid editors with complex property editors. |
91-
| ViewPath | String | Set's an alternative view path for where the **Doc Type Grid Editor** should look for views when rendering. Defaults to `~/Views/Partials/` |
89+
| ViewPath | String | Sets an alternative view path for where the **Doc Type Grid Editor** should look for views when rendering. Defaults to `~/Views/Partials/` |
90+
| PreviewViewPath | String | Sets an alternative view path for where the **Doc Type Grid Editor** should look for views when rendering previews in the backoffice |
9291
| ShowDocTypeSelectAsGrid | Boolean | Makes the content type selection dialog render a grid, in stead of the default list with descriptions |
9392

93+
By default, a universal grid editor allowing all available element document types is added upon installation.
94+
9495
---
9596

9697
### Hooking Up The Doc Type Grid Editor
9798

98-
To hook up the **Doc Type Grid Editor**, within your grids prevalue, select the row configs you want to use the **Doc Type Grid Editor** in and for each cell config, check the **Doc Type** checkbox option to true. (NB: If you changed the name in the config, then select the item with the name you enter in the config).
99+
To hook up the **Doc Type Grid Editor**, within your grids prevalue, select the row configs you want to use the **Doc Type Grid Editor** in and for each cell config, check the **Doc Type** checkbox option to true. If you changed the name in the config, then select the item with the name you enter in the config. And, if you add your own editors either by package.manifest, or by editing grid.editors.config.js, you will need to select those too.
99100

100101
![Doc Type Grid Editor - Prevalue Editor](img/screenshot-01.png)
101102

102-
With the Doc Type Grid Editor enabled, from within your grid editor, you should now have a new option in the **Insert Control** dialog.
103+
With the Doc Type Grid Editor enabled, from within your grid editor, you should now have a new option in the **Choose type of content** dialog.
103104

104105
![Doc Type Grid Editor - Insert Control](img/screenshot-02.png)
105106

106-
From there, simply click the **Doc Type** icon and chose the doc type you wish to render.
107+
From there, simply click the **Doc Type** icon. If you have multiple document types matching the `AllowedDocTypes` setting in the selected grid editor (the default **Doc Type**, lets you pick between all available document types), you need to choose the document type you wish to render.
107108

108109
![Doc Type Grid Editor - Select Doc Type](img/screenshot-03.png)
109110

110-
Then you should be presented with a form for all the fields in your doc type.
111+
If you have any Content Templates available for the selected document type, you need to choose which template to use for the content.
112+
113+
![Doc Type Grid Editor - Select Doc Type](img/screenshot-03b.png)
114+
115+
Then you should be presented with a form for all the fields in your document type.
111116

112117
![Doc Type Grid Editor - Doc Type Fields](img/screenshot-04.png)
113118

114-
Fill in the fields and click save. You should then see the grid populated with a preview of your item.
119+
Fill in the fields and click Submit. You should then see the grid populated with a preview of your item. If you have disabled previews using the `EnablePreview` setting, an icon will be shown to represent your content block.
115120

116121
![Doc Type Grid Editor - Grid Preview](img/screenshot-05.png)
117122

@@ -121,33 +126,43 @@ Make sure save / save &amp; publish the current page to persist your changes.
121126

122127
### Rendering a Doc Type Grid Editor
123128

124-
The **Doc Type Grid Editor** uses standard ASP.NET MVC partials as the rendering mechanism. By default it will look for partial files in `~/Views/Partials` with a name that matches the doc type alias. For example, if your doc type alias is `TestDocType`, the Doc Type Grid Editor will look for the partial file `~/Views/Partials/TestDocType.cshtml`.
129+
The **Doc Type Grid Editor** uses standard ASP.NET MVC partials as the rendering mechanism. By default it will look for partial files in the `ViewPath` setting of your grid editor, or in the default partial view location (for exmaple `~/Views/Partials`). The rendering mechanism looks for a file with a name that matches the document type alias. For example, for the default setup, if your document type alias is `TestDocType`, the Doc Type Grid Editor will look for the partial file `~/Views/Partials/Grid/Editors/DocTypeGridEditor/TestDocType.cshtml`.
125130

126-
To access the properties of your completed doc type, simply have your partial view inherit the standard `UmbracoViewPage` class, and you’ll be able to access them via the standard `Model` view property as a native `IPublishedContent` instance.
131+
To access the properties of your completed doc type, simply have your partial view inherit the standard `UmbracoViewPage` class, and you’ll be able to access them via the standard `Model` view property as a native `IPublishedElement` instance.
127132

128133
```
129-
@inherits Umbraco.Web.Mvc.UmbracoViewPage
134+
@inherits UmbracoViewPage<IPublishedElement>
130135
<h3>@Model.Name</h3>
131136
```
132137

133-
Because we treat your data as a standard `IPublishedContent` entity, that means you can use all the property value converters you are used to using, as well as the build in `@Umbraco.Field(...)` helper methods.
138+
Because we treat your data as a standard `IPublishedElement` entity, that means you can use all the property value converters you are used to using.
134139

135140
```
136-
@inherits Umbraco.Web.Mvc.UmbracoViewPage
141+
@inherits UmbracoViewPage<IPublishedElement>
137142
<h3>@Model.Name</h3>
138-
@Umbraco.Field(Model, "bodyText")
139-
<a href="@(Model.GetPropertyValue<IPublishedContent>("link").Url)"> More</a>
143+
@Model.Value("bodyText")
144+
<a href="@(Model.Value<IPublishedContent>("link").Url)"> More</a>
145+
```
146+
147+
Doc Type Grid Editor also supports ModelsBuilder, so you can simplify your views like this:
148+
```
149+
@inherits UmbracoViewPage<TestDocType>
150+
<h3>@Model.Name</h3>
151+
@Model.BodyText
152+
<a href="@(Model.Link.Url)"> More</a>
140153
```
141154

142155
![Doc Type Grid Editor - Rendered Content](img/screenshot-06.png)
143156

144157

145158
#### Rendering Alternative Preview Content
146159

147-
If your front end view is rather complex, you may decide that you want to feed the back office preview an alternative, less complex view. To do this, within your Razor view/partial, check for a querystring parameter `dtgePreview` being set to "1" to detect being in preview mode to provide an alternative view.
160+
If your front end view is rather complex, you may decide that you want to feed the back office preview an alternative, less complex view. To do this, you can use the `PreviewViewPath` setting on your grid editor, and place a view named after your document type there. **Doc Type Grid Editor** will use the preview view file, when rendering previews in the backoffice.
161+
162+
If you don't want to have a seperate preview view file, you can add preview logic within your Razor view/partial. Check for a querystring parameter `dtgePreview` being set to "1" to detect being in preview mode to provide an alternative view.
148163

149164
```
150-
@inherits Umbraco.Web.Mvc.UmbracoViewPage
165+
@inherits UmbracoViewPage<IPublishedElement>
151166
@if (Request.QueryString["dtgePreview"] == "1")
152167
{
153168
// Render preview view

docs/img/screenshot-01.png

17.8 KB
Loading

docs/img/screenshot-02.png

-9.34 KB
Loading

docs/img/screenshot-03.png

-31.8 KB
Loading

docs/img/screenshot-03b.png

23.5 KB
Loading

0 commit comments

Comments
 (0)