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

Commit

Permalink
Merge branch 'master' into infrastructure/multiproject
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegJytnik committed Dec 18, 2015
2 parents 4135b45 + 51d9060 commit 254332b
Show file tree
Hide file tree
Showing 49 changed files with 259 additions and 180 deletions.
2 changes: 1 addition & 1 deletion src/Feature/Accounts/code/Sitecore.Feature.Accounts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<SubType>Designer</SubType>
</Content>
<Content Include="packages.config" />
<None Include="Properties\PublishProfiles\Habitat.pubxml" />
<None Include="Properties\PublishProfiles\Local.pubxml" />
<Content Include="Scripts\Accounts\Accounts.js" />
<Content Include="Views\Accounts\Login.cshtml" />
<Content Include="Views\Accounts\AccountsMenu.cshtml" />
Expand Down
3 changes: 2 additions & 1 deletion src/Feature/Demo/code/Sitecore.Feature.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<SubType>Designer</SubType>
</Content>
<Content Include="packages.config" />
<None Include="Properties\PublishProfiles\Habitat.pubxml" />
<None Include="Properties\PublishProfiles\Local.pubxml" />
<Content Include="Views\Demo\KeyBehaviourCacheList.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
Expand Down Expand Up @@ -151,6 +151,7 @@
<Compile Include="Models\VisitInformation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Templates.cs" />
<Compile Include="Texts\Captions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\foundation\SitecoreExtensions\code\Sitecore.Foundation.SitecoreExtensions.csproj">
Expand Down
72 changes: 72 additions & 0 deletions src/Feature/Demo/code/Texts/Captions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
namespace Sitecore.Feature.Demo.Texts
{
using Sitecore.Foundation.SitecoreExtensions.Repositories;

public class Captions
{
public class VisitDetails
{
public static string GeoIpPostalCode => DictionaryRepository.Get("/Demo/VisitDetails/GeoIP/PostalCode", "Postal Code");
public static string GeoIpCity => DictionaryRepository.Get("/Demo/VisitDetails/GeoIP/City", "City");
public static string GeoIp => DictionaryRepository.Get("/Demo/VisitDetails/GeoIP", "Geo IP Location");
public static string ThisVisit => DictionaryRepository.Get("/Demo/VisitDetails/Title", "This Visit");
public static string PagesViewed => DictionaryRepository.Get("/Demo/VisitDetails/PagesViewed", "Pages Viewed");
public static string EngagementValue => DictionaryRepository.Get("/Demo/VisitDetails/EngagementValue", "Engagement Value");
public static string Patterns => DictionaryRepository.Get("/Demo/VisitDetails/Patterns", "Patterns");
public static string Campaign => DictionaryRepository.Get("/Demo/VisitDetails/Campaign", "Campaign");
public static string Pages => DictionaryRepository.Get("/Demo/VisitDetails/Pages", "Pages");

public static string Goals => DictionaryRepository.Get("/Demo/VisitDetails/Goals", "Goals");
public static string Engagement => DictionaryRepository.Get("/Demo/VisitDetails/Engagement", "Engagement");
public static string EndVisit => DictionaryRepository.Get("/Demo/VisitDetails/EndVisit", "End Visit");
public static string EndVisitDescription => DictionaryRepository.Get("/Demo/VisitDetails/EndVisit/Description", "End the current visit and submits it to the Sitecore Experience Database");

public class Device
{
public static string OperatingSystem => DictionaryRepository.Get("/Demo/VisitDetails/Device/OS", "Operating System");
public static string Title => DictionaryRepository.Get("/Demo/VisitDetails/Device", "Device");
public static string Type => DictionaryRepository.Get("/Demo/VisitDetails/Device/Type", "Device Type");
public static string Vendor => DictionaryRepository.Get("/Demo/VisitDetails/Device/Vendor", "Vendor");
public static string Browser => DictionaryRepository.Get("/Demo/VisitDetails/Device/Browser", "Browser");
public static string DisplayHeight => DictionaryRepository.Get("/Demo/VisitDetails/Device/DisplayHeight", "Display Height");
public static string DisplayWidth => DictionaryRepository.Get("/Demo/VisitDetails/Device/DisplayWidth", "Display Width");
}
}

public class ContactDetails
{
public static string Title => DictionaryRepository.Get("/Demo/ContactDetails/Title", "Contact");
public static string NumberOfVisits => DictionaryRepository.Get("/Demo/ContactDetails/NoOfVisits", "Number of Visits");
public static string EngagementValue => DictionaryRepository.Get("/Demo/ContactDetails/EngagementValue", "Engagement Value");
public static string Identification => DictionaryRepository.Get("/Demo/ContactDetails/Identification", "Identification");
public static string ContactId => DictionaryRepository.Get("/Demo/ContactDetails/ContactID", "Contact ID");
public static string Identifier => DictionaryRepository.Get("/Demo/ContactDetails/Identifier", "Identifier");
public static string IdentificationStatus => DictionaryRepository.Get("/Demo/ContactDetails/IdentificationStatus", "Identification status");

public static string PersonalData => DictionaryRepository.Get("/Demo/ContactDetails/PersonalData", "Personal Data");
public static string Picture => DictionaryRepository.Get("/Demo/ContactDetails/Picture", "Picture");
public static string Addresses => DictionaryRepository.Get("/Demo/ContactDetails/Addresses", "Addresses");
public static string PhoneNumbers => DictionaryRepository.Get("/Demo/ContactDetails/PhoneNumbers", "Phone Numbers");

public static string Communication => DictionaryRepository.Get("/Demo/ContactDetails/Communication", "Communication");
public static string CommunicationRevoked => DictionaryRepository.Get("/Demo/ContactDetails/CommunicationRevoked", "Communication Revoked");
public static string ConsentRevoked => DictionaryRepository.Get("/Demo/ContactDetails/ConsentRevoked", "Consent Revoked");
public static string EmailAddresses => DictionaryRepository.Get("/Demo/ContactDetails/EmailAddresses", "Email Addresses");
public static string PreferenceLanguage => DictionaryRepository.Get("/Demo/ContactDetails/PreferenceLanguage", "Preference Language");

public static string BehaviorProfiles => DictionaryRepository.Get("/Demo/ContactDetails/BehaviorProfiles", "Behavior Profiles");
public static string TimesScored => DictionaryRepository.Get("/Demo/ContactDetails/NumberOfTimesScored", "Number Of Times Scored");
public static string Scores => DictionaryRepository.Get("/Demo/ContactDetails/Scores", "Scores");

public static string KeyBehaviorCache => DictionaryRepository.Get("/Demo/ContactDetails/KeyBehaviorCache", "Key Behavior Cache");
public static string Campaigns => DictionaryRepository.Get("/Demo/ContactDetails/Campaigns", "Campaigns");
public static string Channels => DictionaryRepository.Get("/Demo/ContactDetails/Channels", "Channels");
public static string Goals => DictionaryRepository.Get("/Demo/ContactDetails/Goals", "Goals");
public static string CustomValues => DictionaryRepository.Get("/Demo/ContactDetails/CustomValues", "Custom Values");
public static string Outcomes => DictionaryRepository.Get("/Demo/ContactDetails/Outcomes", "Outcomes");
public static string PageEvents => DictionaryRepository.Get("/Demo/ContactDetails/PageEvents", "Page Events");
public static string Venues => DictionaryRepository.Get("/Demo/ContactDetails/Venues", "Venues");

}
}
}
75 changes: 30 additions & 45 deletions src/Feature/Demo/code/Views/Demo/ContactDetails.cshtml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
@using Sitecore.Feature.Demo.Models
@using Sitecore.Feature.Demo.Texts
@using Sitecore.Foundation.SitecoreExtensions.Extensions
@using Sitecore.Foundation.SitecoreExtensions.Repositories
@using Sitecore.Mvc.Extensions
@model ContactInformation
<div id="contact-details" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
@DictionaryRepository.Get("/Demo/ContactDetails/Title", "Contact")
@Captions.ContactDetails.Title
<span class="stats">
<span title="@DictionaryRepository.Get("/Demo/ContactDetails/NoOfVisits", "Number of Visits")" data-toggle="tooltip" data-placement="left">
<span title="@Captions.ContactDetails.NumberOfVisits" data-toggle="tooltip" data-placement="left">
<span class="glyphicon glyphicon glyphicon-random" aria-hidden="true"></span>
<span class="badge">@Model.NoOfVisits</span>
</span>
<span title="@DictionaryRepository.Get("/Demo/ContactDetails/EngagementValue", "Engagement Value")" data-toggle="tooltip" data-placement="left">
<span title="@Captions.ContactDetails.EngagementValue" data-toggle="tooltip" data-placement="left">
<span class="glyphicon glyphicon-heart-empty" aria-hidden="true"></span>
<span class="badge">@Model.EngagementValue</span>
</span>
Expand All @@ -23,18 +24,18 @@
<div class="panel panel-default">
<div class="panel-heading">
<a href="#contactDetailsIdentification" data-parent="#accordion" data-toggle="collapse" class="panel-title collapsed">
@DictionaryRepository.Get("/Demo/contactDetails/Identification", "Identification")
@Captions.ContactDetails.Identification
<span class="expand-icon glyphicon" aria-hidden="true"></span>
</a>
</div>
<div class="panel-collapse collapse" id="contactDetailsIdentification">
<div class="panel-body">
<dl class="list-unstyled">
<dt>@DictionaryRepository.Get("/Demo/ContactDetails/ContactID", "Contact ID")</dt>
<dt>@Captions.ContactDetails.ContactId</dt>
<dd>@Model.Id.ToString()</dd>
<dt>@DictionaryRepository.Get("/Demo/ContactDetails/Identifier", "Identifier")</dt>
<dt>@Captions.ContactDetails.Identifier</dt>
<dd>@Model.Identifier</dd>
<dt>@DictionaryRepository.Get("/Demo/ContactDetails/IdentificationStatus`", "Identification status")</dt>
<dt>@Captions.ContactDetails.IdentificationStatus</dt>
<dd>@Model.IdentificationStatus</dd>
</dl>
</div>
Expand All @@ -43,7 +44,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<a href="#contactPersonalData" data-parent="#accordion" data-toggle="collapse" class="panel-title collapsed">
@DictionaryRepository.Get("/Demo/contactDetails/PersonalData", "Personal Data")
@Captions.ContactDetails.PersonalData
<span class="expand-icon glyphicon" aria-hidden="true"></span>
</a>
</div>
Expand All @@ -52,7 +53,7 @@
<dl class="list-unstyled">
@if (!Model.Picture?.IsEmpty ?? false)
{
<dt>@DictionaryRepository.Get("/Demo/contactDetails/Picture", "Picture")</dt>
<dt>@Captions.ContactDetails.Picture</dt>
<dd>
<img class="img-thumbnail" src="data:image;base64,@Convert.ToBase64String(Model.Picture.Picture)" />
</dd>
Expand All @@ -74,7 +75,7 @@
}
@if (Model.Addresses != null && !Model.Addresses.IsEmpty && Model.Addresses.Entries != null)
{
<dt>@DictionaryRepository.Get("/Demo/contactDetails/Addresses", "Addresses")</dt>
<dt>@Captions.ContactDetails.Addresses</dt>
<dd>
<dl>
@foreach (var key in Model.Addresses.Entries.Keys)
Expand All @@ -99,7 +100,7 @@
}
@if (Model.PhoneNumbers != null && !Model.PhoneNumbers.IsEmpty && Model.PhoneNumbers.Entries != null)
{
<dt>@DictionaryRepository.Get("/Demo/contactDetails/PhoneNumbers", "Phone Numbers")</dt>
<dt>@Captions.ContactDetails.PhoneNumbers</dt>
<dd>
<dl>
@foreach (var key in Model.PhoneNumbers.Entries.Keys)
Expand All @@ -121,21 +122,21 @@
<div class="panel panel-default">
<div class="panel-heading">
<a href="#contactCommunication" data-parent="#accordion" data-toggle="collapse" class="panel-title collapsed">
@DictionaryRepository.Get("/Demo/contactDetails/Communication", "Communication")
@Captions.ContactDetails.Communication
<span class="expand-icon glyphicon" aria-hidden="true"></span>
</a>
</div>
<div class="panel-collapse collapse" id="contactCommunication">
<div class="panel-body">
<dl class="list-unstyled">
<dt>@DictionaryRepository.Get("/Demo/contactDetails/CommunicationRevoked", "Communication Revoked")</dt>
<dt>@Captions.ContactDetails.CommunicationRevoked</dt>
<dd>@Model.CommunicationProfile.CommunicationRevoked</dd>
<dt>@DictionaryRepository.Get("/Demo/contactDetails/ConsentRevoked", "Consent Revoked") </dt>
<dt>@Captions.ContactDetails.ConsentRevoked</dt>
<dd>@Model.CommunicationProfile.ConsentRevoked</dd>

@if (Model.Emails != null && !Model.Emails.IsEmpty && Model.Emails.Entries != null)
{
<dt>@DictionaryRepository.Get("/Demo/contactDetails/EmailAddresses", "Email Addresses") </dt>
<dt>@Captions.ContactDetails.EmailAddresses</dt>
<dd>
<dl>
@foreach (var key in Model.Emails.Entries.Keys)
Expand All @@ -148,7 +149,7 @@
</dl>
</dd>
}
<dt>@DictionaryRepository.Get("/Demo/contactDetails/PreferenceLanguage", "Preference Language") </dt>
<dt>@Captions.ContactDetails.PreferenceLanguage</dt>
<dd>@Model.Preferences.Language</dd>
</dl>
</div>
Expand All @@ -158,7 +159,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<a href="#contactBehavoiur" data-parent="#accordion" data-toggle="collapse" class="panel-title collapsed">
@DictionaryRepository.Get("/Demo/contactDetails/BehaviourProfiles", "Behaviour Profiles")
@Captions.ContactDetails.BehaviorProfiles
<span class="expand-icon glyphicon" aria-hidden="true"></span>
</a>
</div>
Expand All @@ -181,10 +182,12 @@
<dt>Id</dt>
<dd>@entry.Id</dd>
<dt>
@DictionaryRepository.Get("/Demo/contactDetails/NumberOfTimesScored", "Number Of Times Scored")
@Captions.ContactDetails.TimesScored
</dt>
<dd>@entry.NumberOfTimesScored</dd>
<dt>@DictionaryRepository.Get("/Demo/contactDetails/Scores", "Scores")</dt>
<dt>
@Captions.ContactDetails.Scores
</dt>
@foreach (var score in entry.Scores.Select(x => $"{x.Name}: {x.Value}"))
{
<dd>@score</dd>
Expand All @@ -202,39 +205,21 @@
<div class="panel panel-default">
<div class="panel-heading">
<a href="#contactKeyBehaviorCache" data-parent="#accordion" data-toggle="collapse" class="panel-title collapsed">
@DictionaryRepository.Get("/Demo/ContactDetails/KeyBehaviorCache", "Key Behavior Cache")
@Captions.ContactDetails.KeyBehaviorCache
<span class="expand-icon glyphicon" aria-hidden="true"></span>
</a>
</div>
<div class="panel-collapse collapse" id="contactKeyBehaviorCache">
<div class="panel-body">
@if (Model.KeyBehaviorCache != null)
{
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel
{
Entries = Model.KeyBehaviorCache.Campaigns,
Title = DictionaryRepository.Get("/Demo/ContactDetails/Campaigns", "Campaigns")
})
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel
{
Entries = Model.KeyBehaviorCache.Channels,
Title = DictionaryRepository.Get("/Demo/ContactDetails/Channels", "Channels")
})
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel
{
Entries = Model.KeyBehaviorCache.Goals,
Title = DictionaryRepository.Get("/Demo/ContactDetails/Goals", "Goals")
})
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel
{
Entries = Model.KeyBehaviorCache.CustomValues,
Title = DictionaryRepository.Get("/Demo/ContactDetails/CustomValues", "Custom Values")
})
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel
{
Entries = Model.KeyBehaviorCache.Outcomes,
Title = DictionaryRepository.Get("/Demo/ContactDetails/Outcomes", "Outcomes")
})
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.Campaigns, Title = Captions.ContactDetails.Campaigns })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.Channels, Title = Captions.ContactDetails.Channels })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.Goals, Title = Captions.ContactDetails.Goals })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.CustomValues, Title = Captions.ContactDetails.CustomValues })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.Outcomes, Title = Captions.ContactDetails.Outcomes })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.PageEvents, Title = Captions.ContactDetails.PageEvents })
@Html.Partial("KeyBehaviourCacheList", new KeyBehaviorCacheEntryModel { Entries = Model.KeyBehaviorCache.Venues, Title = Captions.ContactDetails.Venues })
}
</div>
</div>
Expand Down
Loading

0 comments on commit 254332b

Please sign in to comment.