Commit c44c9851 by Kyle Fiedler

Merged heads

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