Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

V1.0.0 #59

Merged
merged 30 commits into from

1 participant

@rogerskw
Owner

No description provided.

rogerskw added some commits
@rogerskw rogerskw Issue #26: Add jobs table to database 4ab5fa8
@rogerskw rogerskw Issue #26: Add a careers page to '/info/careers' that contains jobs that
brothers have held
4c742d2
@rogerskw rogerskw Issue #26: Move resumes and careers to a new nav bar tab called 'Recruit
Theta Tau
b8b6100
@rogerskw rogerskw Issue #35: Add majors after brothers' names in resume list bb20cdf
@rogerskw rogerskw Merge pull request #37 from rogerskw/iss35
Issue #35: Add majors after brothers' names in resume list
782d04a
@rogerskw rogerskw Merged pull request #36 from iss26 to v1.0.0 756408f
@rogerskw rogerskw Issue #38: Remove 'us' in the 'Contact Us' selector so that the nav bar
does not misbehave.
bbc2fff
@rogerskw rogerskw Merge pull request #39 from rogerskw/iss38
Issue #38: Remove 'us' in the 'Contact Us' selector so that the nav bar
48edfcb
@rogerskw rogerskw Issue #34: Change brother profile to include leadership positons held
within the fraterntiy and jobs
d6482cc
@rogerskw rogerskw Merge pull request #40 from rogerskw/iss34
Issue #34: Change brother profile to include leadership positons held
40662b3
@rogerskw rogerskw Issue #41: Fix bug where brothers' majors are listed as undecided on the
list page
132dade
@rogerskw rogerskw Merge pull request #42 from rogerskw/iss41
Issue #41: Fix bug
6e822ac
@rogerskw rogerskw Issue #33: Add search by major feature to the resume list page 13aab11
@rogerskw rogerskw Merge pull request #44 from rogerskw/iss33
Issue #33: Add search by major feature to the resume list page
31169fa
@rogerskw rogerskw Issue #45: Refactored database queries to use foreignKey__fieldName in
order to reduce database queries.
b47df14
@rogerskw rogerskw Merge pull request #46 from rogerskw/iss45
Issue #45: Refactored database queries to use foreignKey__fieldName in
03707b4
@rogerskw rogerskw Issue #43: Improve UI on resume list by adding additonal information for
each brother and making the search form stand out
71b9ae5
@rogerskw rogerskw Issue #47: Change 'social' to 'brotherhood' f48e7b6
@rogerskw rogerskw Merge pull request #48 from rogerskw/iss47
Issue #47: Change 'social' to 'brotherhood'
6d2283e
@rogerskw rogerskw Merge pull request #49 from rogerskw/iss43
Issue #43: Improve UI on resume list by adding additonal information for
8104354
@rogerskw rogerskw Issue #50: Sort careers page by year 9f8af02
@rogerskw rogerskw Issue #51: Sort Theta Tau positions and jobs by year (descending) on the
brother profile page
5dbbff7
@rogerskw rogerskw Add more test entries into the database with excessively large image
sizes with unexpected proportions
46f8359
@rogerskw rogerskw Merge pull request #54 from rogerskw/iss50
Issue #50: Sort careers page by year
df26943
@rogerskw rogerskw Merge pull request #55 from rogerskw/iss51
Issue #51: Sort Theta Tau positions and jobs by year (descending) on the
f9bd122
@rogerskw rogerskw Issue #52: Limit image size on brother profile page a3396fc
@rogerskw rogerskw Add more test entries to the database. 510c52a
@rogerskw rogerskw Issue #12: Add cheesy filler text for the about page. Should be
overwritten in a later release.
62151ed
@rogerskw rogerskw Merge pull request #56 from rogerskw/iss52
Issue #52: Limit image size on brother profile page
c54a461
@rogerskw rogerskw Merge pull request #57 from rogerskw/iss12
Issue #12: Add cheesy filler text for the about page. Should be
eebbc55
@rogerskw rogerskw merged commit 2dc1b72 into from
@rogerskw rogerskw deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 7, 2014
  1. @rogerskw
  2. @rogerskw
  3. @rogerskw
  4. @rogerskw
  5. @rogerskw

    Merge pull request #37 from rogerskw/iss35

    rogerskw authored
    Issue #35: Add majors after brothers' names in resume list
  6. @rogerskw
  7. @rogerskw
  8. @rogerskw

    Merge pull request #39 from rogerskw/iss38

    rogerskw authored
    Issue #38: Remove 'us' in the 'Contact Us' selector so that the nav bar
  9. @rogerskw

    Issue #34: Change brother profile to include leadership positons held

    rogerskw authored
    within the fraterntiy and jobs
  10. @rogerskw

    Merge pull request #40 from rogerskw/iss34

    rogerskw authored
    Issue #34: Change brother profile to include leadership positons held
Commits on Mar 8, 2014
  1. @rogerskw
  2. @rogerskw

    Merge pull request #42 from rogerskw/iss41

    rogerskw authored
    Issue #41: Fix bug
  3. @rogerskw
  4. @rogerskw

    Merge pull request #44 from rogerskw/iss33

    rogerskw authored
    Issue #33: Add search by major feature to the resume list page
  5. @rogerskw

    Issue #45: Refactored database queries to use foreignKey__fieldName in

    rogerskw authored
    order to reduce database queries.
  6. @rogerskw

    Merge pull request #46 from rogerskw/iss45

    rogerskw authored
    Issue #45: Refactored database queries to use foreignKey__fieldName in
  7. @rogerskw

    Issue #43: Improve UI on resume list by adding additonal information for

    rogerskw authored
    each brother and making the search form stand out
  8. @rogerskw
  9. @rogerskw

    Merge pull request #48 from rogerskw/iss47

    rogerskw authored
    Issue #47: Change 'social' to 'brotherhood'
  10. @rogerskw

    Merge pull request #49 from rogerskw/iss43

    rogerskw authored
    Issue #43: Improve UI on resume list by adding additonal information for
  11. @rogerskw
  12. @rogerskw
  13. @rogerskw

    Add more test entries into the database with excessively large image

    rogerskw authored
    sizes with unexpected proportions
Commits on Mar 9, 2014
  1. @rogerskw

    Merge pull request #54 from rogerskw/iss50

    rogerskw authored
    Issue #50: Sort careers page by year
  2. @rogerskw

    Merge pull request #55 from rogerskw/iss51

    rogerskw authored
    Issue #51: Sort Theta Tau positions and jobs by year (descending) on the
  3. @rogerskw
  4. @rogerskw
  5. @rogerskw

    Issue #12: Add cheesy filler text for the about page. Should be

    rogerskw authored
    overwritten in a later release.
  6. @rogerskw

    Merge pull request #56 from rogerskw/iss52

    rogerskw authored
    Issue #52: Limit image size on brother profile page
  7. @rogerskw

    Merge pull request #57 from rogerskw/iss12

    rogerskw authored
    Issue #12: Add cheesy filler text for the about page. Should be
This page is out of date. Refresh to see the latest.
View
4 articles/urls.py
@@ -11,9 +11,9 @@
url(r'^$', views.index, name='index'),
url(r'^service/$', views.service, name='service'),
url(r'^pd/$', views.professional_development, name='professional_development'),
- url(r'^social/$', views.social, name='social'),
+ url(r'^brotherhood/$', views.brotherhood, name='brotherhood'),
url(r'^(?P<article_id>\d+)', views.get_article, name='article'),
url(r'^service/(?P<article_id>\d+)', views.get_article, name='article'),
url(r'^pd/(?P<article_id>\d+)', views.get_article, name='article'),
- url(r'^social/(?P<article_id>\d+)', views.get_article, name='article'),
+ url(r'^brotherhood/(?P<article_id>\d+)', views.get_article, name='article'),
)
View
14 articles/views.py
@@ -2,9 +2,10 @@
from django.http import HttpResponse
from django.template import Context, loader
+from django.db.models import Q
import math
-from articles.models import Article, ArticleCategory, ArticleEntity, Gallery, Picture
+from articles.models import Article, ArticleEntity
from listing.pages import PageHelper
default_count_per_page = 5
@@ -13,11 +14,10 @@
def general_listing(request, eventType, category):
t = loader.get_template('article_list.html')
+ category_query = Q()
if category != None:
- type_id = ArticleCategory.objects.filter(name=category)[0].id
- article_list = Article.objects.filter(category=type_id).order_by('date').reverse()
- else:
- article_list = Article.objects.all().order_by('date').reverse()
+ category_query = Q(category__name=category)
+ article_list = Article.objects.filter(category_query).order_by('date').reverse()
article_count = PageHelper.get_request_count(request, default_count_per_page, max_count_per_page)
page_number = PageHelper.get_page_number(request)
articles_range_min = (page_number - 1) * article_count
@@ -49,8 +49,8 @@ def service(request):
def professional_development(request):
return general_listing(request, 'Professional Development', 'PD')
-def social(request):
- return general_listing(request, 'Social', 'Social')
+def brotherhood(request):
+ return general_listing(request, 'Brotherhood', 'Brotherhood')
def get_article(request, article_id):
art = get_object_or_404(Article, pk=article_id)
View
BIN  db.sqlite3
Binary file not shown
View
6 info/admin.py
@@ -1,6 +1,6 @@
from django.contrib import admin
-from info.models import PledgeClass, Brother, Department, Major, Officer, HeldPosition, Position
+from info.models import PledgeClass, Brother, Department, Major, Officer, HeldPosition, Position, Job, JobType
# Register your models here.
@@ -10,4 +10,6 @@
admin.site.register(Major)
admin.site.register(Officer)
admin.site.register(HeldPosition)
-admin.site.register(Position)
+admin.site.register(Position)
+admin.site.register(Job)
+admin.site.register(JobType)
View
36 info/models.py
@@ -55,6 +55,29 @@ def __unicode__(self):
def __str__(self):
return self.__unicode__()
+
+class JobType(models.Model):
+ name = models.CharField(max_length=50)
+
+ def __unicode__(self):
+ return self.name
+
+ def __str__(self):
+ return self.__unicode__()
+
+class Job(models.Model):
+ type = models.ForeignKey(JobType)
+ company = models.CharField(max_length=100)
+ title = models.CharField(max_length=100)
+ brother = models.ForeignKey(Brother)
+ year = models.IntegerField()
+
+ def __unicode__(self):
+ return " - ".join([str(self.year), str(self.brother.lastName + ", " + self.brother.firstName), self.company, self.title, str(self.type)])
+
+ def __str__(self):
+ return self.__unicode__()
+
class Alumni(models.Model):
brother = models.ForeignKey(Brother)
currentJob = models.CharField(max_length=100, blank=True)
@@ -105,10 +128,11 @@ def __str__(self):
class BrotherEntity():
def __init__(self, brotherObj):
self.brother = brotherObj
- heldPosition = HeldPosition.objects.filter(brother = self.brother)
- heldPositions = []
- self.heldPositions = []
+ heldPositions = HeldPosition.objects.filter(brother = self.brother.id).order_by('-year')
+ retrievedJobs = Job.objects.filter(brother = self.brother.id).order_by('-year')
+ self.positions = []
for heldPosition in heldPositions:
- self.majors.append(heldPosition.position)
-
-
+ self.positions.append(heldPosition)
+ self.jobs = []
+ for job in retrievedJobs:
+ self.jobs.append(job)
View
10 info/templates/about.html
@@ -20,8 +20,14 @@ <h1 class="page-header">About the Miami University Colony of &Theta;&Tau;</h1>
<img class="img-responsive" src="{{ group_pic.pic }}">
</div>
<div class="col-md-6">
- <h2>This is a Header!</h2>
- <p>Nullam sed adipiscing arcu. Etiam ultrices augue et placerat tempor. Donec mollis dignissim felis id tempor. Mauris malesuada accumsan lacus, a rutrum augue porta et. Nulla scelerisque, dolor at ullamcorper luctus, ligula lectus ultricies augue, sit amet rhoncus massa eros id sapien. </p>
+ <h2>What We Do</h2>
+ <p>
+ Since our certification in January 2013, the Miami University Colony of &Theta;&Tau; has grown to 57 members. We have dedicated ourselves
+ to the service of the College of Engineering and Computing as well as the greater Oxford community. We have participated in service
+ events with national charities such as Habitat for Humanity, Feed My Starving Children, and Relay for Life, as well as local organizations
+ such as an animal shelter and the Cincinnati Reds. We have worked with the College of Engineering and Computing on events such as Engineers'
+ Week, Make It Miami tours, and led tutoring sessions for engineering students in any classes.
+ </p>
</div>
</div>
View
20 info/templates/brother_profile.html
@@ -16,7 +16,7 @@ <h1 class="page-header"> {{ be.brother.firstName }} {{ be.brother.lastName }} <s
<div class="row">
<div class="col-md-8" style="max-width:750px; max-height:500px;">
- <img class="img-responsive" src="{{ be.brother.picture }}" style="margin-left:auto; margin-right:auto;">
+ <img class="img-responsive" src="{{ be.brother.picture }}" style="margin-left:auto; margin-right:auto; max-width: 100%; max-height: 100%;">
</div>
<div class="col-md-4">
@@ -30,8 +30,6 @@ <h1 class="page-header"> {{ be.brother.firstName }} {{ be.brother.lastName }} <s
{% endif %}
| Class of {{ be.brother.graduationYear }}
</h2>
- <h3>Bio</h3>
- <p>{{ be.brother.bio }}</p>
<h3>Major(s)</h3>
<ul>
{% if be.brother.majors %}
@@ -42,6 +40,22 @@ <h1 class="page-header"> {{ be.brother.firstName }} {{ be.brother.lastName }} <s
<li> Undecided Engineering </li>
{% endif %}
</ul>
+ {% if be.positions %}
+ <h3>Leadership Positions in &Theta;&Tau;</h3>
+ <ul>
+ {% for position in be.positions %}
+ <li>{{ position.position.name }} ({{ position.semester }} {{ position.year }}) </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% if be.jobs %}
+ <h3>Internships, Co-ops, and Full Time Positions</h3>
+ <ul>
+ {% for job in be.jobs %}
+ <li>{{ job.type.name }} - {{ job.title }} at {{ job.company }} ({{ job.year }})</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
<h4><a href="{{ be.brother.resume }}">Resume</a></h4>
</div>
View
4 info/templates/brothers_list.html
@@ -27,9 +27,9 @@ <h1 class="page-header">Meet the Brothers <small>{{ brotherType }}</small></h1>
</div>
<h3><a href="/info/brother/{{ bro_entity.brother.id }}">{{ bro_entity.brother.firstName }} {{ bro_entity.brother.lastName }}</a></h3>
<p>Pledge Class: {{ bro_entity.brother.pledgeClass.name }}</p>
- {% if bro_entity.majors %}
+ {% if bro_entity.brother.majors.all %}
- {% for major in bro_entity.majors %}
+ {% for major in bro_entity.brother.majors.all %}
<div>{{ major.majorName }}&#x0020; </div>
{% endfor %}
View
32 info/templates/careers.html
@@ -0,0 +1,32 @@
+{% extends 'base.html' %}
+
+{% block title %} &Theta;&Tau; | Careers {% endblock %}
+
+{% block content %}
+
+<div class="container">
+
+ <div class="row">
+
+ <div class="col-lg-12">
+ <h1 class="page-header">Careers</h1>
+ </div>
+
+ </div>
+
+
+ <div class="container">
+ {% for job in jobs %}
+ <div class="row">
+ <div class="col=sm-3"><a href='/info/brother/{{ job.brother.id }}'>{{ job.brother.firstName }} {{ job.brother.lastName }}</a></div>
+ <div class="col-sm-3">{{ job.company }}</div>
+ <div class="col-sm-3">{{ job.title }}</div>
+ <div class="col-sm-3">{{ job.type.name }}</div>
+ <div class="col-sm-3">{{ job.year }}</div>
+ </div>
+ <hr />
+ {% endfor %}
+ </div>
+</div>
+
+{% endblock %}
View
31 info/templates/resume_list.html
@@ -17,19 +17,20 @@ <h1 class="page-header">Resumes</h1>
<form method='GET' name='submit'>
<div class='row'>
-<!-- <div class='col-sm-2'>
- Majors: <br />
+ <div class='col-lg-4'>
+ <h4>Majors:</h4>
{% for major in majors %}
<input type='checkbox' name='major' value='{{ major.majorName }}'>{{ major.majorName }}<br />
{% endfor %}
- </div> -->
- <div class='col-sm-2'>
- Graduation Years: <br />
+ </div>
+ <div class='col-lg-4'>
+ <h4>Graduation Years:</h4>
{% for year in years %}
<input type='checkbox' name='gradyear' value='{{ year }}'>{{ year }}<br />
{% endfor %}
</div>
</div>
+ <br />
<div class='row'>
<div class='col-lg-8'><input type='submit' value='Go' /></div>
</div>
@@ -44,9 +45,23 @@ <h1 class="page-header">Resumes</h1>
<div class="row">
{% for brother in brothers %}
-
- <a href='{{ brother.resume }}'>{{ brother.lastName }}, {{ brother.firstName }} {{ brother.middleName }}</a> <br />
-
+ <div class='col-md-2'>
+ <a href='/info/brother/{{ brother.id }}'>{{ brother.lastName }}, {{ brother.firstName }} {{ brother.middleName }}</a>
+ </div>
+ <div class='col-md-2'>
+ Class of {{ brother.graduationYear }}
+ </div>
+ <div class='col-md-2'>
+ <a href='{{ brother.resume }}'>Resume</a>
+ </div>
+ {% for major in brother.majors.all %}
+ <div class='col-md-2'>
+ {{ major }}
+ </div>
+ {% endfor %}
+
+ <br />
+ <hr />
{% endfor %}
</div>
View
3  info/urls.py
@@ -14,6 +14,7 @@
url(r'^pledges/$', views.pledges, name='pledges'),
url(r'^alumni/$', views.alumni, name='alumni'),
url(r'^brother/(?P<brother_id>\d+)', views.brother_profile, name="brother_profile"),
- url(r'^resumes/$', views.resumes, name='resumes')
+ url(r'^resumes/$', views.resumes, name='resumes'),
+ url(r'^careers/$', views.careers, name='careers')
)
View
20 info/views.py
@@ -6,7 +6,7 @@
from django.shortcuts import render, get_object_or_404
from django.db.models import Q
-from info.models import Brother, Officer, BrotherEntity, Major
+from info.models import Brother, Officer, BrotherEntity, Major, Job
from info import utility
from marketing.models import Picture as MarketingPic
from articles.models import Article
@@ -83,19 +83,25 @@ def general_listing(request, isAlumniFilter, isPledgeFilter, name):
def resumes(request):
year = date.today().year
- years = []
- for i in xrange(5):
- years.append(year+i)
+ years = range(year, year+5)
grad_year_requests = request.GET.getlist('gradyear')
- reqs = Q()
+ major_requests = request.GET.getlist('major')
+ grad_year_reqs = Q()
for grad_year_request in grad_year_requests:
- reqs = reqs | Q(graduationYear=int(grad_year_request))
- brothers = Brother.objects.filter(reqs).order_by('lastName', 'firstName', 'middleName')
+ grad_year_reqs = grad_year_reqs | Q(graduationYear=int(grad_year_request))
+ major_reqs = Q()
+ for major_request in major_requests:
+ major_reqs = major_reqs | Q(majors__majorName=major_request)
+ brothers = Brother.objects.filter(major_reqs, grad_year_reqs).order_by('lastName', 'firstName', 'middleName')
majors = Major.objects.all().order_by('majorName')
c = Context({'brothers': brothers, 'majors': majors, 'years': years})
t = loader.get_template('resume_list.html')
return HttpResponse(t.render(c))
+def careers(request):
+ jobs = Job.objects.all().order_by('-year')
+ return render(request, 'careers.html', {'jobs': jobs})
+
def convert_brothers_to_brotherentities(broList):
'''
Converts a set of brothers and converts them to brother entities
View
11 templates/base.html
@@ -55,18 +55,23 @@
<li><a href="/info/actives">Active Members</a></li>
<li><a href="/info/pledges">Pledges</a></li>
<li><a href="/info/alumni">Alumni</a></li>
- <li><a href="/info/resumes">Resumes</a></li>
</ul></li>
<li class="dropdown"><a href="#" class="dropdown-toggle"
data-toggle="dropdown" style="color:#DADADA;">Past Events<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/articles/service">Service</a></li>
<li><a href="/articles/pd">Professional Development</a></li>
- <li><a href="/articles/social">Social</a></li>
+ <li><a href="/articles/brotherhood">Brotherhood</a></li>
<li><a href="/articles/">All</a></li>
</ul></li>
<li><a href="/events" style="color:#DADADA;">Upcoming Events</a></li>
- <li><a href="/contact" style="color:#DADADA;">Contact Us</a></li>
+ <li class="dropdown"><a href="#" class="dropdown-toggle"
+ data-toggle="dropdown" style="color:#DADADA;">Recruit &Theta;&Tau;<b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="/info/resumes">Resumes</a></li>
+ <li><a href="/info/careers">Careers</a></li>
+ </ul></li>
+ <li><a href="/contact" style="color:#DADADA;">Contact</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
View
2  templates/index.html
@@ -86,7 +86,7 @@
</div>
<div class="col-lg-4 col-md-4">
<h3>
- <i class="fa fa-folder-open"></i> Social
+ <i class="fa fa-folder-open"></i> Brotherhood
</h3>
<p>
Our members pride themselves upon sharing a brotherhood unlike any other
Something went wrong with that request. Please try again.