Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Ignition.Sc/Components/Service/IServiceCard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Glass.Mapper.Sc.Configuration;
using Glass.Mapper.Sc.Configuration.Attributes;
using Ignition.Core.Models.Settings;
using Ignition.Data.Fields;

namespace Ignition.Sc.Components.Service
{
[SitecoreType(TemplateId = "{319DE28B-2587-4356-8D5D-F2204858FC71}", AutoMap = true)]
public interface IServiceCard : IHeading, IPlainText, IPrimaryLink
{
[SitecoreField(FieldId = "{4391DED9-8C09-448F-8C3F-6D5C56A57DFF}", Setting = SitecoreFieldSettings.InferType)]
IStringSetting IconClass { get; set; }
}
}
14 changes: 14 additions & 0 deletions Ignition.Sc/Components/Service/IServiceGrid.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Collections.Generic;
using Glass.Mapper.Sc.Configuration;
using Glass.Mapper.Sc.Configuration.Attributes;
using Ignition.Core.Models.BaseModels;

namespace Ignition.Sc.Components.Service
{
[SitecoreType(TemplateId = "{B14C314D-28EB-48EB-A39F-D52131C8D404}", AutoMap = true)]
public interface IServiceGrid : IModelBase
{
[SitecoreField(FieldId = "{7BAED51E-FED4-4E7F-9D78-9C218C1B5E37}", Setting = SitecoreFieldSettings.InferType)]
IEnumerable<IServiceCard> ServiceCards { get; set; }
}
}
15 changes: 15 additions & 0 deletions Ignition.Sc/Components/Service/ServiceAgent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Ignition.Core.Mvc;

namespace Ignition.Sc.Components.Service
{
public class ServiceAgent : Agent<ServiceGridViewModel>
{
public override void PopulateModel()
{
var ds = (IServiceGrid) Datasource;
if (ds == null) return;

ViewModel.ServiceCards = ds.ServiceCards;
}
}
}
10 changes: 10 additions & 0 deletions Ignition.Sc/Components/Service/ServiceController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Web.Mvc;
using Ignition.Core.Mvc;

namespace Ignition.Sc.Components.Service
{
public class ServiceController : IgnitionController
{
public ActionResult ServiceGrid() => View<ServiceAgent, ServiceGridViewModel>();
}
}
33 changes: 33 additions & 0 deletions Ignition.Sc/Components/Service/ServiceGrid.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@model Ignition.Sc.Components.Service.ServiceGridViewModel

<div class="section">
<div class="container">
<div class="row">
@if (Html.Glass().IsInEditingMode)
{
using (Html.Glass().BeginEditFrame(Model.EditFrameItem, "Edit Service Card List", a => a.ServiceCards))
{
<span>Click here to edit service card list</span>
}
}
@foreach (var servicecard in Model.ServiceCards)
{
<div class="col-md-4 col-sm-6">
<div class="service-wrapper">
@if (Html.Glass().IsInEditingMode)
{
using (Html.Glass().BeginEditFrame(servicecard,"Edit Icon Class", a => a.IconClass))
{
<span>Click here to edit selected icon class</span>
}
}
<i class="@servicecard.IconClass.StringSetting"></i>
<h3>@Html.Glass().Editable(servicecard, a => a.Heading)</h3>
<p>@Html.Glass().Editable(servicecard, a => a.PlainText)</p>
@Html.Glass().RenderLink(servicecard, a => a.PrimaryLink, new { @class = "btn" }, true)
</div>
</div>
}
</div>
</div>
</div>
12 changes: 12 additions & 0 deletions Ignition.Sc/Components/Service/ServiceGridViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections.Generic;
using Ignition.Core.Mvc;

namespace Ignition.Sc.Components.Service
{
public class ServiceGridViewModel : BaseViewModel
{
public IEnumerable<IServiceCard> ServiceCards { get; set; }

public IServiceGrid EditFrameItem { get; set; }
}
}
6 changes: 6 additions & 0 deletions Ignition.Sc/Ignition.Sc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
<Content Include="Components\News\FeaturedNews.cshtml" />
<Content Include="Components\News\LatestNews.cshtml" />
<Content Include="Components\News\NewsGrid.cshtml" />
<Content Include="Components\Service\ServiceGrid.cshtml" />
<None Include="Properties\PublishProfiles\Ignition.Sc.pubxml" />
<None Include="Web.config" />
</ItemGroup>
Expand Down Expand Up @@ -365,6 +366,11 @@
<Compile Include="Components\Product\ProductDetailsViewModel.cs" />
<Compile Include="Components\Product\ProductSummaryAgent.cs" />
<Compile Include="Components\Product\ProductSummaryViewModel.cs" />
<Compile Include="Components\Service\IServiceCard.cs" />
<Compile Include="Components\Service\IServiceGrid.cs" />
<Compile Include="Components\Service\ServiceAgent.cs" />
<Compile Include="Components\Service\ServiceController.cs" />
<Compile Include="Components\Service\ServiceGridViewModel.cs" />
<Compile Include="Components\Shared\IIgnitionPage.cs" />
<Compile Include="Components\News\FeaturedNewsAgent.cs" />
<Compile Include="Components\News\FeaturedNewsViewModel.cs" />
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ID: "687b56fa-5f81-4f7e-80a7-b4641acf2c0f"
Parent: "ef987e71-c8cf-471e-b08a-2c6febd03c2d"
Template: "7ee0975b-0698-493e-b3a2-0b2ef33d0522"
Path: /sitecore/layout/Renderings/Ignition/Components/Service
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T210955Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
ID: "6cb84bdc-a809-4803-a57c-8cbc323faa64"
Parent: "687b56fa-5f81-4f7e-80a7-b4641acf2c0f"
Template: "2a3e91a0-7987-44b5-ab34-35c2d9de83b9"
Path: /sitecore/layout/Renderings/Ignition/Components/Service/ServiceGrid
DB: master
SharedFields:
- ID: "1a7c85e5-dc0b-490d-9187-bb1dbcb4c72f"
Hint: Datasource Template
Value: /sitecore/templates/Sites/Ignition/Components/Service/ServiceGrid
- ID: "b5b27af1-25ef-405c-87ce-369b3a004016"
Hint: Datasource Location
Value: ./Assets
- ID: "c7c26117-dbb1-42b2-ab5e-f7223845cca3"
Hint: __Thumbnail
Value: "<image mediaid=\"{C6D45B33-8D01-4F16-8090-67DE86B0D6E9}\" />"
- ID: "ded9e431-3604-4921-a4b3-a6ec7636a5b6"
Hint: Controller Action
Value: ServiceGrid
- ID: "e64ad073-dfcc-4d20-8c0b-fe5aa6226cd7"
Hint: Controller
Value: Service
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T211008Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ID: "e19a7379-c346-4255-8ff5-a7d759c00dda"
Parent: "5e2e4cb9-792e-4d76-808a-e1a22d42acd9"
Template: "19bea9fa-08c7-4d8f-b1b8-08ca5d288b87"
Path: /sitecore/content/GlobalSettings/IgnitionDemo
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203717Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ID: "8d3ee218-c542-4866-8688-6982a3bccd17"
Parent: "e19a7379-c346-4255-8ff5-a7d759c00dda"
Template: "19bea9fa-08c7-4d8f-b1b8-08ca5d288b87"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T204102Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ID: "857ecd0e-aac3-481f-bd24-23f41ce438e5"
Parent: "8d3ee218-c542-4866-8688-6982a3bccd17"
Template: "19bea9fa-08c7-4d8f-b1b8-08ca5d288b87"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203738Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ID: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Parent: "857ecd0e-aac3-481f-bd24-23f41ce438e5"
Template: "19bea9fa-08c7-4d8f-b1b8-08ca5d288b87"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203757Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "20693300-b6c1-4362-931c-b8539c55fc1b"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/briefcase
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-briefcase"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "6d603d2e-8c40-4e3d-b623-300fd8b85367"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/calendar
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-calendar"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "a3f086dd-a41a-4774-aedc-9fb71138126a"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/camera
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-camera"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "ecae77a3-39e2-4905-a945-8b73ffde7903"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/cog
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-cog"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "aed09ebe-ed8b-4224-ad54-f168369a403a"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: /sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/home
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-home"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "2e67fc68-b84f-49c4-9529-5864aa8df5ba"
Parent: "cf6f73bb-966f-406c-ba00-e87f67bc4ce7"
Template: "4dcc294f-d5ec-4607-917a-e4a3b80ec624"
Path: "/sitecore/content/GlobalSettings/IgnitionDemo/Components/ServiceCards/IconClass/th-large"
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "0dbdc181-2cd0-4fea-b8f1-763888684f41"
Hint: StringSetting
Value: "icon-th-large"
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T203811Z

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SharedFields:
{820418B9-CC5B-4993-BC8F-A36BDA5934C5}
{E00DBB16-65F8-4FD6-9BFD-384A96F00D97}
{A0F32EF0-4E79-4DF1-9AA6-2D2C9E042FFB}
{6CB84BDC-A809-4803-A57C-8CBC323FAA64}
Languages:
- Language: en
Versions:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ID: "72e47dff-c732-4c44-992e-fd51244211bb"
Parent: "841f331d-dbdb-4586-96b5-169d097aa1c6"
Template: "0437fee2-44c9-46a6-abe9-28858d9fee8c"
Path: /sitecore/templates/Sites/Ignition/Components/Service
DB: master
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T204511Z
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: sitecore\admin
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
ID: "319de28b-2587-4356-8d5d-f2204858fc71"
Parent: "72e47dff-c732-4c44-992e-fd51244211bb"
Template: "ab86861a-6030-46c5-b394-e8f99e8b87db"
Path: /sitecore/templates/Sites/Ignition/Components/Service/ServiceCard
DB: master
SharedFields:
- ID: "06d5295c-ed2f-4a54-9bf2-26228d113318"
Hint: __Icon
Value: Office/32x32/playing_card_diamonds.png
- ID: "12c33f3f-86c5-43a5-aeb4-5598cec45116"
Hint: __Base template
Type: tree list
Value: |
{6CDD0A6B-9598-4504-89A6-FACD76D6AF29}
{F92858EF-FD23-4B23-91FF-5F2517DCF5BB}
{60A77BBE-C64E-4BD8-AAE1-31B5A8E8AFE5}
Languages:
- Language: en
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20160830T205041Z
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: sitecore\admin
Loading