Commit 02133105 by Kyle Fiedler

merged with default

--HG--
branch : kf-profile-graph
parents 8b497906 068e9ead
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<!-- <p>Now go <a href="/">log in</a> and try the course!</a></p> --> <!-- <p>Now go <a href="/">log in</a> and try the course!</a></p> -->
<p> This account has already been activated. We will notify you as <p> This account has already been activated. We will notify you as
soon as the course starts.</p> soon as the course starts.</p>
<p>For now you can go to the <a href="https://mitx.mit.edu/">MITx homepage</a> or the <a href="/">6.002x course page</a>.</p> <p>For now you can go to the <a href="http://mitx.mit.edu/">MITx homepage</a> or the <a href="/">6.002x course page</a>.</p>
</div> </div>
</section> </section>
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<h1>Activation Complete!</h1> <h1>Activation Complete!</h1>
<!-- <p>Now go <a href="/">log in</a> and try the course!</a></p> --> <!-- <p>Now go <a href="/">log in</a> and try the course!</a></p> -->
<p>Thanks for activating your email. We will notify you as soon as the course starts.</p> <p>Thanks for activating your email. We will notify you as soon as the course starts.</p>
<p>For now you can go to the <a href="https://mitx.mit.edu/">MITx homepage</a> or the <a href="/">6.002x course page</a>.</p> <p>For now you can go to the <a href="http://mitx.mit.edu/">MITx homepage</a> or the <a href="/">6.002x course page</a>.</p>
</div> </div>
</section> </section>
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
<div name="enroll_form" id="enroll_form"> <div name="enroll_form" id="enroll_form">
<h1>Enroll in 6.002x Circuits &amp; Electronics</h1> <h1>Enroll in 6.002x Circuits &amp; Electronics</h1>
<!--[if lte IE 8]>
<p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p> <p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p>
<![endif]-->
<form name="enroll" id="enroll_form" method="get"> <form name="enroll" id="enroll_form" method="get">
<fieldset><% if 'error' in locals(): e = error %> <fieldset><% if 'error' in locals(): e = error %>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
<p>The course introduces engineering in the context of the lumped circuit abstraction. Topics covered include: resistive elements and networks; independent and dependent sources; switches and MOS transistors; digital abstraction; amplifiers; energy storage elements; dynamics of first- and second-order networks; design in the time and frequency domains; and analog and digital circuits and applications. Design and lab exercises are also significant components of the course. You should expect to spend approximately 10 hours per week on the course.</p> <p>The course introduces engineering in the context of the lumped circuit abstraction. Topics covered include: resistive elements and networks; independent and dependent sources; switches and MOS transistors; digital abstraction; amplifiers; energy storage elements; dynamics of first- and second-order networks; design in the time and frequency domains; and analog and digital circuits and applications. Design and lab exercises are also significant components of the course. You should expect to spend approximately 10 hours per week on the course.</p>
<!-- <p> The course uses the textbook Foundations of Analog and Digital Electronic Circuits. Agarwal, Anant, and Jeffrey H. Lang. San Mateo, CA: Morgan Kaufmann Publishers, Elsevier, July 2005. ISBN: 9781558607354. While recommended, the book is not required -- relevant section will be provided electronically as part of the on-line course.</p> -->
</section> </section>
<section class="on-mitx"> <section class="on-mitx">
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<h1>Log in to MITx</h1> <h1>Log in to MITx</h1>
<p class="no-account">If you don&rsquo;t have an account yet, <a href="#enroll" rel="leanModal">please enroll here</a></p> <p class="no-account">If you don&rsquo;t have an account yet, <a href="#enroll" rel="leanModal">please enroll here</a></p>
</header> </header>
<!--[if lte IE 8]>
<p class="ie-warning">You are using a browser that is not supported by <em>MITx</em>, and you might not be able to complete pieces of the course. Please download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.google.com/chrome">Chrome</a> to get the full experience.</p>
<![endif]-->
<form id="login_form" method="post"> <form id="login_form" method="post">
<ol> <ol>
......
...@@ -20,13 +20,16 @@ ...@@ -20,13 +20,16 @@
displayMath: [["\\[","\\]"]]} displayMath: [["\\[","\\]"]]}
}); });
</script> </script>
<script type="text/javascript" src="${ settings.LIB_URL }mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script> <script type="text/javascript" src="${ settings.LIB_URL }mathjax-MathJax-c9db6ac/MathJax.js?config=TeX-AMS_HTML-full"></script>
<%block name="headextra"/> <%block name="headextra"/>
</head> </head>
<body class="<%block name="bodyclass"/>"> <body class="<%block name="bodyclass"/>">
<!--[if lte IE 8]>
<p class="ie-warning">You are using a browser that is not supported by <em>MITx</em>, and you might not be able to complete pieces of the course. Please download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.google.com/chrome">Chrome</a> to get the full experience.</p>
<![endif]-->
${self.body()} ${self.body()}
<%block name="bodyextra"/> <%block name="bodyextra"/>
......
...@@ -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
......
...@@ -61,7 +61,7 @@ $(function () { ...@@ -61,7 +61,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
......
...@@ -76,6 +76,10 @@ div.profile-wrapper { ...@@ -76,6 +76,10 @@ div.profile-wrapper {
padding: lh() 0; padding: lh() 0;
width: 100%; width: 100%;
&:last-child {
border-bottom: 0px;
}
h2 { h2 {
border-right: 1px dashed #ddd; border-right: 1px dashed #ddd;
@include box-sizing(border-box); @include box-sizing(border-box);
......
...@@ -54,7 +54,7 @@ div.book-wrapper { ...@@ -54,7 +54,7 @@ div.book-wrapper {
a { a {
@extend .block-link; @extend .block-link;
padding: 14px; padding: 0 lh();
} }
ul { ul {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@import "textbook"; @import "textbook";
@import "info"; @import "info";
@import "profile"; @import "profile";
@import "wiki/basic-html", "wiki/sidebar", "wiki/create", "wiki/wiki"; @import "wiki/basic-html", "wiki/sidebar", "wiki/create", "wiki/wiki", "wiki/table";
@import "help"; @import "help";
@import "discussion/askbot-original", "discussion/discussion","discussion/sidebar", "discussion/questions", "discussion/tags", "discussion/question-view" , "discussion/answers", "discussion/forms", "discussion/form-wmd-toolbar", "discussion/modals", "discussion/profile"; @import "discussion/askbot-original", "discussion/discussion","discussion/sidebar", "discussion/questions", "discussion/tags", "discussion/question-view" , "discussion/answers", "discussion/forms", "discussion/form-wmd-toolbar", "discussion/modals", "discussion/profile";
...@@ -172,6 +172,8 @@ h1.top-header { ...@@ -172,6 +172,8 @@ h1.top-header {
font-size: 12px; font-size: 12px;
margin: (-$body-line-height) (-$body-line-height) $body-line-height; margin: (-$body-line-height) (-$body-line-height) $body-line-height;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
line-height: 46px;
height:46px;
@media print { @media print {
display: none; display: none;
...@@ -190,7 +192,6 @@ h1.top-header { ...@@ -190,7 +192,6 @@ h1.top-header {
border-left: 1px solid darken(#f6efd4, 20%); border-left: 1px solid darken(#f6efd4, 20%);
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
display: block; display: block;
padding: lh(.75);
text-transform: uppercase; text-transform: uppercase;
&:hover { &:hover {
...@@ -203,3 +204,12 @@ h1.top-header { ...@@ -203,3 +204,12 @@ h1.top-header {
.tran { .tran {
@include transition( all, .2s, $ease-in-out-quad); @include transition( all, .2s, $ease-in-out-quad);
} }
p.ie-warning {
display: block !important;
line-height: 1.3em;
background: yellow;
padding: lh();
text-align: left;
margin-bottom: 0;
}
...@@ -24,9 +24,9 @@ nav.sequence-nav { ...@@ -24,9 +24,9 @@ nav.sequence-nav {
} }
.visited { .visited {
background-color: shade(#F6EFD4, 10%); background-color: #DCCDA2;
background-repeat: no-repeat; background-repeat: no-repeat;
border-color: shade(#F6EFD4, 10%); @include box-shadow(inset 0 0 3px darken(#dccda2, 10%));
&:hover { &:hover {
background-color: #F6EFD4; background-color: #F6EFD4;
...@@ -52,7 +52,7 @@ nav.sequence-nav { ...@@ -52,7 +52,7 @@ nav.sequence-nav {
border: none; border: none;
border-right: 1px solid darken(#F6EFD4, 10%); border-right: 1px solid darken(#F6EFD4, 10%);
cursor: pointer; cursor: pointer;
padding: 14px 4px; padding: 15px 4px 14px;
width: 28px; width: 28px;
height: 17px; height: 17px;
...@@ -121,13 +121,14 @@ nav.sequence-nav { ...@@ -121,13 +121,14 @@ nav.sequence-nav {
p { p {
position: absolute; position: absolute;
display: none; display: none;
background: #B3A87E; background: #333;
padding: 6px; padding: 6px;
white-space: pre-wrap; white-space: pre-wrap;
z-index: 99; z-index: 99;
margin: 4px 0 0 -5px; margin: 4px 0 0 -5px;
text-shadow: 0 -1px 0 darken(#B3A87E, 10%); text-shadow: 0 -1px 0 #000;
color: #fff; color: #fff;
line-height: lh();
&:empty { &:empty {
background: none; background: none;
...@@ -138,7 +139,7 @@ nav.sequence-nav { ...@@ -138,7 +139,7 @@ nav.sequence-nav {
} }
&::after { &::after {
background: #B3A87E; background: #333;
content: " "; content: " ";
display: block; display: block;
height: 10px; height: 10px;
...@@ -172,7 +173,7 @@ nav.sequence-nav { ...@@ -172,7 +173,7 @@ nav.sequence-nav {
border-left: 1px solid darken(#f6efd4, 20%); border-left: 1px solid darken(#f6efd4, 20%);
cursor: pointer; cursor: pointer;
display: table-cell; display: table-cell;
padding: 14px 4px; padding: 0 4px;
text-indent: -9999px; text-indent: -9999px;
width: 82px; width: 82px;
......
...@@ -39,6 +39,7 @@ body.askbot { ...@@ -39,6 +39,7 @@ body.askbot {
div.discussion-content { div.discussion-content {
@include box-sizing(border-box); @include box-sizing(border-box);
display: table-cell; display: table-cell;
min-width: 650px;
padding: lh(); padding: lh();
vertical-align: top; vertical-align: top;
width: flex-grid(9) + flex-gutter(); width: flex-grid(9) + flex-gutter();
......
...@@ -42,7 +42,7 @@ div.question-list-header { ...@@ -42,7 +42,7 @@ div.question-list-header {
div.question-sort { div.question-sort {
float: right; float: right;
margin-left: flex-gutter(); margin-left: flex-gutter();
margin-top: 10px; margin-top: 6px;
nav { nav {
@extend .action-link; @extend .action-link;
...@@ -87,11 +87,13 @@ div.question-list-header { ...@@ -87,11 +87,13 @@ div.question-list-header {
} }
ul.tags li { ul.tags {
background: #fff; li {
background: #fff;
&:before { &:before {
border-color: transparent #fff transparent transparent; border-color: transparent #fff transparent transparent;
}
} }
} }
} }
...@@ -138,9 +140,14 @@ ul.question-list, div#question-list { ...@@ -138,9 +140,14 @@ ul.question-list, div#question-list {
text-transform: none; text-transform: none;
} }
p.excerpt {
color: #777;
}
div.user-info { div.user-info {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin-bottom: 10px;
span.relative-time { span.relative-time {
font-weight: normal; font-weight: normal;
...@@ -158,8 +165,11 @@ ul.question-list, div#question-list { ...@@ -158,8 +165,11 @@ ul.question-list, div#question-list {
} }
&.question-meta { &.question-meta {
float: right;
margin-top: 10px;
width: flex-grid(3.5,9); width: flex-grid(3.5,9);
ul { ul {
text-align: right; text-align: right;
...@@ -172,6 +182,10 @@ ul.question-list, div#question-list { ...@@ -172,6 +182,10 @@ ul.question-list, div#question-list {
margin-right: 10px; margin-right: 10px;
width: 60px; width: 60px;
&:last-child {
margin-right: 0px;
}
&:hover { &:hover {
span, div { span, div {
color: #555; color: #555;
......
...@@ -7,6 +7,10 @@ div.discussion-wrapper aside { ...@@ -7,6 +7,10 @@ div.discussion-wrapper aside {
padding: lh(); padding: lh();
width: flex-grid(3); width: flex-grid(3);
&.main-sidebar {
min-width:200px;
}
h1 { h1 {
@extend .bottom-border; @extend .bottom-border;
margin: (-(lh())) (-(lh())) 0; margin: (-(lh())) (-(lh())) 0;
...@@ -26,8 +30,15 @@ div.discussion-wrapper aside { ...@@ -26,8 +30,15 @@ div.discussion-wrapper aside {
box-shadow: none; box-shadow: none;
} }
input[type="text"] { div.inputs {
width: 76%; input[type="submit"] {
width: 27%;
float: right;
}
input[type="text"] {
width: 62%;
}
} }
div.box { div.box {
......
...@@ -85,3 +85,10 @@ ...@@ -85,3 +85,10 @@
} }
} }
p.ie-warning {
display: block !important;
line-height: 1.3em;
background: yellow;
margin-bottom: lh();
padding: lh();
}
...@@ -47,10 +47,6 @@ div.leanModal_box { ...@@ -47,10 +47,6 @@ div.leanModal_box {
&#enroll { &#enroll {
max-width: 600px; max-width: 600px;
p.ie-warning {
display: none;
}
ol { ol {
@extend .clearfix; @extend .clearfix;
padding-top: lh(); padding-top: lh();
......
...@@ -9,11 +9,6 @@ body { ...@@ -9,11 +9,6 @@ body {
} }
div#enroll { div#enroll {
p.ie-warning {
display: block !important;
line-height: 1.3em;
}
form { form {
display: none; display: none;
} }
......
table.wiki-history {
thead {
background: #ddd;
// border-bottom: 1px solid #ddd;
tr {
height: 40px;
th {
padding-top: 10px;
padding-left: 15px;
&#revision {
width: 5%;
}
&#comment {
width: 15%;
}
&#diff {
width: 60%;
}
&#modified {
width:20%;
}
}
}
}
tbody {
tr td {
padding: 8px 15px;
}
}
tr.dark {
background-color: #efefef;
}
}
div.history-controls {
margin-top: 20px;
input[type="submit"] {
@extend .light-button;
}
}
...@@ -3,13 +3,19 @@ div.wiki-wrapper { ...@@ -3,13 +3,19 @@ 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;
height:46px;
@include box-shadow(inset 0 1px 0 white);
&:empty { &:empty {
display: none !important; display: none !important;
border-bottom: 0;
} }
a { a {
...@@ -18,10 +24,10 @@ div.wiki-wrapper { ...@@ -18,10 +24,10 @@ div.wiki-wrapper {
p { p {
float: left; float: left;
padding: 15px;
margin-bottom: 0; margin-bottom: 0;
color: darken(#F6EFD4, 55%); color: darken(#F6EFD4, 55%);
line-height: 1em; line-height: 46px;
padding-left: lh();
} }
ul { ul {
...@@ -32,71 +38,113 @@ div.wiki-wrapper { ...@@ -32,71 +38,113 @@ div.wiki-wrapper {
float: left; float: left;
input[type="button"] { input[type="button"] {
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); @extend .block-link;
@include border-radius(0); background-color: darken(#F6EFD4, 5%);
@include transition(); background-position: 12px center;
background-repeat: no-repeat;
border: 0; border: 0;
border-left: 1px solid darken(#f6efd4, 20%); border-left: 1px solid darken(#f6efd4, 20%);
@include border-radius(0);
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
color: darken(#F6EFD4, 80%); color: darken(#F6EFD4, 80%);
text-shadow: none; display: block;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
padding: 14px; line-height: 46px;
padding-left: 38px;
margin: 0; margin: 0;
padding: 0 lh() 0 38px;
text-shadow: none;
text-transform: uppercase;
@include transition();
&.view { &.view {
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/view.png') no-repeat 12px 12px; background-image: url('/static/images/sequence-nav/view.png');
} }
&.history { &.history {
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/history.png') no-repeat 12px 12px; background-image: url('/static/images/sequence-nav/history.png');
} }
&.edit { &.edit {
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/edit.png') no-repeat 12px 12px; background-image: url('/static/images/sequence-nav/edit.png');
} }
&:hover { &:hover {
background-color: #F6EFD4; background-color: transparent;
} }
} }
} }
} }
} }
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;
} }
ul.article-list { section.results {
margin-left: 15px; display: table-cell;
width: flex-grid(5, 9);
padding-left: flex-gutter(9);
li { @media screen and (max-width:1120px) {
margin: 10px 0; display: block;
list-style-image: url('/static/images/bullet-triangle.png'); width: auto;
padding: 0;
}
h3 { @media print {
font-size: 18px; display: block;
font-weight: normal; width: auto;
padding: 0;
canvas, img {
page-break-inside: avoid;
} }
} }
}
#wiki_history_table { ul.article-list {
tr.dark { margin-left: 15px;
background-color: $light-gray;
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 @@ ...@@ -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>
...@@ -137,34 +137,33 @@ ...@@ -137,34 +137,33 @@
</%block> </%block>
<section class="wiki-body"> <section class="wiki-body">
<header>
%if wiki_article is not UNDEFINED: %if wiki_article is not UNDEFINED:
<header>
%if wiki_article.locked: %if wiki_article.locked:
<p><strong>This article has been locked</strong></p> <p><strong>This article has been locked</strong></p>
%endif %endif
<p>Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}</p> <p>Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}</p>
%endif %endif
%if wiki_article is not UNDEFINED: %if wiki_article is not UNDEFINED:
<ul> <ul>
<li> <li>
<input type="button" onclick="javascript:location.href='${reverse("wiki_view", args=[wiki_article.get_url()])}'" value="View" class="view" /> <input type="button" onclick="javascript:location.href='${reverse("wiki_view", args=[wiki_article.get_url()])}'" value="View" class="view" />
</li> </li>
<li> <li>
<input type="button" onclick="javascript:location.href='${reverse("wiki_edit", args=[wiki_article.get_url()])}'" value="Edit" ${'disabled="true"' if not wiki_write else ""} class="edit"/> <input type="button" onclick="javascript:location.href='${reverse("wiki_edit", args=[wiki_article.get_url()])}'" value="Edit" ${'disabled="true"' if not wiki_write else ""} class="edit"/>
</li> </li>
<li> <li>
<input type="button" onclick="javascript:location.href='${reverse("wiki_history", args=[wiki_article.get_url(),1])}'" value="History" class="button history" /> <input type="button" onclick="javascript:location.href='${reverse("wiki_history", args=[wiki_article.get_url(),1])}'" value="History" class="button history" />
</li> </li>
</ul> </ul>
</header>
%endif %endif
</header>
<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">
...@@ -17,7 +19,7 @@ ${ wiki_article.title } ...@@ -17,7 +19,7 @@ ${ wiki_article.title }
<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>
<table id="wiki_history_table"> <table id="wiki_history_table" class="wiki-history">
<thead> <thead>
<tr> <tr>
<th id="revision">Revision</th> <th id="revision">Revision</th>
...@@ -27,34 +29,34 @@ ${ wiki_article.title } ...@@ -27,34 +29,34 @@ ${ wiki_article.title }
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% loopCount = 0 %> <% loopCount = 0 %>
%for revision in wiki_history: %for revision in wiki_history:
%if revision.deleted < 2 or show_delete_revision: %if revision.deleted < 2 or show_delete_revision:
<% loopCount += 1 %> <% loopCount += 1 %>
<tr style="border-top: 1px" class="${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}" > <tr style="border-top: 1px" class="${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}" >
<td width="15px"> <td width="15px">
<input type="radio" name="revision" id="${revision.id}" value="${revision.id}"${"checked" if wiki_article.current_revision.id == revision.id else ""}/> <input type="radio" name="revision" id="${revision.id}" value="${revision.id}"${"checked" if wiki_article.current_revision.id == revision.id else ""}/>
<label for="${revision.id}"> <label for="${revision.id}">
${ revision } ${ revision }
%if revision.previous_revision: %if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1: %if not revision.counter == revision.previous_revision.counter + 1:
<br/>(based on ${revision.previous_revision}) <br/>(based on ${revision.previous_revision})
%endif %endif
%endif %endif
</label> </label>
</td> </td>
<td> <td>
${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td> ${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td>
<td class="diff"> <td class="diff">
%for x in revision.get_diff(): %for x in revision.get_diff():
${x|h}<br/> ${x|h}<br/>
%endfor </td> %endfor </td>
<td>${revision.get_user()} <td>${revision.get_user()}
<br/> <br/>
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")} ${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
</td> </td>
</tr> </tr>
%endif %endif
%endfor %endfor
</tbody> </tbody>
%if wiki_prev_page or wiki_next_page: %if wiki_prev_page or wiki_next_page:
...@@ -72,17 +74,18 @@ ${ wiki_article.title } ...@@ -72,17 +74,18 @@ ${ wiki_article.title }
</tfoot> </tfoot>
%endif %endif
</table> </table>
<input type="submit" name="view" value="View revision"/> <div class="history-controls"><input type="submit" name="view" value="View revision"/>
<input type="submit" name="change" value="Change to revision" <input type="submit" name="change" value="Change to revision"
%if not wiki_write: %if not wiki_write:
disabled="true" disabled="true"
%endif %endif
/> />
%if show_delete_revision: %if show_delete_revision:
<input type="submit" name="delete" value="Admin Delete revision"/> <input type="submit" name="delete" value="Delete revision"/>
<input type="submit" name="restore" value="Admin Restore revision"/> <input type="submit" name="restore" value="Restore revision"/>
<input type="submit" name="delete_all" value="Admin Delete all revisions"> <input type="submit" name="delete_all" value="Delete all revisions">
<input type="submit" name="lock_article" value="${'Lock Article' if not wiki_article.locked else 'Unlock Article'}"> <input type="submit" name="lock_article" value="${'Lock Article' if not wiki_article.locked else 'Unlock Article'}">
%endif %endif
</div>
</form> </form>
</%block> </%block>
...@@ -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