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 >
0 commit comments