Skip to content

Commit ac46f3a

Browse files
committed
Initial rollout of Job Listings
1 parent 6f2c48a commit ac46f3a

15 files changed

Lines changed: 754 additions & 5 deletions

File tree

SgfDevs/App_Data/Models/Job.generated.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,55 @@ public Job(IPublishedContent content)
4444

4545
// properties
4646

47+
///<summary>
48+
/// Apply URL
49+
///</summary>
50+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
51+
[ImplementPropertyType("applyURL")]
52+
public string ApplyUrl => this.Value<string>("applyURL");
53+
54+
///<summary>
55+
/// Banner Image
56+
///</summary>
57+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
58+
[ImplementPropertyType("bannerImage")]
59+
public global::Umbraco.Core.Models.PublishedContent.IPublishedContent BannerImage => this.Value<global::Umbraco.Core.Models.PublishedContent.IPublishedContent>("bannerImage");
60+
4761
///<summary>
4862
/// Compensation
4963
///</summary>
5064
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
5165
[ImplementPropertyType("compensation")]
5266
public string Compensation => this.Value<string>("compensation");
5367

68+
///<summary>
69+
/// Employment Type
70+
///</summary>
71+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
72+
[ImplementPropertyType("employmentType")]
73+
public string EmploymentType => this.Value<string>("employmentType");
74+
75+
///<summary>
76+
/// Job Description
77+
///</summary>
78+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
79+
[ImplementPropertyType("jobDescription")]
80+
public global::System.Web.IHtmlString JobDescription => this.Value<global::System.Web.IHtmlString>("jobDescription");
81+
5482
///<summary>
5583
/// Job Tags
5684
///</summary>
5785
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
5886
[ImplementPropertyType("jobTags")]
5987
public global::System.Collections.Generic.IEnumerable<global::Umbraco.Core.Models.PublishedContent.IPublishedContent> JobTags => this.Value<global::System.Collections.Generic.IEnumerable<global::Umbraco.Core.Models.PublishedContent.IPublishedContent>>("jobTags");
6088

89+
///<summary>
90+
/// Location
91+
///</summary>
92+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
93+
[ImplementPropertyType("location")]
94+
public string Location => this.Value<string>("location");
95+
6196
///<summary>
6297
/// Skill Tags
6398
///</summary>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Umbraco.ModelsBuilder.Embedded v8.9.1
6+
//
7+
// Changes to this file will be lost if the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Collections.Generic;
13+
using System.Linq.Expressions;
14+
using System.Web;
15+
using Umbraco.Core.Models;
16+
using Umbraco.Core.Models.PublishedContent;
17+
using Umbraco.Web;
18+
using Umbraco.ModelsBuilder.Embedded;
19+
20+
namespace Umbraco.Web.PublishedModels
21+
{
22+
/// <summary>Jobs</summary>
23+
[PublishedModel("jobs")]
24+
public partial class Jobs : PublishedContentModel
25+
{
26+
// helpers
27+
#pragma warning disable 0109 // new is redundant
28+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
29+
public new const string ModelTypeAlias = "jobs";
30+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
31+
public new const PublishedItemType ModelItemType = PublishedItemType.Content;
32+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
33+
public new static IPublishedContentType GetModelContentType()
34+
=> PublishedModelUtility.GetModelContentType(ModelItemType, ModelTypeAlias);
35+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.9.1")]
36+
public static IPublishedPropertyType GetModelPropertyType<TValue>(Expression<Func<Jobs, TValue>> selector)
37+
=> PublishedModelUtility.GetModelPropertyType(GetModelContentType(), selector);
38+
#pragma warning restore 0109
39+
40+
// ctor
41+
public Jobs(IPublishedContent content)
42+
: base(content)
43+
{ }
44+
45+
// properties
46+
}
47+
}

SgfDevs/SgfDevs.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
<Content Include="css\fonts\fa-regular-400.svg" />
347347
<Content Include="css\fonts\fa-solid-900.svg" />
348348
<Content Include="css\styles.css" />
349+
<Content Include="css\table.css" />
349350
<Content Include="Global.asax" />
350351
<Content Include="css\fonts\fa-brands-400.eot" />
351352
<Content Include="css\fonts\fa-brands-400.ttf" />
@@ -525,6 +526,7 @@
525526
<Compile Include="App_Data\Models\IntroImage.generated.cs" />
526527
<Compile Include="App_Data\Models\IntroVideo.generated.cs" />
527528
<Compile Include="App_Data\Models\Job.generated.cs" />
529+
<Compile Include="App_Data\Models\Jobs.generated.cs" />
528530
<Compile Include="App_Data\Models\Leader.generated.cs" />
529531
<Compile Include="App_Data\Models\Leadership.generated.cs" />
530532
<Compile Include="App_Data\Models\Login.generated.cs" />
@@ -691,6 +693,7 @@
691693
<Content Include="Views\Partials\ResetPassword.cshtml" />
692694
<Content Include="Views\Partials\ForgottenPassword.cshtml" />
693695
<Content Include="scss\modules\mobile_nav.scss" />
696+
<Content Include="Views\Jobs.cshtml" />
694697
<None Include="Web.Debug.config">
695698
<DependentUpon>Web.config</DependentUpon>
696699
</None>

SgfDevs/Views/Job.cshtml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Job>
22
@using ContentModels = Umbraco.Web.PublishedModels;
3+
@using Tag = Umbraco.Web.PublishedModels.Tag
34
@{
4-
Layout = null;
5-
}
5+
Layout = "_Layout.cshtml";
6+
var company = Model.Parent<Company>();
7+
ViewData["PageTitle"] = Model.Name + " at " + company.Name;
8+
}
9+
10+
@section Head {
11+
<link rel="stylesheet" href="~/css/table.css" />
12+
13+
<style type="text/css">
14+
.job_details ul {
15+
list-style: disc;
16+
}
17+
18+
.job_details ul li {
19+
margin-left: 1em;
20+
}
21+
</style>
22+
}
23+
24+
<div class="container job_details">
25+
<h1>@company.Name</h1>
26+
<h2>@Model.Name</h2>
27+
28+
<div>
29+
@Model.Location | @Model.EmploymentType | @Model.Compensation
30+
</div>
31+
32+
<div>
33+
@Model.JobDescription
34+
</div>
35+
36+
<div>
37+
<a href="@Model.ApplyUrl" class="button" target="_blank">Apply Now</a>
38+
</div>
39+
40+
@if (Model.SkillTags != null)
41+
{
42+
<div class="skills" style="margin: 50px 0;">
43+
<h3>Skills</h3>
44+
<div class="skill-list">
45+
@foreach (Tag skill in Model.SkillTags)
46+
{
47+
var skillName = skill.HasValue("DisplayName") ? skill.DisplayName : skill.Name;
48+
49+
<a class="button outline skill">@skillName</a>
50+
}
51+
</div>
52+
</div>
53+
}
54+
else
55+
{
56+
<div style="margin-bottom: 50px;"></div>
57+
}
58+
</div>
59+

SgfDevs/Views/Jobs.cshtml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Jobs>
2+
@using ContentModels = Umbraco.Web.PublishedModels;
3+
@{
4+
Layout = "_Layout.cshtml";
5+
var jobs = Model.Root().Descendants<Job>();
6+
}
7+
8+
@section Head {
9+
<link rel="stylesheet" href="~/css/table.css" />
10+
11+
<style type="text/css">
12+
.filter_bar section:first-child span {
13+
position: relative;
14+
top: -2px;
15+
left: 5px;
16+
}
17+
18+
tbody tr {
19+
cursor: pointer;
20+
}
21+
</style>
22+
}
23+
24+
@section Scripts {
25+
<script type="text/javascript">
26+
$(function () {
27+
$('tbody tr').on('click', function () {
28+
let url = $(this).data('href');
29+
window.location.href = url;
30+
});
31+
});
32+
</script>
33+
}
34+
35+
<div class="filter_bar">
36+
<header>
37+
<section>
38+
<img src="/images/headlines/jobs.svg" alt="Jobs">
39+
<span>Filter features coming soon!</span>
40+
</section>
41+
42+
<section>
43+
<span>
44+
<strong>@jobs.Count()</strong> Jobs
45+
</span>
46+
47+
<a href="/about/sponsorship/" class="button inverse outline light_blue">Post a Job</a>
48+
</section>
49+
</header>
50+
51+
<nav>
52+
<ul>
53+
<li><i class="fal fa-filter"></i></li>
54+
@*<li>Type</li>
55+
<li>Category</li>*@
56+
<li class="active">Skills</li>
57+
@*<li>Location</li>*@
58+
</ul>
59+
</nav>
60+
</div>
61+
62+
<div class="container" style="margin-top: 75px; margin-bottom: 75px;">
63+
<table class="table table-hover">
64+
<thead>
65+
<tr>
66+
<th scope="col">Position</th>
67+
<th scope="col">Company</th>
68+
<th scope="col">Location</th>
69+
<th scope="col">Employment Type</th>
70+
<th scope="col">Posted</th>
71+
<th scope="col">Compensation</th>
72+
</tr>
73+
</thead>
74+
<tbody>
75+
@foreach (var job in jobs)
76+
{
77+
var company = job.Parent<Company>();
78+
var companyImage = company.Image.Url();
79+
80+
<tr data-href="@job.Url()">
81+
<th scope="row">@job.Name</th>
82+
<td>@job.Parent.Name</td>
83+
<td>@job.Location</td>
84+
<td>@job.EmploymentType</td>
85+
<td>@job.CreateDate.ToString("MMMM d, yyyy")</td>
86+
<td>@job.Compensation</td>
87+
</tr>
88+
}
89+
</tbody>
90+
</table>
91+
</div>

SgfDevs/Views/_Layout.cshtml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@
1111

1212
@{
1313
Random rand = new Random();
14+
var pageTitle = "Springfield Devs - " + Model.Name;
1415

16+
if(ViewData["PageTitle"] != null)
17+
{
18+
pageTitle = "Springfield Devs - Jobs - " + ViewData["PageTitle"];
19+
}
1520
}
1621
<!DOCTYPE html>
1722
<html>
1823
<head>
1924
<meta charset="utf-8" />
2025
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
21-
<title>Springfield Devs - @Model.Name</title>
26+
<title>@pageTitle</title>
2227

23-
<link rel="stylesheet" href="/css/styles.css?data=@rand.Next()" asp-append-version="true" />
28+
<link rel="stylesheet" href="/css/styles.css?data=@rand.Next()" />
2429
@RenderSection("Head", required: false)
2530

2631
@RenderSection("TopScripts", required: false)

0 commit comments

Comments
 (0)