course_info_update.underscore 1.99 KB
Newer Older
1
<li name="<%- updateModel.cid %>">
2 3 4
	<!-- FIXME what style should we use for initially hidden? --> <!-- TODO decide whether this should use codemirror -->
	<form class="new-update-form">
		<div class="row">
5
			<label for="update-date-<%= updateModel.cid %>" class="inline-label"><%= gettext('Date') %>:</label>
6
			<!-- TODO replace w/ date widget and actual date (problem is that persisted version is "Month day" not an actual date obj -->
7
			<input id="update-date-<%= updateModel.cid %>" type="text" class="date" value="<%= updateModel.get('date') %>">
8 9 10 11
		</div>
		<div class="row">
			<textarea class="new-update-content text-editor"><%= updateModel.get('content') %></textarea>
		</div>
12 13 14 15 16 17
        <%if (push_notification_enabled) { %>
    		<div class="row new-update-push-notification">
                <input id="update-notification-checkbox-<%= updateModel.cid %>" type="checkbox" class="toggle-checkbox" data-tooltip="<%= gettext('Send push notification to mobile apps') %>" checked />
                <label for="update-notification-checkbox-<%= updateModel.cid %>" class="inline-label"><%= gettext('Send notification to mobile apps') %></label>
            </div>
        <% } %>
18 19
		<div class="row">
			<!-- cid rather than id b/c new ones have cid's not id's -->
20 21
            <button class="save-button" name="<%= updateModel.cid %>"><%= gettext('Post') %></button>
            <button class="cancel-button" name="<%= updateModel.cid %>"><%= gettext('Cancel') %></button>
22 23
		</div>
	</form>
24
	<div class="post-preview">
25
		<div class="post-actions">
26 27
            <button class="edit-button" name="<%= updateModel.cid %>"><span class="edit-icon"></span><%= gettext('Edit') %></button>
            <button class="delete-button" name="<%= updateModel.cid %>"><span class="delete-icon"></span><%= gettext('Delete') %></button>
28 29
		</div>
		<h2>
30
			<span class="calendar-icon"></span><span class="date-display"><%=
31 32 33
				updateModel.get('date') %></span>
		</h2>
		<div class="update-contents"><%= updateModel.get('content') %></div>
34
	</div>
35
</li>