-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tenant List #217
Open
M-A-Boucher
wants to merge
20
commits into
master
Choose a base branch
from
tenantlist
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tenant List #217
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
de5505f
initial commit of assessment module
jptissot ccb017a
Merge branch 'master' into assessment
jptissot 424dc70
adds assessment widget v1
axalrub 0ef30ed
Adds Assessment recipe
axalrub e0b1e95
Adds cypress tests
axalrub 1a929bf
initial commit
axalrub cc2a9fb
WIP - adds Ethos Widget, uses TailwindCSS
axalrub 320ee8d
Adds the Persona Widget and recipe
axalrub d407108
fixes alignment and mobile view
axalrub c4901dc
Adds anchor to media photos
axalrub 7005526
Adds default svg for photo profile, cypress tests
axalrub de2ac59
initial commit
axalrub ded7afd
Merge remote-tracking branch 'origin' into tenantlist
f5c23c0
fix: remove unneeded files
ff7dbe1
feat: vuetify tenant list
6fa6516
fix: make list more dense
d5afd2d
Merge branch 'master' into tenantlist
M-A-Boucher fcd29af
Merge branch 'master' into tenantlist
M-A-Boucher 3ea50a0
Delete softDev.json
M-A-Boucher 250be74
Delete ethos.js
M-A-Boucher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace StatCan.OrchardCore.Tenant | ||
{ | ||
public static class FeatureIds | ||
{ | ||
public const string Tenant= "StatCan.OrchardCore.Tenant"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using OrchardCore.Modules.Manifest; | ||
using static StatCan.OrchardCore.Tenant.FeatureIds; | ||
|
||
[assembly: Module( | ||
Name = "StatCan Tenant", | ||
Author = "Digital Innovation Team", | ||
Website = "https://digital.statcan.gc.ca", | ||
Version = "1.0.0" | ||
)] | ||
|
||
[assembly: Feature( | ||
Id = Tenant, | ||
Name = "StatCan.Tenant - Widgets", | ||
Category = "Content", | ||
Description = "Adds a widget used to display a List of Tenant and its information", | ||
Dependencies = new[] | ||
{ | ||
"OrchardCore.Lists", | ||
"OrchardCore.Widgets" | ||
} | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
using OrchardCore.Autoroute.Models; | ||
using OrchardCore.ContentManagement.Metadata; | ||
using OrchardCore.ContentManagement.Metadata.Settings; | ||
using OrchardCore.Data.Migration; | ||
using OrchardCore.Lists.Models; | ||
using OrchardCore.Title.Models; | ||
|
||
namespace StatCan.OrchardCore.Tenant | ||
{ | ||
public class Migrations : DataMigration | ||
{ | ||
private readonly IContentDefinitionManager _contentDefinitionManager; | ||
public Migrations(IContentDefinitionManager contentDefinitionManager) | ||
{ | ||
_contentDefinitionManager = contentDefinitionManager; | ||
} | ||
|
||
public int Create() | ||
{ | ||
_contentDefinitionManager.AlterTypeDefinition("Tenant", type => type | ||
.DisplayedAs("Tenant") | ||
.WithPart("Tenant", part => part | ||
.WithPosition("1") | ||
) | ||
.WithPart("TitlePart", part => part | ||
.WithPosition("0") | ||
.WithSettings(new TitlePartSettings | ||
{ | ||
Options = TitlePartOptions.GeneratedHidden, | ||
Pattern = "{{ Model.ContentItem.Content.Tenant.Name.Text }}", | ||
}) | ||
) | ||
); | ||
|
||
_contentDefinitionManager.AlterPartDefinition("Tenant", part => part | ||
.WithField("Poster", field => field | ||
.OfType("MediaField") | ||
.WithDisplayName("Poster") | ||
.WithPosition("0") | ||
) | ||
.WithField("Name", field => field | ||
.OfType("TextField") | ||
.WithDisplayName("Name") | ||
.WithPosition("1") | ||
) | ||
.WithField("Description", field => field | ||
.OfType("TextField") | ||
.WithDisplayName("Short Description") | ||
.WithPosition("2") | ||
) | ||
); | ||
|
||
_contentDefinitionManager.AlterTypeDefinition("TenantPage", type => type | ||
.DisplayedAs("Tenant Page") | ||
.Creatable() | ||
.Listable() | ||
.Draftable() | ||
.Versionable() | ||
.Securable() | ||
.WithPart("TenantPage", part => part | ||
.WithPosition("0") | ||
) | ||
.WithPart("ListPart", part => part | ||
.WithPosition("2") | ||
.WithSettings(new ListPartSettings | ||
{ | ||
PageSize = 10, | ||
ContainedContentTypes = new[] { "Tenant" }, | ||
}) | ||
) | ||
.WithPart("AutoroutePart", part => part | ||
.WithPosition("1") | ||
.WithSettings(new AutoroutePartSettings | ||
{ | ||
AllowCustomPath = true, | ||
}) | ||
) | ||
); | ||
|
||
return 1; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using OrchardCore.Modules; | ||
using OrchardCore.ResourceManagement; | ||
using OrchardCore.Data.Migration; | ||
|
||
namespace StatCan.OrchardCore.Tenant | ||
{ | ||
[Feature(FeatureIds.Tenant)] | ||
public class Startup : StartupBase | ||
{ | ||
public override void ConfigureServices(IServiceCollection serviceCollection) => serviceCollection.AddScoped<IDataMigration, Migrations>(); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Modules/StatCan.OrchardCore.Tenant/StatCan.OrchardCore.Tenant.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>$(AspNetCoreTargetFramework)</TargetFramework> | ||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);.git*;node_modules\**</DefaultItemExcludes> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="OrchardCore.Autoroute" Version="$(OrchardCoreVersion)" /> | ||
<PackageReference Include="OrchardCore.ContentManagement" Version="$(OrchardCoreVersion)" /> | ||
<PackageReference Include="OrchardCore.Contents" Version="$(OrchardCoreVersion)" /> | ||
<PackageReference Include="OrchardCore.DisplayManagement" Version="$(OrchardCoreVersion)" /> | ||
<PackageReference Include="OrchardCore.Lists" Version="$(OrchardCoreVersion)" /> | ||
<PackageReference Include="OrchardCore.ResourceManagement" Version="$(OrchardCoreVersion)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Lib\StatCan.OrchardCore.Extensions\StatCan.OrchardCore.Extensions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
36 changes: 36 additions & 0 deletions
36
src/Modules/StatCan.OrchardCore.Tenant/Views/Content-Tenant.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% assign nameLength = Model.ContentItem.Content.Tenant.Link.Text | size %} | ||
{% assign photo = Model.ContentItem.Content.Tenant.Poster.Paths.first | raw %} | ||
{% assign colors = "red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown" | split: " " %} | ||
{% assign numColors = colors | size %} | ||
{% assign avatarColorNum = nameLength | modulo: numColors %} | ||
{% assign avatarColor = colors[avatarColorNum] %} | ||
<v-list-item | ||
href="{{ Model.ContentItem.Content.Tenant.Link.Url }}" | ||
color="{{avatarColor}}" | ||
dense | ||
> | ||
<v-list-item-icon> | ||
{% if photo != empty %} | ||
<v-avatar | ||
color="primary" | ||
size="32" | ||
> | ||
<img src="{{ photo | asset_url | resize_url: width:64, height:64, mode:'crop', anchor:anchor }}" /> | ||
</v-avatar> | ||
{% else %} | ||
<v-avatar | ||
color="{{ avatarColor }}" | ||
dark | ||
size="32" | ||
> | ||
<span class="white--text text-h6">{{ Model.ContentItem.Content.Tenant.Link.Text | slice: 0 | capitalize }}</span> | ||
</v-avatar> | ||
{% endif %} | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title>{{ Model.ContentItem.Content.Tenant.Link.Text }}</v-list-item-title> | ||
<v-list-item-subtitle>{{ Model.ContentItem.Content.Tenant.Description.Text }}</v-list-item-subtitle> | ||
</v-list-item-content> | ||
<v-list-item-action> | ||
</v-list-item-action> | ||
</v-list-item> |
15 changes: 15 additions & 0 deletions
15
src/Modules/StatCan.OrchardCore.Tenant/Views/Content-TenantPage.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<v-list rounded> | ||
{% for item in Model.Content.ListPart.ContentItems %} | ||
{{ item | shape_build_display | shape_render }} | ||
{% endfor %} | ||
</v-list> | ||
|
||
{% assign previousText = "Newer Tenants" | t %} | ||
{% assign nextText = "Older Tenants" | t %} | ||
{% assign previousClass = "previous" | t %} | ||
{% assign nextClass = "next" | t %} | ||
|
||
{% shape_pager Model.Content.ListPart.Pager previous_text: previousText, next_text: nextText, | ||
previous_class: previousClass, next_class: nextClass %} | ||
|
||
{{ Model.Content.ListPart.Pager | shape_render }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,10 @@ | |
|
||
<head> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> | ||
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.0/knockout-min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/survey.ko.min.js"></script> | ||
<link href="https://unpkg.com/[email protected]/modern.css" type="text/css" rel="stylesheet"/> | ||
|
||
{{ "ThemeResources" | shape_new | shape_render }} | ||
{% resources type: "Meta" %} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"id": "softDev", | ||
"name": "Sasha", | ||
"archetype": "Software Developer", | ||
"quote": "\"I am a software developer powder lemon drops gummi bears fruitcake candy canes.\"", | ||
"jobSummary": "I spend the majority of my time focused on completing planned development tasks, with roughly 30-40% of time taken by meetings, planning for the next sprint, and fixing bugs or customer requests as they arise. I work off of JIRA tickets and have a regular stand-up with my team.", | ||
"alternativeJobTitles": [ | ||
"Software Engineer", | ||
"Application Developer", | ||
"Digital Solutions Developer", | ||
"Consultant", | ||
"Database Developer", | ||
"Mobile Developer" | ||
], | ||
"tools": [ | ||
"Calendar", | ||
"Slack" | ||
], | ||
"jtbd": ["Not specified"], | ||
"motivations": [ | ||
"When I’m planning work, I want to have better communication between stakeholders, so I can deliver something they really need and use.", | ||
"When I’m on-call, I want to be the expert on some part of the system, so I know that I’m a valuable part of the team.", | ||
"When collaborating with a large number of developers, I want to see a record of everyone’s changes, so we can pinpoint and unwind mistakes.", | ||
"When I’m pairing with my teammates, I want to learn new tools and skills, so I can keep growing in my career." | ||
], | ||
"frustrations": [ | ||
"I’m frustrated when requirements change after work has already begun on a project.", | ||
"I’m frustrated when work is inaccurately scoped, because it causes stress and eats into time planned for other work.", | ||
"I’m frustrated when I come across brittle code and something that should be an easy fix requires a lot of rework.", | ||
"I’m concerned that by taking longer than expected on a task I may be judged or seen as blocking others’ work." | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these have been committed by accident