Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: includes/jobs/generic-header.tmpl

Issue 5994668214976512: Issue 662 - Job links shouldn't use anchors (Closed)
Patch Set: Updated patch by Wladimir #2 Created March 20, 2015, 4:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 title=Working at Eyeo
2
3 {# 1 {#
4 For each job opening you have to list the title and the name of the file under 2 For each job opening you have to list the title and the name of the file under
5 includes/jobs/openings that contains the job description. 3 pages/jobs that contains the job description.
6 #} 4 #}
7 {% set openings = [ 5 {% set openings = [
8 ("Account Manager USA/GB", "account-manager-usa-gb"), 6 ("Account Manager USA/GB", "account-manager-usa-gb"),
9 ("Senior JavaScript Developer", "senior-javascript-developer"), 7 ("Senior JavaScript Developer", "senior-javascript-developer"),
10 ("Senior Web Developer", "senior-web-developer"), 8 ("Senior Web Developer", "senior-web-developer"),
11 ("Android Developer", "android-developer"), 9 ("Android Developer", "android-developer"),
12 ("PR Intern", "pr-intern"), 10 ("PR Intern", "pr-intern"),
13 ("Business Development Manager", "business-development-manager"), 11 ("Business Development Manager", "business-development-manager"),
14 ("Student Help Communications", "student-help-communications"), 12 ("Student Help Communications", "student-help-communications"),
15 ("Data Scientist", "data-scientist"), 13 ("Data Scientist", "data-scientist"),
16 ("Software Tester", "software-tester"), 14 ("Software Tester", "software-tester"),
17 ] %} 15 ] %}
18 {% set german_openings = [] %} 16 {% set german_openings = [] %}
19 17
20 <script src="/js/jquery.ui.core.min.js"></script> 18 {% set title, _ = openings|find(page.split("/")[-1], attribute=1) or (title, "") %}
Sebastian Noack 2015/03/20 17:00:52 I'd rather move the whole logic into a function li
Wladimir Palant 2015/03/20 17:35:52 find() as it is currently defined is a pretty gene
Wladimir Palant 2015/03/20 17:35:52 How about {% set opening = openings|find(page.spli
Sebastian Noack 2015/03/20 17:50:28 This would make the logic certainly clearer. Still
saroyanm 2015/03/21 17:27:10 Done.
21 <script src="/js/jquery.ui.widget.min.js"></script>
22 <script src="/js/jquery.ui.tabs.min.js"></script>
23 <script>
24 jQuery(function()
25 {
26 jQuery(
27 "ul:first", jQuery("#tabs-openings").tabs(
28 {
29 activate: function(event, ui)
30 {
31 var hash = ui.newTab.find("a")[0].hash;
32 if (hash != "#jobs-overview")
33 location.hash = hash;
34 window.scrollTo(0, 0);
35 }
36 })
37 ).addClass("ui-tabs-nav-vertical");
38
39 jQuery("#tabs-details").tabs();
40
41 jQuery(window).on("hashchange", function()
42 {
43 var hash = location.hash != "" ? location.hash : "#jobs-overview";
44 var escapedHash = hash.replace(/\+/g, "\\+");
45 jQuery("[href=" + escapedHash + "]").click();
46 });
47
48 setTimeout(function() { window.scrollTo(0, 0); }, 0);
49 });
50 </script>
51
52 19
53 <header class="page-title"> 20 <header class="page-title">
54 <h1>Working at Eyeo</h1> 21 <h1>Working at Eyeo</h1>
55 </header> 22 </header>
56 23
57 <div id="jobs-info" class="content-block"> 24 <div id="jobs-info" class="content-block">
58 <div id="tabs-openings" class="columns-container one-sidebar"> 25 <div id="tabs-openings" class="columns-container one-sidebar">
59 <div class="column sidebar-left"> 26 <div class="column sidebar-left">
60 <h3 class="heading centered"><span>Current openings:</span></h3> 27 <h3 class="heading centered"><span>Current openings:</span></h3>
61 28
62 <ul> 29 <ul class="ui-tabs-nav ui-tabs-nav-vertical">
63 <li id="jobs-overview-tab"><a href="#jobs-overview"></a></li>
64 {% for title, file in openings %} 30 {% for title, file in openings %}
65 <li> 31 <li {% if "jobs/" ~ file == page %} class="ui-tabs-active" {% endif %} >
Wladimir Palant 2015/03/20 17:35:52 I really wouldn't hardcode the full page path here
saroyanm 2015/03/21 17:27:10 Done.
66 <a href="#{{ title|slugify }}"> 32 <a href="/en/jobs/{{ file }}" class="ui-tabs-anchor">
Wladimir Palant 2015/03/20 17:35:52 This should be href="{{("jobs/" + file)|linkify}}"
saroyanm 2015/03/21 17:27:10 Done.
67 {{ title }} 33 {{ title }}
68 {% if file in german_openings %} 34 {% if file in german_openings %}
69 <img src="/images/flags/de.png" alt="German" width="15" height=" 10"> 35 <img src="/images/flags/de.png" alt="German" width="15" height=" 10">
70 {% endif %} 36 {% endif %}
71 </a> 37 </a>
72 </li> 38 </li>
73 {% endfor %} 39 {% endfor %}
74 </ul> 40 </ul>
75 41
76 <p id="hiring-badges"> 42 <p id="hiring-badges">
77 <img id="ihk-logo" src="/images/ihk.png" alt="IHK Ausbildungsbetrieb" wi dth="120" height="80"> 43 <img id="ihk-logo" src="/images/ihk.png" alt="IHK Ausbildungsbetrieb" wi dth="120" height="80">
78 <img id="fair-company-logo" src="/images/fair-company.jpg" alt="Fair Com pany" height="80"> 44 <img id="fair-company-logo" src="/images/fair-company.jpg" alt="Fair Com pany" height="80">
79 </p> 45 </p>
80 46
81 <p> 47 <p>
82 <? include jobs/contact ?> 48 <? include jobs/contact ?>
83 </p> 49 </p>
84 </div> 50 </div>
85 51
86 <div class="column"> 52 <div class="column">
87 <div id="panels-openings"> 53 <div id="panels-openings" class="ui-tabs-panel">
88 <div id="jobs-overview">
89 <? include jobs/overview ?>
90
91 <div id="tabs-details">
92 <ul>
93 <li><a href="#why">Why work with us?</a></li>
94 <li><a href="#benefits">Employee benefits</a></li>
95 <li><a href="#office">Our office</a></li>
96 </ul>
97
98 <div id="why">
99 <? include jobs/why ?>
100 </div>
101
102 <div id="benefits">
103 <? include jobs/benefits ?>
104 </div>
105
106 <div id="office">
107 <? include jobs/office ?>
108 </div>
109 </div>
110 </div>
111
112 {% for title, file in openings %}
113 <div id="{{ title|slugify }}">
114 <h2>{{ title }}</h2>
115 <? include jobs/openings/{{ file }} ?>
116 <a href="mailto:jobs@eyeo.com"><button>apply now</button></a>
117 <a href="#jobs-overview"><button class="why-work-here-button">why wo rk here?</button></a>
118 </div>
119 {% endfor %}
120 </div>
121 </div>
122 </div>
123 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld