Commit 37d1ed27 by Reda Lemeden

Added Wiki navigation icons and styled the article list view

parent e6716591
...@@ -106,7 +106,7 @@ div.question-header { ...@@ -106,7 +106,7 @@ div.question-header {
div.post-update-container { div.post-update-container {
display: inline-block; display: inline-block;
float: left; float: left;
width: flex-grid(1.8,8); width: 20%;
border-left: 1px dashed #ddd; border-left: 1px dashed #ddd;
div.post-update-info { div.post-update-info {
......
...@@ -35,7 +35,6 @@ div.wiki-wrapper { ...@@ -35,7 +35,6 @@ div.wiki-wrapper {
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
@include border-radius(0); @include border-radius(0);
@include transition(); @include transition();
background: darken(#F6EFD4, 5%);
border: 0; border: 0;
border-left: 1px solid darken(#f6efd4, 20%); border-left: 1px solid darken(#f6efd4, 20%);
color: darken(#F6EFD4, 80%); color: darken(#F6EFD4, 80%);
...@@ -45,10 +44,24 @@ div.wiki-wrapper { ...@@ -45,10 +44,24 @@ div.wiki-wrapper {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
padding: 14px; padding: 14px;
padding-left: 38px;
margin: 0; 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 { &:hover {
background: none; background-color: #F6EFD4;
} }
} }
} }
...@@ -66,6 +79,20 @@ div.wiki-wrapper { ...@@ -66,6 +79,20 @@ div.wiki-wrapper {
line-height: 1.6em; 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 { #wiki_history_table {
tr.dark { tr.dark {
background-color: $light-gray; background-color: $light-gray;
......
...@@ -149,15 +149,15 @@ ...@@ -149,15 +149,15 @@
<ul> <ul>
<li> <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>
<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>
<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> </li>
</ul> </ul>
%endif %endif
......
...@@ -5,24 +5,26 @@ ...@@ -5,24 +5,26 @@
<%block name="title"><title>Search Results - MITx 6.002 Wiki</title></%block> <%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"> <%block name="wiki_page_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
</%block> </%block>
<%block name="wiki_body"> <%block name="wiki_body">
%for article in wiki_search_results: <ul class="article-list">
<% article_deleted = not article.current_revision.deleted == 0 %> %for article in wiki_search_results:
<a href="${reverse("wiki_view", args=[article.get_url()])}">${article.get_url()} ${'(Deleted)' if article_deleted else ''}</a><br/> <% article_deleted = not article.current_revision.deleted == 0 %>
%endfor <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: %if not wiki_search_results:
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>
</%block> </%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