Commit 9f19eafc by Diana Huang Committed by Vik Paruchuri

Update main notification dashboard with new styles.

parent 4140b74e
...@@ -193,6 +193,11 @@ def combined_notifications(request, course_id): ...@@ -193,6 +193,11 @@ def combined_notifications(request, course_id):
notification_tuples=open_ended_notifications.NOTIFICATION_TYPES notification_tuples=open_ended_notifications.NOTIFICATION_TYPES
notification_list = [] notification_list = []
description_dict = {
'Peer Grading': "View all problems that require peer assessment in this particular course.",
'Staff Grading': "View ungraded submissions submitted by your students for the open ended problems in the course.",
'Problems you have submitted': "View open ended problems that you have previously submitted for grading."
}
for response_num in xrange(0,len(notification_tuples)): for response_num in xrange(0,len(notification_tuples)):
tag=notification_tuples[response_num][0] tag=notification_tuples[response_num][0]
if tag in response: if tag in response:
...@@ -200,13 +205,12 @@ def combined_notifications(request, course_id): ...@@ -200,13 +205,12 @@ def combined_notifications(request, course_id):
human_name = notification_tuples[response_num][2] human_name = notification_tuples[response_num][2]
url = _reverse_without_slash(url_name, course_id) url = _reverse_without_slash(url_name, course_id)
has_img = response[tag] has_img = response[tag]
img_path = "/static/images/slider-handle.png"
notification_item = { notification_item = {
'url' : url, 'url' : url,
'name' : human_name, 'name' : human_name,
'has_img' : has_img, 'alert' : has_img,
'img' : img_path, 'description': description_dict[human_name]
} }
notification_list.append(notification_item) notification_list.append(notification_item)
......
...@@ -13,5 +13,43 @@ ...@@ -13,5 +13,43 @@
padding: 7px; padding: 7px;
} }
} }
.notification-container
{
margin: 30px 0px;
}
.alert
{
background-color: red;
}
.notification
{
margin: 10px;
width: 30%;
@include inline-block;
vertical-align: top;
.notification-link
{
display:block;
height: 8em;
padding: 10px;
border: 1px solid black;
text-align: center;
}
.notification-title
{
text-transform: uppercase;
}
.notification-link:hover
{
background-color: #eee;
color: black;
}
.notification-description
{
padding-top:5%;
}
@include clearfix;
}
} }
...@@ -23,19 +23,23 @@ ...@@ -23,19 +23,23 @@
No items require attention at the moment. No items require attention at the moment.
</div> </div>
%else: %else:
<ul class="notification-list"> <div class="notification-container">
%for notification in notification_list: %for notification in notification_list:
<li> % if notification['alert']:
<a href="${notification['url']}"> <div class="notification alert">
${notification['name']} % else:
% if notification['has_img'] == True: <div class="notification">
<img src="${notification['img']}"/> % endif
%endif <a href="${notification['url']}" class="notification-link">
<div class="notification-title">${notification['name']}</div>
<div class="notification-description">
<p>${notification['description']}</p>
</div>
</a> </a>
</li> </div>
%endfor %endfor
</ul> </div>
%endif %endif
%endif %endif
</div> </div>
</section> </section>
\ No newline at end of file
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