Skip to content

Commit

Permalink
#286 use core2 templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylampada committed Jul 6, 2014
1 parent 1d98bce commit fd1c36b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 4 deletions.
2 changes: 1 addition & 1 deletion djangoproject/core/urls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url(r'^dev/$', redirect_to, {'url': 'http://blog.freedomsponsors.org/developers/'}),
url(r'^login/$', 'login'),
url(r'^logout/$', 'logout'),
url(r'^jslic$', direct_to_template, {'template': 'core/jslic.html'}),
url(r'^jslic$', direct_to_template, {'template': 'core2/jslic.html'}),
)

urlpatterns += patterns('core.views.issue_views',
Expand Down
6 changes: 4 additions & 2 deletions djangoproject/core/views/comment_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ def editOfferComment(request):
comment = comment_services.edit_comment_of_offer(comment_id, comment_content, request.user)
return redirect(comment.offer.get_view_link())


def viewIssueCommentHistory(request, comment_id):
comment = IssueComment.objects.get(pk = comment_id)
comment_events = IssueCommentHistEvent.objects.filter(comment__id = comment_id).order_by("eventDate")
return render_to_response('core/comment_history.html',
return render_to_response('core2/comment_history.html',
{'comment':comment,
'comment_events':comment_events,},
context_instance = RequestContext(request))


def viewOfferCommentHistory(request, comment_id):
comment = OfferComment.objects.get(pk = comment_id)
comment_events = OfferCommentHistEvent.objects.filter(comment__id = comment_id).order_by("eventDate")
return render_to_response('core/comment_history.html',
return render_to_response('core2/comment_history.html',
{'comment':comment,
'comment_events':comment_events,},
context_instance = RequestContext(request))
2 changes: 1 addition & 1 deletion djangoproject/frespo/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if 'core' in settings.INSTALLED_APPS:
from core.forms import RegistrationForm
urlpatterns += patterns('',
# url(r'^.*$', direct_to_template, {'template': 'core/maintainance.html'}),
# url(r'^.*$', direct_to_template, {'template': 'core2/maintainance.html'}),
url(r'^$', 'core.views.main_views.home', name='home'),
url(r'^404$', direct_to_template, {'template': '404.html'}),
url(r'^faq$', direct_to_template, {'template': 'core2/faq.html'}),
Expand Down
41 changes: 41 additions & 0 deletions djangoproject/templates/core2/jslic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends "core2/base_old.html" %}
{% load i18n %}


{% block mainContent%}

<p>All Javascript code used in this website is Free Software.<br>
The table below displays script files, their sources and licenses, where it's not available in the script files themselves.</br>
If you find any broken links, please report it to [email protected]</p>

<table class="table table-striped table-condensed" id="jslicense-labels1">
<tr>
<th> Script </th>
<th> License </th>
<th> Source </th>
</tr>
<tr>
<td> <a href="/static/bootstrap/js/bootstrap.min.js">bootstrap.min.js</a> </td>
<td> <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache 2.0</a> </td>
<td> <a href="/static/bootstrap/js/bootstrap.js">Bootstrap 2.0.4</a> </td>
</tr>
<tr>
<td> <a href="/static/bootstrap/js/jquery.maskedinput-1.3.min.js">jquery.maskedinput-1.3.min.js</a> </td>
<td> <a href="http://digitalbush.com/projects/masked-input-plugin/#license">Copyright (c) 2007-2013 Josh Bush (digitalbush.com)</a> </td>
<td> <a href="https://raw.github.com/digitalBush/jquery.maskedinput/1.3.1/dist/jquery.maskedinput.js">JQuery MaskedInput 1.3</a> </td>
</tr>
<tr>
<td> <a href="/static/bootstrap/js/jquery.min.js">jquery.min.js</a> </td>
<td> <a href="https://jquery.org/license/">MIT</a> </td>
<td> <a href="/static/bootstrap/js/jquery.min.js">JQuery 1.7.1</a> </td>
</tr>
<tr>
<td> <a href="/static/js/angular.min.js">angular.min.js</a> </td>
<td> <a href="https://github.com/angular/angular.js/blob/master/LICENSE">MIT</a> </td>
<td> <a href="http://code.angularjs.org/1.1.5/angular.js">AngularJS 1.1.5</a> </td>
</tr>
</table>

For a quick browse over all static files (javascript/css), <a href="https://github.com/freedomsponsors/www.freedomsponsors.org/tree/master/djangoproject/core/static">see them on Github</a>.

{% endblock mainContent%}
12 changes: 12 additions & 0 deletions djangoproject/templates/core2/maintainance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "core/base.html" %}
{% block mainContent%}

<div class="span1"></div>
<div class="span8">
<h1>FreedomSponsors is down for maintenance</h1>
<p> We should be up and running again in a few minutes. Sorry for the inconvenience.</p>
</div>
<div class="span1"></div>


{% endblock mainContent%}

0 comments on commit fd1c36b

Please sign in to comment.