Commit c44c9851 by Kyle Fiedler

Merged heads

parents f885cd85 ad3fc402
......@@ -108,7 +108,7 @@ $(function() {
%>
<h3><a href="${reverse('courseware_section', args=format_url_params([chapter['course'], chapter['chapter'], section['section']])) }">
${ section['section'] }</a> ${"({0}/{1}) {2}".format( earned, total, percentageString )}</h3>
${ section['section'] }</a> ${"({0:g}/{1:g}) {2}".format( earned, total, percentageString )}</h3>
${section['subtitle']}
%if 'due' in section and section['due']!="":
due ${section['due']}
......@@ -118,7 +118,7 @@ $(function() {
<ol class="scores">
${ "Problem Scores: " if section['graded'] else "Practice Scores: "}
%for score in section['scores']:
<li class="score">${ score[0] }/${ score[1] }</li>
<li class="score">${"{0:g}/{1:g}".format(score[0],score[1])}</li>
%endfor
</ol>
%endif
......
......@@ -58,7 +58,7 @@ $(function () {
color: colors[${sectionIndex}].toString(),
});
ticks = ticks.concat( [ [${tickIndex}, "${section['totallabel']}"] ] );
detail_tooltips["${section['category']} Average"] = [ "${section['totalscore']['summary']}" ];
detail_tooltips["${section['category']} Total"] = [ "${section['totalscore']['summary']}" ];
<% tickIndex += 1 + sectionSpacer %>
%else: ##This is for sections like midterm or final, which have no smaller components
......
......@@ -3,7 +3,10 @@ div.wiki-wrapper {
width: 100%;
section.wiki-body {
@extend .clearfix;
@extend .content;
position: relative;
header {
@extend .topbar;
......@@ -73,27 +76,70 @@ div.wiki-wrapper {
}
}
h1.wiki-title {
font-weight: bold;
padding-bottom: 10px;
margin-bottom: 20px;
border-bottom: 1px solid #ccc;
}
h2.wiki-title {
margin-top: 0;
margin-bottom: 15px;
width: flex-grid(4, 9);
padding-right: flex-gutter(9);
border-right: 1px dashed #ddd;
@include box-sizing(border-box);
display: table-cell;
vertical-align: top;
@media screen and (max-width:1120px) {
display: block;
width: auto;
border-right: 0;
}
@media print {
display: block;
width: auto;
border-right: 0;
}
}
p {
line-height: 1.6em;
}
ul.article-list {
margin-left: 15px;
section.results {
display: table-cell;
width: flex-grid(5, 9);
padding-left: flex-gutter(9);
@media screen and (max-width:1120px) {
display: block;
width: auto;
padding: 0;
}
li {
margin: 10px 0;
list-style-image: url('/static/images/bullet-triangle.png');
@media print {
display: block;
width: auto;
padding: 0;
h3 {
font-size: 18px;
font-weight: normal;
canvas, img {
page-break-inside: avoid;
}
}
ul.article-list {
margin-left: 15px;
li {
list-style: none;
margin: 0;
padding: 10px 0;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: 0;
}
h3 {
font-size: 18px;
font-weight: normal;
}
}
}
}
......
......@@ -127,8 +127,8 @@
<div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div>
<input type="text" placeholder="Search" name="value" id="wiki_search_input" style="width: 72%" value="${wiki_search_query if wiki_search_query is not UNDEFINED else '' |h}"/>
<input type="submit" id="wiki_search_input_submit" value=Go! style="width: 20%" />
<input type="text" placeholder="Search" name="value" id="wiki_search_input" style="width: 71%" value="${wiki_search_query if wiki_search_query is not UNDEFINED else '' |h}"/>
<input type="submit" id="wiki_search_input_submit" value="Go!" style="width: 20%" />
</form>
</li>
</ul>
......@@ -163,8 +163,7 @@
</header>
%endif
<h1 class="wiki-title"><%block name="wiki_page_title"/></h1>
<%block name="wiki_page_title"/>
<%block name="wiki_body"/>
</section>
</div>
......
......@@ -5,7 +5,7 @@
<%block name="title"><title>Create Article - MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
Create article
<h1>Create article</h1>
</%block>
<%block name="wiki_body">
......
......@@ -5,7 +5,7 @@
<%block name="title"><title>${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
${ wiki_article.title }
<h1>${ wiki_article.title }</h1>
</%block>
<%block name="wiki_head">
......
......@@ -10,7 +10,7 @@
<%block name="wiki_page_title">
Oops...
<h1>Oops...</h1>
</%block>
......
......@@ -9,7 +9,9 @@
%>
<%block name="wiki_page_title">
<h1>
${ wiki_article.title }
</h1>
</%block>
<%block name="wiki_body">
......
......@@ -9,14 +9,17 @@ from django.core.urlresolvers import reverse
%>
<%block name="wiki_page_title">
<h2 class="wiki-title">
%if wiki_search_query:
Search results for ${wiki_search_query | h}
%else:
Displaying all articles
%endif
</h2>
</%block>
<%block name="wiki_body">
<section class="results">
<ul class="article-list">
%for article in wiki_search_results:
<% article_deleted = not article.current_revision.deleted == 0 %>
......@@ -27,4 +30,5 @@ Displaying all articles
No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>!
%endif
</ul>
</section>
</%block>
......@@ -5,7 +5,7 @@
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
<h1>${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}</h1>
</%block>
<%block name="wiki_body">
......
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