Permalink
Browse files

updated migrations to south and cleaned up pages

  • Loading branch information...
1 parent 59b13a4 commit d6ef414d25f515b0b8b6cfb82cd696f22cf7dfde Jen Fong-Adwent committed Dec 14, 2011
No changes.
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% from "careers/macros.html" import position_listing %}
{% block page_title %}{{ _('Mozilla Jobs — Open Positions') }}{% endblock %}
@@ -22,42 +23,19 @@ <h1 class="home-header">{{ _('Careers at Mozilla') }}</h1>
else sits in the left and middle alphabetically. Since the categories
do not change often (or at all), the hacky number will be generally okay.
#}
- {% for category in categories -%}
- {% if loop.first %}
- <ul>
- {% endif %}
- <li>
- <h2>{{ category.name }}</h2>
- <ul>
- {% for position in category.position_set.order_by('title') %}
- <li>
- <a href="{{ url('careers.views.position', job_id=position.job_id) }}"
- data-jobtype="{{ position.job_type.lower() }}"
- alt="{{ position.title }}"
- title="{{ position.title }}">{{ position.title }}</a>
- </li>
- {% endfor %}
- </ul>
- </li>
- {% if loop.index % 7 == 0 %}
- </ul><ul>
- {% endif %}
- {% endfor -%}
+ <ul>
+ {% for category in categories[:5] -%}
+ {{ position_listing(category) }}
+ {% endfor %}
+ </ul>
+ <ul>
+ {% for category in categories[6:] -%}
+ {{ position_listing(category) }}
+ {% endfor %}
</ul>
{% if internships %}
<ul>
- <li>
- <h2>{{ internships.name }}</h2>
- <ul>
- {% for position in internships.position_set.order_by('title') %}
- <li>
- <a href="{{ url('careers.views.position', job_id=position.job_id) }}"
- data-jobtype="{{ position.job_type.lower() }}"
- alt="{{ position.title }}"
- title="{{ position.title }}">{{ position.title }}</a>
- </li>
- {% endfor %}
- </li>
+ {{ position_listing(internships) }}
</ul>
{% endif %}
</div>
@@ -1,15 +1,15 @@
-{% macro breadcrumbs() -%}
-<header id="jobs-header">
- <nav id="jobs-breadcrumbs">
- <ul>
- {% for crumb in varargs -%}
- <li><a href="{{ crumb[0] }}">{{ crumb[1] }}</a></li>
- {% endfor -%}
- <li>{{ kwargs.last }}</li>
+{% macro position_listing(category) -%}
+ <li>
+ <h2>{{ category.name }}</h2>
+ <ul>
+ {% for position in category.position_set.order_by('title') %}
+ <li>
+ <a href="{{ url('careers.views.position', job_id=position.job_id) }}"
+ data-jobtype="{{ position.job_type.lower() }}"
+ alt="{{ position.title }}"
+ title="{{ position.title }}">{{ position.title }}</a>
+ </li>
+ {% endfor %}
</ul>
- </nav>
- {% if kwargs.title -%}
- <h1>{{ kwargs.title }}</h1>
- {% endif -%}
-</header>
+ </li>
{% endmacro -%}
@@ -6,7 +6,7 @@
<div id="main">
<div class="primary">
<h1>{{ position.title }}</h1>
- <h2 class="locations">{{ position.location }}</h2>
+ <h2 class="locations">{{ position.location|default(_('All'), True) }}</h2>
<div id="job-meta">
<div class="float">
<div id="job-description">
View
@@ -4,7 +4,7 @@
def home(request):
- categories = Category.objects.exclude(name='Internships').order_by('name')
+ categories = list(Category.objects.exclude(name='Internships').order_by('name'))
internships = get_object_or_404(Category, name='Internships')
return render(request, 'careers/home.html', {
'categories': categories,
View
@@ -1,32 +0,0 @@
-BEGIN;
-CREATE TABLE `django_jobvite_category` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `name` varchar(100) NOT NULL,
- `slug` varchar(100) NOT NULL UNIQUE,
- `description` longtext NOT NULL
-)
-;
-CREATE TABLE `django_jobvite_position_category` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `position_id` integer NOT NULL,
- `category_id` integer NOT NULL,
- UNIQUE (`position_id`, `category_id`)
-)
-;
-ALTER TABLE `django_jobvite_position_category` ADD CONSTRAINT `category_id_refs_id_a673f532` FOREIGN KEY (`category_id`) REFERENCES `django_jobvite_category` (`id`);
-CREATE TABLE `django_jobvite_position` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `job_id` varchar(25) NOT NULL,
- `title` varchar(100) NOT NULL,
- `requisition_id` integer UNSIGNED NOT NULL,
- `job_type` varchar(10) NULL,
- `location` varchar(150) NOT NULL,
- `date` varchar(100) NOT NULL,
- `detail_url` varchar(200) NOT NULL,
- `apply_url` varchar(200) NOT NULL,
- `description` longtext NOT NULL,
- `brief_description` longtext
-)
-;
-ALTER TABLE `django_jobvite_position_category` ADD CONSTRAINT `position_id_refs_id_bdc7c0e1` FOREIGN KEY (`position_id`) REFERENCES `django_jobvite_position` (`id`);
-COMMIT;
View
@@ -1,32 +0,0 @@
-BEGIN;
-CREATE TABLE `django_jobvite_category` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `name` varchar(100) NOT NULL,
- `slug` varchar(100) NOT NULL UNIQUE,
- `description` longtext NOT NULL
-)
-;
-CREATE TABLE `django_jobvite_position_category` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `position_id` integer NOT NULL,
- `category_id` integer NOT NULL,
- UNIQUE (`position_id`, `category_id`)
-)
-;
-ALTER TABLE `django_jobvite_position_category` ADD CONSTRAINT `category_id_refs_id_a673f532` FOREIGN KEY (`category_id`) REFERENCES `django_jobvite_category` (`id`);
-CREATE TABLE `django_jobvite_position` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `job_id` varchar(25) NOT NULL,
- `title` varchar(100) NOT NULL,
- `requisition_id` integer UNSIGNED NOT NULL,
- `job_type` varchar(10) NOT NULL,
- `location` varchar(150) NOT NULL,
- `date` varchar(100) NOT NULL,
- `detail_url` varchar(200) NOT NULL,
- `apply_url` varchar(200) NOT NULL,
- `description` longtext NOT NULL,
- `brief_description` longtext
-)
-;
-ALTER TABLE `django_jobvite_position_category` ADD CONSTRAINT `position_id_refs_id_bdc7c0e1` FOREIGN KEY (`position_id`) REFERENCES `django_jobvite_position` (`id`);
-COMMIT;
2 vendor
Submodule vendor updated 1 files
+1 −1 src/django-jobvite

0 comments on commit d6ef414

Please sign in to comment.