Commit 37d1ed27 by Reda Lemeden

Added Wiki navigation icons and styled the article list view

parent e6716591
......@@ -106,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 {
......
......@@ -35,7 +35,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%);
......@@ -45,10 +44,24 @@ div.wiki-wrapper {
text-transform: uppercase;
letter-spacing: 1px;
padding: 14px;
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,6 +79,20 @@ div.wiki-wrapper {
line-height: 1.6em;
}
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;
}
}
}
#wiki_history_table {
tr.dark {
background-color: $light-gray;
......
......@@ -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
......
......@@ -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>
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