Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'feature/calendar' into develop

  • Loading branch information...
commit c3a518b2a06f0529623fbd754bc3ab01f2f23bf4 2 parents 82e20d1 + 205c370
Ethan Holda authored
View
1  main.py
@@ -29,6 +29,7 @@
# Define all the routes for the applications
ROUTES = ( r'/admin/?([^/.]*)/?([^/.]*)/?([^/.]*)', 'controllers.admin.Admin',
+ r'/calendar/?([^/.]*)/?([^/.]*)/?([^/.]*)/?([^/.]*)', 'controllers.calendar.Calendar',
r'/cms/?([^/.]*)/?([^/.]*)', 'controllers.admin.Admin',
r'/create/?([^/.]*)', 'controllers.createProject.CreateProject',
r'/idea/?([^/.]*)', 'controllers.idea.Idea',
View
18 static/css/tc.gam.main.css
@@ -7385,6 +7385,24 @@ div.continent.about .midlands > .east > .east a:hover {
margin-top: 20px
}
+/* Calendar */
+
+div.continent.calendar .midlands {
+ margin-bottom: 80px;
+}
+
+div.continent.calendar .midlands > .west {
+ width: 300px;
+}
+
+div.continent.calendar .midlands > .east {
+ width: 600px;
+}
+
+div.continent.calendar .event-stack li > div {
+ width: 100%;
+}
+
/* Terms Of Use */
div.continent.tou {
View
102 templates/calendar.html
@@ -0,0 +1,102 @@
+{#
+ # Copyright (c) 2011 Local Projects. All rights reserved.
+ # Licensed under the Affero GNU GPL v3, see LICENSE for more details.
+ #}
+{% extends "./partials/base.html" %}
+
+{% block title %} Events {% endblock title %}
+
+{% block continent %}
+<div class='continent calendar'>
+ <div class='headlands'>
+ <span class="above-h1">{{ d.config.site.name }}</span>
+ <h1>Events</h1>
+ </div>
+
+ <div class='midlands clearfix'>
+ <div class="east">
+ <div class="box main-section calendar events">
+ <!-- carousel controls -->
+ <div class="pagination-controls calendar clearfix">
+ <span class="control">
+ <a class="prev calendar-carousel-prev" href="/calendar/show/monthly/{{ d.template_data.calendar.prev_month }}">
+ <span class="sm-arrow-back light"></span><span>Previous</span>
+ </a>
+ <a class="next calendar-carousel-next" href="/calendar/show/monthly/{{ d.template_data.calendar.next_month }}">
+ <span>Next</span><span class="sm-arrow-forward light"></span>
+ </a>
+ </span>
+ </div>
+ <ol class="event-stack">
+ {% for event in d.template_data.calendar.events %}
+ <li class="event" data-id="{{ event.id }}">
+ <div class="bd clearfix">
+
+ <div class="wrapper">
+ <div class="event-datetime">
+ <span class="month">{{ event.start_datetime|datetime('%b') }}</span>
+ <span class="day">{{ event.start_datetime.day }}</span>
+ <span class="time">{{ event.start_datetime|neattime }}</span>
+ </div>
+
+ <div class="event-body">
+ <div class="project-link">
+ <a href="/project/{{ event.project_id }}">{{ event.project.title }}</a>
+ </div>
+ <div class="event-title serif">
+ <a href="/project/{{event.project_id}}#show,event-detail,{{ event.id }}">{{ event.name }}</a>
+ </div>
+
+ <div class="event-loc-title serif">
+ at <a href="#">{{ event.address }}</a>
+ </div>
+
+ <div class="event-description">
+ <p class="serif">
+ {{ event.details|truncate(130) }}
+ {% if event.details|length > 130 %}
+ <a href="/project/{{event.project_id}}#show,event-detail,{{ event.id }}" class="read-more">Read More</a>
+ {% endif%}
+ </p>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </li>
+
+ {% else %}
+ <li class="box event">
+ <div class="clearfix">
+ <div class="empty-state-box big">
+ <p>There are no Change By Us events in this month.</a>
+ {% if (d.template_data.calendar.is_active_month) %}
+ <p>Contact your project admins to see how you can help!</p>
+ {% endif %}
+ </div>
+ </div>
+ </li>
+ {% endfor %}
+ </ol>
+ </div>
+ </div>
+ <div class="west">
+ <div class="box calendar">
+ <div class="hd clearfix">
+ <div class="wrapper">
+ I would like to put a short, descriptive paragraph about Change By Us events
+ and how users can get involved.
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class='foothills'>
+ </div>
+</div>
+{% endblock continent %}
+
+{% block page_js %}
+ <script type='text/javascript' src="/static/js/pages/tou.js"></script>
+{% endblock page_js %}
View
1  templates/partials/base.html
@@ -167,6 +167,7 @@
<a href="{{ d.config.blog_host }}">{{ _('News') }}</a>
{% endif %}
<a href="/about">{{ _('About') }}</a>
+ <a href="/calendar/show">{{ _('Calendar') }}</a>
</li>
<li class="userland">
Please sign in to comment.
Something went wrong with that request. Please try again.