Luke Plant avatar Luke Plant committed d6a3fac

Added djiki wiki to site

Comments (0)

Files changed (7)

cciw/cciwmain/static/css/djiki.css

+
+/* Djiki styles */
+.djiki {
+}
+	.djiki .actions {
+	}
+		.djiki .actions ul {
+			list-style-type: none;
+			margin: 0 10px 0 10px;
+			padding: 0;
+			float: right;
+		}
+			.djiki .actions ul li {
+				display: inline;
+				border-left: 1px solid lightGray;
+				border-top: 1px solid lightGray;
+				border-right: 1px solid lightGray;
+			}
+				.djiki .actions ul li a {
+					padding: 3px 10px;
+				}
+	.djiki .page {
+		border: 1px solid lightGray;
+	}
+		.djiki .page .content {
+			margin: 10px;
+		}
+		.djiki .page .editForm fieldset {
+			margin: 0;
+			padding: 0;
+		}
+			.djiki .page .editForm fieldset .label {
+				text-align: left;
+			}
+				.djiki .page .editForm fieldset .label label {
+					font-weight: bold;
+				}
+			.djiki .page .editForm fieldset .field input,
+			.djiki .page .editForm fieldset .field textarea {
+				width: 840px;
+			}
+			.djiki .page .editForm fieldset .field textarea {
+				min-height: 360px;
+			}
+			.djiki .page .editForm .buttons {
+				padding: 10px 0;
+			}
+				.djiki .page .editForm .buttons button.save {
+					font-weight: bold;
+				}
+
+.djiki #messages ul {
+	list-style-type: none;
+	margin: 0 0 10px 0;
+	padding: 0 15px;
+}
+	.djiki #messages ul li {
+		border-width: 1px 1px 1px 5px;
+		border-style: solid;
+		border-color: #8f8;
+		background-color: #efe;
+		margin: 3px 0;
+		padding: 5px 10px;
+	}
+		.djiki #messages ul li.warning {
+			background-color: #fee;
+			border-color: #f88;
+		}
+
+.djiki .help_text {
+	font-size: 75%;
+	color: #444;
+}
+
+/* styles for history screen */
+.djiki .page.history .content table {
+	border-collapse: collapse;
+}
+	.djiki .page.history .content table tr {
+	}
+		.djiki .page.history .content table th, .djiki .page.history .content table td {
+			padding: 1px 10px;
+			border: 1px solid #eee;
+		}
+
+.djiki .page.diff .content .diff {
+	padding: 10px 20px;
+	background-color: #eee;
+}
+	.djiki .page.diff .content .diff .added {
+		background-color: #8f8;
+	}
+	.djiki .page.diff .content .diff .removed {
+		background-color: #f88;
+	}
+
+/* styles used inside the page contents - might me moved to a separate file */
+.djiki .page .content .image {
+	border: 1px solid #e0e0e0;
+	background: #f0f0f0;
+	margin: 10px 0;
+	padding: 3px;
+	float: left;
+}
+.djiki .page .content .image.with_size,
+.djiki .page .content .image.external {
+	margin-right: 10px;
+}
+	.djiki .page .content .image .title {
+		margin: 5px 0;
+		padding: 0;
+		font-size: 80%;
+	}
     'mailer',
     'securedownload',
     'autocomplete',
+    'djiki',
 )
 
 if not (LIVEBOX and WEBSERVER_RUNNING):
 
 FILE_UPLOAD_MAX_MEMORY_SIZE = 262144
 
+#####  DJIKI  ######
+
+DJIKI_IMAGES_PATH = 'wiki/images/'
+
+####################
+
 ## CCIW SPECIFIC SETTINGS AND CONSTANTS
 AWARD_UPLOAD_PATH = 'images/awards'
 MEMBER_ICON_UPLOAD_PATH = 'images/members/temp'
     (r'^admin/', include(admin.site.urls)),
     (r'^officers/', include('cciw.officers.urls')),
     url('^autocomplete/(\w+)/$', autocomplete, name='autocomplete'),
+    (r'wiki/', include('djiki.urls')),
 
 )
 
 south==0.7.2
 xlwt==0.7.2
 xlrd==0.7.1
+creole>=1.2
 

templates/djiki/base.html

+{% extends 'cciw/officers/base.html' %}
+{% load static %}
+{% block title %}
+CCIW Officer wiki
+{% endblock %}
+{% block extrastyle %}{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{% static "css/djiki.css" %}" />
+{% endblock %}
+
+{% block userlinks %}<a href="/officers/">Officer homepage</a> / <a href="/wiki/Index">Wiki start</a>{% endblock %}
+{% block content %}
+<div class="djiki">
+	<div class="actions">
+		<div>
+		{% block djiki_actions %}{% endblock %}
+		</div>
+		<div class="clear"></div>
+	</div>
+	<div class="main">
+		{% block djiki_main %}{% endblock %}
+		<div class="clear"></div>
+	</div>
+</div>
+{% endblock %}

templates/djiki/image_view.html

+{% extends 'djiki/base_image.html' %}
+{% block djiki_main %}
+<div class="page content">
+	<div class="content">
+		<h1>{{ image.name }}</h1>
+		<a href="{{ image.last_revision.file.url }}"><img src="{{ image.last_revision.file.url }}" alt="{{ image.name }}" /></a>
+	</div>
+</div>
+{% endblock %}

templates/djiki/parser/image.html

+<div class="image{% if not image %} external{% endif %}">
+	{% if image %}
+	<a href="{% url djiki-image-view url_name %}">
+          <img src="{{ image.last_revision.file.url }}" alt="{{ title }}" />
+	</a>
+	{% else %}
+	<img src="{{ url }}" alt="{{ title }}" />
+	{% endif %}
+	{% if title %}
+	<p class="title">{{ title }}</p>
+	{% endif %}
+</div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.