Commit a13cea73 by Pavel Yushchenko

Merge branch 'select' of https://github.com/Man2Life/edx-platform into select

parents 8a78e74e a40a8846
......@@ -238,6 +238,10 @@ TEMPLATE_CONTEXT_PROCESSORS = (
# Hack to get required link URLs to password reset templates
'mitxmako.shortcuts.marketing_link_context_processor',
# ...
"announcements.context_processors.site_wide_announcements",
# ..
)
# use the ratelimit backend to prevent brute force attacks
......@@ -728,6 +732,9 @@ INSTALLED_APPS = (
'djcelery',
'south',
'announcements',
# Monitor the status of services
'service_status',
......
......@@ -11,7 +11,6 @@
<%namespace name='static' file='static_content.html'/>
<%block name="title"><title>${_("Dashboard")}</title></%block>
<%block name="js_extra">
<script type="text/javascript">
(function() {
......@@ -91,6 +90,36 @@
</section>
%endif
<style>
div.announcements-wrapper section.announcements > ol {
list-style: none;
margin-bottom: 1.41575em;
padding-left: 0;
}
div.announcements-wrapper section.announcements > ol > li h2 {
font-size: 0.875em;
font-weight: bold;
background: url("/static/images/calendar-icon.png") 0 center no-repeat;
padding-left: 20px;
}
</style>
% if site_wide_announcements:
<div class="announcements-wrapper">
<section class="announcements">
<ol>
% for announcement in site_wide_announcements:
<li class="announcement">
<h2 class="title"><span class="date">${announcement.creation_date} <span>${announcement}</h2>
${announcement.content}
<!-- <a id="hide" href="${reverse('announcement_hide', args=[announcement.pk])}?next=${request.path}">Убрать</a> -->
</li>
% endfor
</ol>
</section>
</div>
% endif
<section class="profile-sidebar">
<header class="profile">
<h1 class="user-name">${ user.username }</h1>
......
......@@ -13,6 +13,11 @@ if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'):
admin.autodiscover()
urlpatterns = ('', # nopep8
# ...
url(r"^announcements/", include("announcements.urls")),
# ...
# certificate view
url(r'^update_certificate$', 'certificates.views.update_certificate'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment