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 = ( ...@@ -238,6 +238,10 @@ TEMPLATE_CONTEXT_PROCESSORS = (
# Hack to get required link URLs to password reset templates # Hack to get required link URLs to password reset templates
'mitxmako.shortcuts.marketing_link_context_processor', 'mitxmako.shortcuts.marketing_link_context_processor',
# ...
"announcements.context_processors.site_wide_announcements",
# ..
) )
# use the ratelimit backend to prevent brute force attacks # use the ratelimit backend to prevent brute force attacks
...@@ -728,6 +732,9 @@ INSTALLED_APPS = ( ...@@ -728,6 +732,9 @@ INSTALLED_APPS = (
'djcelery', 'djcelery',
'south', 'south',
'announcements',
# Monitor the status of services # Monitor the status of services
'service_status', 'service_status',
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%block name="title"><title>${_("Dashboard")}</title></%block> <%block name="title"><title>${_("Dashboard")}</title></%block>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript"> <script type="text/javascript">
(function() { (function() {
...@@ -91,6 +90,36 @@ ...@@ -91,6 +90,36 @@
</section> </section>
%endif %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"> <section class="profile-sidebar">
<header class="profile"> <header class="profile">
<h1 class="user-name">${ user.username }</h1> <h1 class="user-name">${ user.username }</h1>
......
...@@ -13,6 +13,11 @@ if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): ...@@ -13,6 +13,11 @@ if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'):
admin.autodiscover() admin.autodiscover()
urlpatterns = ('', # nopep8 urlpatterns = ('', # nopep8
# ...
url(r"^announcements/", include("announcements.urls")),
# ...
# certificate view # certificate view
url(r'^update_certificate$', 'certificates.views.update_certificate'), 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