-
Notifications
You must be signed in to change notification settings - Fork 581
/
job_detail.html
241 lines (204 loc) · 9.65 KB
/
job_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
{% extends "jobs/base.html" %}
{% load boxes %}
{% block page_title %}{{ object.display_name }} | {{ SITE_INFO.site_name }}{% endblock %}
{% block body_attributes %}class="jobs default-page single-job"{% endblock %}
{% block content_attributes %}with-right-sidebar{% endblock %}
{% block content %}
{% load companies %}
<article class="text">
{% if request.user.is_staff %}
<p class="user-feedback level-notice">
This job is in <strong>{{ object.status }}</strong> mode.
</p>
{% endif %}
<h1 class="listing-company">
<span class="listing-company-name">
<span class="company-name">
{{ object.job_title }}
{% if object.is_new %}
<span class="listing-new">New</span>
{% endif %}
<br/>
{{ object.company_name }}
</span>
{% if user_can_edit %}
<br/><a href="{% url 'jobs:job_edit' pk=object.pk %}">Edit your listing</a>
{% endif %}
</span>
<span class="listing-location"><a href="{% url 'jobs:job_list_location' slug=object.location_slug %}" title="More jobs in {{ object.display_location }}">{{object.display_location}}</a></span>
</h1>
<!-- User input html/markup/rst/whatever -->
<div class="job-description">
<h2>Job Title {% if object.status != 'approved' %}<small>({{ object.status }})</small>{% endif %}</h2>
{{ object.job_title }}
<h2>Job Description</h2>
{{ object.description }}
<h2>Restrictions</h2>
<ul>
{% if object.telecommuting %}
<li><strong>Telecommuting is OK</strong></li>
{% else %}
<li><strong>No telecommuting</strong></li>
{% endif %}
{% if object.agencies %}
<li><strong>Agencies are OK</strong></li>
{% else %}
<li><strong>No Agencies Please</strong></li>
{% endif %}
</ul>
{% if object.requirements %}
<h2>Requirements</h2>
{{ object.requirements }}
{% endif %}
{% if object.display_description %}
<h2>About the Company</h2>
{{ object.display_description }}
{% endif %}
<h2>Contact Info</h2>
<ul>
{% if object.contact %}
<li><strong>Contact</strong>: {{ object.contact }}</li>
{% endif %}
<li><strong>E-mail contact</strong>: <a class="reference external" href="mailto:{{ object.email|urlencode }}">{{ object.email|render_email }}</a></li>
{% if object.url %}
<li><strong>Web</strong>: <a class="reference external" href="{{ object.url }}">{{ object.url }}</a></li>
{% endif %}
</ul>
{% if under_preview %}
<form action="{% url "jobs:job_preview" pk=object.pk %}" method="post">
{% csrf_token %}
<a class="review_button button" href="{% url 'jobs:job_edit' pk=object.pk %}">Edit</a>
<button name="action" value="review">Submit for Approval</button>
</form>
{% endif %}
{% if not under_preview %}
{% if jobs_board_admin or user_can_edit %}
<hr>
<h1>Comments are only viewable between the submitter and job reviewers.</h1>
<h2>Job Review Discussion</h2>
<dl id="comments">
{% for comment in object.review_comments.all %}
<dt>
<strong>{{ comment.created }} - {{ comment.creator.get_full_name|default:comment.creator.get_username }}</strong>
</dt>
<dd>
{{ comment.comment.rendered|safe }}
</dd>
{% endfor %}
</dl>
<form class="wide-form jobs-form" action="{% url 'jobs:job_review_comment_create' %}" method="post">
{% csrf_token %}
{{ job_review_form.as_p }}
{% if user_can_edit and not jobs_board_admin %}
<div>
<button type="submit" name="Submit">Submit</button>
</div>
{% elif jobs_board_admin %}
<p>
<label for="canned_response">Insert canned response:</label>
<select id="canned_response">
<option value="empty">---</option>
<option value="not_python">No or not enough emphasis on Python</option>
<option value="formatting">Formatting broken</option>
<option value="duplicate">Duplicate posting</option>
<option value="voluntary">Voluntary, non paid job</option>
</select>
</p>
<div>
<a class="review_button button" href="{% url 'jobs:job_edit' pk=object.pk %}?next={{request.get_full_path}}">Edit</a>
<button type="submit" name="Submit">Comment</button>
{% if object.status != 'approved' %}
<button class="review_button" name="action" value="approve">Approve</button>
{% endif %}
{% if object.status != 'rejected' %}
<button class="review_button" name="action" value="reject">Reject</button>
{% endif %}
</div>
{% endif %}
</form>
<hr>
{% endif %}
{% endif %}
</div><!-- end .job-post-content -->
<div class="job-post-meta">
<p class="job-meta">
<!-- Company URL -->
{% if object.company %}
<span class="company-link"><a href="{{ object.company.url }}">{{ object.company.url }}</a></span>
{% endif %}
<!-- Date posted -->
<span class="listing-posted">Posted <time datetime="{{ object.created|date:"c" }}">{{ object.created|date:"d F Y" }}</time></span>
</p>
<p class="job-tags">
<!-- Job Types -->
<span class="listing-job-type">{% for type in object.job_types.all %}<a href="{% url 'jobs:job_list_type' slug=type.slug %}" title="More {{ type.name }} jobs">{{ type.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</span>
<!-- Company Category (Job Category) -->
<span class="listing-company-category"><a href="{% url 'jobs:job_list_category' slug=object.category.slug %}" title="More jobs in {{ object.category.name }}">{{ object.category.name }}</a></span>
</p>
</div>
</article>
<!-- Next or Previous Jobs by date posted -->
<p class="previous-next">
{% with object.get_previous_listing as previous %}
{% if previous %}
<a class="prev-button" href="{{ previous.get_absolute_url }}">
<span class="prev-button-text"><span class="icon-arrow-left"><span>←</span></span> Previous</span>
<span class="prevnext-description">
<span class="company-name">{{ previous.display_name }}</span> in <span class="company-location">{{ previous.display_location }}</span>
</span>
</a>
{% else %}
<a class="prev-button disabled">
<span class="prev-button-text"><span class="icon-arrow-left"><span>←</span></span> Previous</span>
</a>
{% endif %}
{% endwith %}
{% with object.get_next_listing as next %}
{% if next %}
<a class="next-button" href="{{ next.get_absolute_url }}">
<span class="next-button-text">Next <span class="icon-arrow-right"><span>→</span></span></span>
<span class="prevnext-description">
<span class="company-name">{{ next.display_name }}</span> in <span class="company-location">{{ next.display_location }}</span>
</span>
</a>
{% else %}
<a class="next-button disabled">
<span class="next-button-text">Next <span class="icon-arrow-right"><span>→</span></span></span>
</a>
{% endif %}
{% endwith %}
</p>
{% endblock content %}
{% block right_sidebar_header %}
<div class="sidebar-widget">
{% if category_jobs %}
<h3 class="widget-title">More jobs in <a href="{% url 'jobs:job_list_category' slug=object.category.slug %}">{{ object.category.name }}</a></h3>
<ul class="menu">
{% if object.company %}
{% for job in category_jobs %}
<li><a href="{% url 'jobs:job_list_company' slug=object.company.slug %}">{{ job.display_location }}</a></li>
{% endfor %}
{% endif %}
</ul>
{% endif %}
</div>
{% endblock right_sidebar_header %}
{% block extra_js %}
{% if jobs_board_admin %}
<script type="text/javascript">
// TODO: allow configuring canned responses in admin
var responses = {
"voluntary": "The Python Job Board is for paid positions only. The Python Community has a separate Wiki for listing voluntary positions available at https://wiki.python.org/moin/VolunteerOpportunities.",
"not_python": "The Python Job Board is for positions in which the primary role involves the Python programming language or development frameworks based on Python.\n\nPlease rephrase and resubmit.\n\nThanks.",
"formatting": "Please resubmit your posting and check that the job description and/or requirements text renders fine in the job preview.\n\nThanks.",
"duplicate": "This seems to be a duplicate of your earlier posting.\n\nIf not, please rephrase to make the difference clear.\n\nThanks."
};
$(document).ready(function() {
var commment_field = $('#id_comment');
$('#canned_response').change(function(){
commment_field.val(responses[$(this).val()]);
});
});
</script>
{% endif %}
{% endblock %}