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

Kyle Rogers
Kyle Rogers
Owner

No description provided.

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

    Merge pull request #37 from rogerskw/iss35

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

    Merge pull request #39 from rogerskw/iss38

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

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

    rogerskw authored
    within the fraterntiy and jobs
  10. Kyle Rogers

    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. Kyle Rogers
  2. Kyle Rogers

    Merge pull request #42 from rogerskw/iss41

    rogerskw authored
    Issue #41: Fix bug
  3. Kyle Rogers
  4. Kyle Rogers

    Merge pull request #44 from rogerskw/iss33

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

    Issue #45: Refactored database queries to use foreignKey__fieldName in

    rogerskw authored
    order to reduce database queries.
  6. Kyle Rogers

    Merge pull request #46 from rogerskw/iss45

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

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

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

    Merge pull request #48 from rogerskw/iss47

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

    Merge pull request #49 from rogerskw/iss43

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

    Add more test entries into the database with excessively large image

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

    Merge pull request #54 from rogerskw/iss50

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

    Merge pull request #55 from rogerskw/iss51

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

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

    rogerskw authored
    overwritten in a later release.
  6. Kyle Rogers

    Merge pull request #56 from rogerskw/iss52

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

    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.
4 articles/urls.py
View
@@ -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'),
)
14 articles/views.py
View
@@ -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)
BIN  db.sqlite3
View
Binary file not shown
6 info/admin.py
View
@@ -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)
36 info/models.py
View
@@ -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)
10 info/templates/about.html
View
@@ -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>
20 info/templates/brother_profile.html
View
@@ -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>
4 info/templates/brothers_list.html
View
@@ -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 %}
32 info/templates/careers.html
View
@@ -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 %}
31 info/templates/resume_list.html
View
@@ -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>
3  info/urls.py
View
@@ -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')
)
20 info/views.py
View
@@ -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
11 templates/base.html
View
@@ -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 -->
2  templates/index.html
View
@@ -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.