Files
edx-platform/cms/templates/maintenance/_announcement_index.html
Josh McLaughlin 4d4b040517 Add dashboard announcements feature
- Add announcements view using JSX to the dashboard sidebar
- Create a new maintenance interface to edit and manage announcements
- Adds an override to main.html template to include new skip links
- Add plugins required for announcements to TinyMCE

This is motivated by a desire to have system wide messages for students
that show on the dashboard. Enabled with FEATURES['ENABLE_ANNOUNCEMENTS'].
Global staff are allowed to edit from the studio maintenance view.
2019-03-10 19:25:13 -07:00

58 lines
2.6 KiB
HTML

<%page expression_filter="h"/>
<%namespace name='static' file='../static_content.html'/>
<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import HTML, Text
%>
<div class="studio-view maintenance-form">
<div class="form-create">
<div class="announcement-container">
% for announcement in announcement_list:
<div class="announcement-item">
<div class="announcement-content">
## xss-lint: disable=mako-invalid-html-filter
${announcement.content | n}
</div>
<div class="actions-list">
<span>
% if announcement.active:
Active <span class="icon fa fa-check-square-o" aria-hidden="true" />
% else:
Inactive <span class="icon fa fa-square-o" aria-hidden="true" />
% endif
</span>
<a class="action-item announcement-edit"
href="${ reverse('maintenance:announcement_edit', kwargs={'pk': announcement.pk}) }">
<button class="btn-default">Edit</button>
</a>
<a class="action-item announcement-delete"
href="${ reverse('maintenance:announcement_delete', kwargs={'pk': announcement.pk}) }">
<button class="btn-default">Delete</button>
</a>
</div>
</div>
% endfor
</div>
<div class="actions">
<a href="${ reverse('maintenance:announcement_create') }">
<button class="action action-primary">${_('Create New')}</button>
</a>
% if is_paginated:
% if page_obj.has_previous():
<a href="${ reverse('maintenance:announcement_index', kwargs={'page': page_obj.previous_page_number()}) }">
<button class="action action-secondary">${_('previous')}</button>
</a>
% endif
% if page_obj.has_next():
<a href="${ reverse('maintenance:announcement_index', kwargs={'page': page_obj.next_page_number()}) }">
<button class="action action-secondary">${_('next')}</button>
</a>
% endif
% endif
</div>
</div>
</div>