Merge
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
${init}
|
||||
});
|
||||
${init}
|
||||
|
||||
$(".sequence-nav li a").hover(function(){
|
||||
$(this).siblings().toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<script type="text/javascript" src="/static/js/schematic.js"></script>
|
||||
<script type="text/javascript" src="/static/js/cktsim.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
// Feedback form
|
||||
$(function() {
|
||||
@@ -117,6 +118,5 @@ $(function(){
|
||||
</script>
|
||||
|
||||
<%block name="js_extra"/>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
@import "base/reset", "base/font-face";
|
||||
@import "base/variables", "base/functions", "base/extends", "base/base";
|
||||
@import "layout/layout", "layout/header", "layout/footer", "layout/leanmodal";
|
||||
@import "jquery-ui-1.8.16.custom";
|
||||
@import "plugins/jquery-ui-1.8.16.custom";
|
||||
|
||||
// pages
|
||||
@import "courseware/courseware", "courseware/sidebar", "courseware/video", "courseware/sequence-nav", "courseware/amplifier";
|
||||
@import "textbook";
|
||||
@import "info";
|
||||
@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 "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";
|
||||
|
||||
@@ -6,102 +6,150 @@ nav.sequence-nav {
|
||||
display: table-row;
|
||||
float: left;
|
||||
width: flex-grid(7.5,9) + flex-gutter();
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
@extend .block-link;
|
||||
}
|
||||
|
||||
.inactive {
|
||||
background-repeat: no-repeat;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten(#F6EFD4, 3%);
|
||||
}
|
||||
}
|
||||
|
||||
.visited {
|
||||
background-color: shade(#F6EFD4, 10%);
|
||||
background-repeat: no-repeat;
|
||||
border-color: shade(#F6EFD4, 10%);
|
||||
|
||||
&:hover {
|
||||
background-color: #F6EFD4;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
// @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%));
|
||||
@include box-shadow(0 1px 0 #fff);
|
||||
background-color: #fff;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
@include box-shadow(1px 0 0 #fff);
|
||||
background-position: center center;
|
||||
border: none;
|
||||
border-right: 1px solid darken(#F6EFD4, 10%);
|
||||
cursor: pointer;
|
||||
display: table-cell;
|
||||
padding: 14px 4px;
|
||||
width: 28px;
|
||||
|
||||
// @media screen and (max-width: 800px) {
|
||||
// padding: 12px 8px;
|
||||
// }
|
||||
.inactive {
|
||||
background-repeat: no-repeat;
|
||||
|
||||
//video
|
||||
&.seq_video_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-normal.png');
|
||||
&:hover {
|
||||
background-color: lighten(#F6EFD4, 3%);
|
||||
}
|
||||
}
|
||||
|
||||
&.seq_video_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-visited.png');
|
||||
.visited {
|
||||
background-color: shade(#F6EFD4, 10%);
|
||||
background-repeat: no-repeat;
|
||||
border-color: shade(#F6EFD4, 10%);
|
||||
|
||||
&:hover {
|
||||
background-color: #F6EFD4;
|
||||
background-position: center center;
|
||||
}
|
||||
}
|
||||
|
||||
&.seq_video_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-current.png');
|
||||
.active {
|
||||
// @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%));
|
||||
@include box-shadow(0 1px 0 #fff);
|
||||
background-color: #fff;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
//other
|
||||
&.seq_other_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-normal.png');
|
||||
}
|
||||
a {
|
||||
@include box-shadow(1px 0 0 #fff);
|
||||
background-position: center center;
|
||||
border: none;
|
||||
border-right: 1px solid darken(#F6EFD4, 10%);
|
||||
cursor: pointer;
|
||||
padding: 14px 4px;
|
||||
width: 28px;
|
||||
height: 17px;
|
||||
|
||||
&.seq_other_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-visited.png');
|
||||
}
|
||||
// @media screen and (max-width: 800px) {
|
||||
// padding: 12px 8px;
|
||||
// }
|
||||
|
||||
&.seq_other_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-current.png');
|
||||
}
|
||||
//video
|
||||
&.seq_video_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-normal.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
//vertical & problems
|
||||
&.seq_vertical_inactive, &.seq_problem_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-normal.png');
|
||||
}
|
||||
&.seq_video_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-visited.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_vertical_visited, &.seq_problem_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-visited.png');
|
||||
}
|
||||
&.seq_video_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/video-icon-current.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_vertical_active, &.seq_problem_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-current.png');
|
||||
}
|
||||
//other
|
||||
&.seq_other_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-normal.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_other_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-visited.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_other_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/document-icon-current.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
//vertical & problems
|
||||
&.seq_vertical_inactive, &.seq_problem_inactive {
|
||||
@extend .inactive;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-normal.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_vertical_visited, &.seq_problem_visited {
|
||||
@extend .visited;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-visited.png');
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&.seq_vertical_active, &.seq_problem_active {
|
||||
@extend .active;
|
||||
background-image: url('/static/images/sequence-nav/list-icon-current.png');
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
position: absolute;
|
||||
display: none;
|
||||
background: #B3A87E;
|
||||
padding: 6px;
|
||||
white-space: pre-wrap;
|
||||
z-index: 99;
|
||||
margin: 4px 0 0 -5px;
|
||||
text-shadow: 0 -1px 0 darken(#B3A87E, 10%);
|
||||
color: #fff;
|
||||
|
||||
&:empty {
|
||||
background: none;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
background: #B3A87E;
|
||||
content: " ";
|
||||
display: block;
|
||||
height: 10px;
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 18px;
|
||||
@include transform(rotate(45deg));
|
||||
@include transition();
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,42 +143,28 @@ section.course-content {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
h3 {
|
||||
@include inline-block();
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
display: block;
|
||||
padding: 0 lh(.5);
|
||||
@include inline-block();
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: #444;
|
||||
// background-color: #444;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fix for now
|
||||
ol#video_speeds {
|
||||
@extend .clearfix;
|
||||
background: #333;
|
||||
border: 1px solid #000;
|
||||
font-weight: bold;
|
||||
@include inline-block();
|
||||
padding: 0 lh();
|
||||
position: absolute;
|
||||
right: 79px;
|
||||
@include box-shadow(inset 0 1px 0 #555);
|
||||
padding-right: lh(.5);
|
||||
|
||||
li {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
margin-bottom: 0;
|
||||
margin-right: lh(.5);
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $mit-red;
|
||||
}
|
||||
@include inline-block();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ body.askbot {
|
||||
div.discussion-content {
|
||||
@include box-sizing(border-box);
|
||||
display: table-cell;
|
||||
min-width: 650px;
|
||||
padding: lh();
|
||||
vertical-align: top;
|
||||
width: flex-grid(9) + flex-gutter();
|
||||
|
||||
@@ -14,7 +14,7 @@ body.user-profile-page {
|
||||
> li {
|
||||
display: table-cell;
|
||||
padding: (flex-gutter(9)/2);
|
||||
border-right: 1px solid #ddd;
|
||||
border-right: 1px dashed #efefef;
|
||||
@include box-sizing(border-box);
|
||||
|
||||
&:first-child {
|
||||
@@ -76,7 +76,7 @@ body.user-profile-page {
|
||||
|
||||
&.up {
|
||||
background-color:#d1e3a8;
|
||||
background-image: url(/static/images/askbot/vote-arrow-up.png);
|
||||
background-image: url(/static/images/askbot/vote-arrow-up-activate.png);
|
||||
margin-right: 6px;
|
||||
|
||||
span.vote-count {
|
||||
@@ -85,7 +85,7 @@ body.user-profile-page {
|
||||
}
|
||||
|
||||
&.down {
|
||||
background-image: url(/static/images/askbot/vote-arrow-down.png);
|
||||
background-image: url(/static/images/askbot/vote-arrow-down-activate.png);
|
||||
background-color:#eac6ad;
|
||||
|
||||
span.vote-count {
|
||||
|
||||
@@ -19,14 +19,19 @@ div.question-header {
|
||||
|
||||
&.post-vote {
|
||||
@include border-radius(4px);
|
||||
background-color: lighten(#F6EFD4, 3%);
|
||||
background-color: lighten(#F6EFD4, 5%);
|
||||
border: 1px solid darken( #F6EFD4,10% );
|
||||
@include box-shadow(inset 0 1px 0px #fff);
|
||||
}
|
||||
|
||||
&.question-img-upvote, &.answer-img-upvote {
|
||||
background-image: url(/static/images/askbot/vote-arrow-up.png);
|
||||
@include box-shadow(inset 0 1px 0px rgba(255, 255, 255, 0.5));
|
||||
|
||||
&:hover, &.on {
|
||||
background-color:#d1e3a8;
|
||||
border-color: darken(#D1E3A8, 20%);
|
||||
background-image: url(/static/images/askbot/vote-arrow-up-activate.png);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +39,9 @@ div.question-header {
|
||||
background-image: url(/static/images/askbot/vote-arrow-down.png);
|
||||
|
||||
&:hover, &.on {
|
||||
background-color:#eac6ad;
|
||||
background-color:#EAC6AD;
|
||||
border-color: darken(#EAC6AD, 20%);
|
||||
background-image: url(/static/images/askbot/vote-arrow-down-activate.png);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +106,7 @@ div.question-header {
|
||||
div.post-update-container {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: flex-grid(1.8,8);
|
||||
width: 20%;
|
||||
border-left: 1px dashed #ddd;
|
||||
|
||||
div.post-update-info {
|
||||
@@ -319,6 +326,5 @@ div.share-question {
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ div.question-list-header {
|
||||
div.question-sort {
|
||||
float: right;
|
||||
margin-left: flex-gutter();
|
||||
margin-top: 10px;
|
||||
margin-top: 6px;
|
||||
|
||||
nav {
|
||||
@extend .action-link;
|
||||
@@ -87,11 +87,13 @@ div.question-list-header {
|
||||
|
||||
}
|
||||
|
||||
ul.tags li {
|
||||
background: #fff;
|
||||
ul.tags {
|
||||
li {
|
||||
background: #fff;
|
||||
|
||||
&:before {
|
||||
border-color: transparent #fff transparent transparent;
|
||||
&:before {
|
||||
border-color: transparent #fff transparent transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,9 +140,14 @@ ul.question-list, div#question-list {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
p.excerpt {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
div.user-info {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span.relative-time {
|
||||
font-weight: normal;
|
||||
@@ -158,8 +165,11 @@ ul.question-list, div#question-list {
|
||||
}
|
||||
|
||||
&.question-meta {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
width: flex-grid(3.5,9);
|
||||
|
||||
|
||||
ul {
|
||||
text-align: right;
|
||||
|
||||
@@ -172,6 +182,10 @@ ul.question-list, div#question-list {
|
||||
margin-right: 10px;
|
||||
width: 60px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span, div {
|
||||
color: #555;
|
||||
|
||||
@@ -7,6 +7,10 @@ div.discussion-wrapper aside {
|
||||
padding: lh();
|
||||
width: flex-grid(3);
|
||||
|
||||
&.main-sidebar {
|
||||
min-width:200px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@extend .bottom-border;
|
||||
margin: (-(lh())) (-(lh())) 0;
|
||||
@@ -26,8 +30,15 @@ div.discussion-wrapper aside {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
width: 76%;
|
||||
div.inputs {
|
||||
input[type="submit"] {
|
||||
width: 27%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
width: 62%;
|
||||
}
|
||||
}
|
||||
|
||||
div.box {
|
||||
@@ -283,6 +294,11 @@ div.discussion-wrapper aside {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: bold;
|
||||
|
||||
48
sass/wiki/_table.scss
Normal file
48
sass/wiki/_table.scss
Normal file
@@ -0,0 +1,48 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ div.wiki-wrapper {
|
||||
|
||||
header {
|
||||
@extend .topbar;
|
||||
height:46px;
|
||||
@include box-shadow(inset 0 1px 0 white);
|
||||
|
||||
&:empty {
|
||||
display: none !important;
|
||||
@@ -35,7 +37,6 @@ div.wiki-wrapper {
|
||||
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
|
||||
@include border-radius(0);
|
||||
@include transition();
|
||||
background: darken(#F6EFD4, 5%);
|
||||
border: 0;
|
||||
border-left: 1px solid darken(#f6efd4, 20%);
|
||||
color: darken(#F6EFD4, 80%);
|
||||
@@ -44,11 +45,25 @@ div.wiki-wrapper {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
padding: 14px;
|
||||
padding: 14.9px;
|
||||
padding-left: 38px;
|
||||
margin: 0;
|
||||
|
||||
|
||||
&.view {
|
||||
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/view.png') no-repeat 12px 12px;
|
||||
}
|
||||
|
||||
&.history {
|
||||
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/history.png') no-repeat 12px 12px;
|
||||
}
|
||||
|
||||
&.edit {
|
||||
background: darken(#F6EFD4, 5%) url('/static/images/sequence-nav/edit.png') no-repeat 12px 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
background-color: #F6EFD4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,10 +81,19 @@ div.wiki-wrapper {
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
#wiki_history_table {
|
||||
tr.dark {
|
||||
background-color: $light-gray;
|
||||
ul.article-list {
|
||||
margin-left: 15px;
|
||||
|
||||
li {
|
||||
margin: 10px 0;
|
||||
list-style-image: url('/static/images/bullet-triangle.png');
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<nav class="sequence-nav">
|
||||
<ol>
|
||||
% for t in range(1,1+len(items)):
|
||||
<li class="seq_inactive" id="tt_${ t }"> </li>
|
||||
<li><a href="#" class="seq_inactive" id="tt_${ t }"></a></li>
|
||||
% endfor
|
||||
</ol>
|
||||
|
||||
@@ -11,8 +11,5 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<!-- <td colspan=${ len(items) }> -->
|
||||
<div id="seq_content"></div>
|
||||
<!-- </td> -->
|
||||
<div id="seq_content"></div>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ function ${ id }goto(i) {
|
||||
function ${ id }setup_click(i) {
|
||||
$('#tt_'+i).click(function(eo) { ${ id }goto(i);});
|
||||
$('#tt_'+i).addClass("seq_"+${ id }types[i]+"_inactive");
|
||||
$('#tt_'+i).attr("title", ${ id }titles[i-1]);
|
||||
$('#tt_'+i).parent().append("<p>" + ${ id }titles[i-1] + "</p>");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -122,14 +122,14 @@
|
||||
</li>
|
||||
|
||||
<li class="search">
|
||||
<form method="POST" action='${reverse("wiki_search_articles", args=[])}'>
|
||||
<label class="wiki_box_title">Search</label>
|
||||
<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%" />
|
||||
</form>
|
||||
<form method="POST" action='${reverse("wiki_search_articles", args=[])}'>
|
||||
<label class="wiki_box_title">Search</label>
|
||||
<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%" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -149,15 +149,15 @@
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<input type="button" onclick="javascript:location.href='${reverse("wiki_view", args=[wiki_article.get_url()])}'" value="View" />
|
||||
<input type="button" onclick="javascript:location.href='${reverse("wiki_view", args=[wiki_article.get_url()])}'" value="View" class="view" />
|
||||
</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 ""}/>
|
||||
<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>
|
||||
<input type="button" onclick="javascript:location.href='${reverse("wiki_history", args=[wiki_article.get_url(),1])}'" value="History" class="button" />
|
||||
<input type="button" onclick="javascript:location.href='${reverse("wiki_history", args=[wiki_article.get_url(),1])}'" value="History" class="button history" />
|
||||
</li>
|
||||
</ul>
|
||||
%endif
|
||||
|
||||
@@ -17,7 +17,7 @@ ${ wiki_article.title }
|
||||
<div style="display:none">
|
||||
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
|
||||
</div>
|
||||
<table id="wiki_history_table">
|
||||
<table id="wiki_history_table" class="wiki-history">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="revision">Revision</th>
|
||||
@@ -27,34 +27,34 @@ ${ wiki_article.title }
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loopCount = 0 %>
|
||||
%for revision in wiki_history:
|
||||
%if revision.deleted < 2 or show_delete_revision:
|
||||
<% loopCount += 1 %>
|
||||
<tr style="border-top: 1px" class="${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}" >
|
||||
<td width="15px">
|
||||
<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}">
|
||||
${ revision }
|
||||
%if revision.previous_revision:
|
||||
%if not revision.counter == revision.previous_revision.counter + 1:
|
||||
<br/>(based on ${revision.previous_revision})
|
||||
%endif
|
||||
%endif
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td>
|
||||
<td class="diff">
|
||||
%for x in revision.get_diff():
|
||||
${x|h}<br/>
|
||||
%endfor </td>
|
||||
<td>${revision.get_user()}
|
||||
<br/>
|
||||
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
|
||||
</td>
|
||||
</tr>
|
||||
%endif
|
||||
<% loopCount = 0 %>
|
||||
%for revision in wiki_history:
|
||||
%if revision.deleted < 2 or show_delete_revision:
|
||||
<% loopCount += 1 %>
|
||||
<tr style="border-top: 1px" class="${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}" >
|
||||
<td width="15px">
|
||||
<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}">
|
||||
${ revision }
|
||||
%if revision.previous_revision:
|
||||
%if not revision.counter == revision.previous_revision.counter + 1:
|
||||
<br/>(based on ${revision.previous_revision})
|
||||
%endif
|
||||
%endif
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td>
|
||||
<td class="diff">
|
||||
%for x in revision.get_diff():
|
||||
${x|h}<br/>
|
||||
%endfor </td>
|
||||
<td>${revision.get_user()}
|
||||
<br/>
|
||||
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
|
||||
</td>
|
||||
</tr>
|
||||
%endif
|
||||
%endfor
|
||||
</tbody>
|
||||
%if wiki_prev_page or wiki_next_page:
|
||||
@@ -72,17 +72,18 @@ ${ wiki_article.title }
|
||||
</tfoot>
|
||||
%endif
|
||||
</table>
|
||||
<input type="submit" name="view" value="View revision"/>
|
||||
<input type="submit" name="change" value="Change to revision"
|
||||
%if not wiki_write:
|
||||
disabled="true"
|
||||
%endif
|
||||
/>
|
||||
%if show_delete_revision:
|
||||
<input type="submit" name="delete" value="Admin Delete revision"/>
|
||||
<input type="submit" name="restore" value="Admin Restore revision"/>
|
||||
<input type="submit" name="delete_all" value="Admin Delete all revisions">
|
||||
<input type="submit" name="lock_article" value="${'Lock Article' if not wiki_article.locked else 'Unlock Article'}">
|
||||
%endif
|
||||
<div class="history-controls"><input type="submit" name="view" value="View revision"/>
|
||||
<input type="submit" name="change" value="Change to revision"
|
||||
%if not wiki_write:
|
||||
disabled="true"
|
||||
%endif
|
||||
/>
|
||||
%if show_delete_revision:
|
||||
<input type="submit" name="delete" value="Delete revision"/>
|
||||
<input type="submit" name="restore" value="Restore revision"/>
|
||||
<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'}">
|
||||
%endif
|
||||
</div>
|
||||
</form>
|
||||
</%block>
|
||||
|
||||
@@ -5,24 +5,26 @@
|
||||
<%block name="title"><title>Search Results - MITx 6.002 Wiki</title></%block>
|
||||
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.core.urlresolvers import reverse
|
||||
%>
|
||||
|
||||
<%block name="wiki_page_title">
|
||||
%if wiki_search_query:
|
||||
Search results for ${wiki_search_query | h}
|
||||
Search results for ${wiki_search_query | h}
|
||||
%else:
|
||||
Displaying all articles
|
||||
Displaying all articles
|
||||
%endif
|
||||
</%block>
|
||||
|
||||
<%block name="wiki_body">
|
||||
%for article in wiki_search_results:
|
||||
<% article_deleted = not article.current_revision.deleted == 0 %>
|
||||
<a href="${reverse("wiki_view", args=[article.get_url()])}">${article.get_url()} ${'(Deleted)' if article_deleted else ''}</a><br/>
|
||||
%endfor
|
||||
|
||||
%if not wiki_search_results:
|
||||
No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>!
|
||||
%endif
|
||||
<ul class="article-list">
|
||||
%for article in wiki_search_results:
|
||||
<% article_deleted = not article.current_revision.deleted == 0 %>
|
||||
<li><h3><a href="${reverse("wiki_view", args=[article.get_url()])}">${article.title} ${'(Deleted)' if article_deleted else ''}</a></h3></li>
|
||||
%endfor
|
||||
|
||||
%if not wiki_search_results:
|
||||
No articles matching <b>${wiki_search_query if wiki_search_query is not UNDEFINED else ""} </b>!
|
||||
%endif
|
||||
</ul>
|
||||
</%block>
|
||||
|
||||
@@ -69,14 +69,6 @@
|
||||
$(this).text((link_text == 'on') ? 'off' : 'on');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('.speeds ol').hide();
|
||||
|
||||
$('.speeds h3 a').click(function() {
|
||||
$('.speeds ol').toggle();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
|
||||
Reference in New Issue
Block a user