Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/websdk/hatta/templates
diff options
context:
space:
mode:
authorSebastian Silva <sebastian@sugarlabs.org>2011-12-09 00:20:29 (GMT)
committer Sebastian Silva <sebastian@sugarlabs.org>2011-12-09 00:20:29 (GMT)
commit6968dc34e9e6b00b08d312385011bbaac68c5a49 (patch)
tree76c1e1928baa4bc7ec1db709431897a667960334 /websdk/hatta/templates
parent39e7a3959f9bc95bc191ea1ac1ea06db63bf592a (diff)
Moved to devel version of Hatta. Implemented shutdown.HEADmaster
Diffstat (limited to 'websdk/hatta/templates')
-rw-r--r--websdk/hatta/templates/backlinks.html18
-rw-r--r--websdk/hatta/templates/base.html59
-rw-r--r--websdk/hatta/templates/changes.html16
-rw-r--r--websdk/hatta/templates/edit_file.html25
-rw-r--r--websdk/hatta/templates/edit_text.html29
-rw-r--r--websdk/hatta/templates/history.html27
-rw-r--r--websdk/hatta/templates/layout.html19
-rw-r--r--websdk/hatta/templates/list.html10
-rw-r--r--websdk/hatta/templates/page.html15
-rw-r--r--websdk/hatta/templates/page_special.html13
-rw-r--r--websdk/hatta/templates/wanted.html17
11 files changed, 248 insertions, 0 deletions
diff --git a/websdk/hatta/templates/backlinks.html b/websdk/hatta/templates/backlinks.html
new file mode 100644
index 0000000..d6fc56c
--- /dev/null
+++ b/websdk/hatta/templates/backlinks.html
@@ -0,0 +1,18 @@
+{% extends 'page.html' %}
+
+{% block meta %}<meta name="robots" content="NOINDEX, NOFOLLOW">{% endblock %}
+
+{% block page_title %}
+ <h1>{{ _("Links to %(title)s", title=title) }}</h1>
+{% endblock %}
+{% block title %}{{ _("Links to %(title)s", title=title) }} - {{ wiki.site_name }}{% endblock %}
+
+{% block content %}
+ <p>{{ _("Pages that contain a link to %(link)s.",
+ link=page.wiki_link(title)|safe)}}</p>
+ <ul class="backlinks">
+ {% for page_title in pages %}
+ <li>{{ page.wiki_link(page_title)|safe }}</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/websdk/hatta/templates/base.html b/websdk/hatta/templates/base.html
new file mode 100644
index 0000000..c5525d3
--- /dev/null
+++ b/websdk/hatta/templates/base.html
@@ -0,0 +1,59 @@
+{% extends 'layout.html' %}
+
+{% block title %}
+ {{ special_tile or title }} - {{ wiki.site_name }}
+{% endblock %}
+
+{% block links %}
+ <link rel="stylesheet" type="text/css"
+ href="{{ url(None, wiki.style_css) }}">
+ <link rel="stylesheet" type="text/css"
+ href="{{ url(None, wiki.pygments_css) }}">
+ <link rel="shortcut icon" type="image/x-icon"
+ href="{{ url(None, wiki.favicon_ico) }}">
+ <link rel="alternate" type="application/rss+xml"
+ title="{{ wiki.site_name }} (ATOM)"
+ href="{{ url(None, wiki.atom) }}">
+ {% if edit_url %}
+ <link rel="alternate" type="application/wiki"
+ href="{{ edit_url }}">
+ {% endif %}
+{% endblock %}
+
+{% block scripts %}
+ <script type="text/javascript"
+ src="{{ url(None, wiki.scripts_js) }}"></script>
+{% endblock %}
+
+{% block logo %}
+ {% if wiki.logo_page in page.storage %}
+ <a id="hatta-logo"
+ href="{{ url(wiki.front_page) }}"><img
+ src="{{ download_url(wiki.logo_page) }}"
+ alt="[{{ wiki.logo_page }}]"
+ ></a>
+ {% endif %}
+{% endblock %}
+
+{% block search %}
+ <form action="{{ url(None, wiki.search) }}" id="hatta-search" method="GET"
+ ><div><input
+ id="hatta-search" name="q"><input
+ class="button" type="submit" value="Search"
+ ></div></form>
+{% endblock %}
+
+{% block menu %}
+ <div id="hatta-menu">
+ {% for part in page.menu() %}
+ {{ part|safe }}
+ {% endfor %}
+ </div>
+{% endblock %}
+
+{% block page_title %}
+ <h1>{{ special_title or title }}</h1>
+{% endblock %}
+
+{% block content %}{% for part in content %}{{ part|safe }}{% endfor %}{% endblock %}
+
diff --git a/websdk/hatta/templates/changes.html b/websdk/hatta/templates/changes.html
new file mode 100644
index 0000000..04bb4e3
--- /dev/null
+++ b/websdk/hatta/templates/changes.html
@@ -0,0 +1,16 @@
+{% extends "page_special.html" %}
+
+{% block page_title %}<h1>{{ _("Recent changes") }}</h1>{% endblock %}
+{% block title %}{{ _("Recent changes") }} - {{ wiki.site_name }}{% endblock %}
+
+{% block content %}
+ <ul class="changes">
+ {% for date, date_url, title, author, comment in changes %}
+ <li><a href="{{ date_url }}">{{ date_html(date)|safe }}</a>
+ <b>{{ page.wiki_link(title)|safe }}</b> . . . .
+ <i>{{ page.wiki_link("~%s" % author, author)|safe }}</i>
+ <div class="comment">{{ comment }}</div>
+ </li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/websdk/hatta/templates/edit_file.html b/websdk/hatta/templates/edit_file.html
new file mode 100644
index 0000000..6d67790
--- /dev/null
+++ b/websdk/hatta/templates/edit_file.html
@@ -0,0 +1,25 @@
+{% extends "page.html" %}
+
+{% block page_title %}<h1>{{ _("Editing \"%(title)s\"",
+ title=title) }}</h1>{% endblock %}
+{% block title %}{{ _("Editing \"%(title)s\"", title=title) }}{% endblock %}
+
+{% block content %}
+ <p>{{ _("This is a binary file, it can't be edited on a wiki. "
+ "Please upload a new version instead.") }}</p>
+ <form action="" method="POST" class="editor"
+ enctype="multipart/form-data"><div>
+ <div class="upload"><input type="file" name="data"></div>
+ <label class="comment">{{ _("Comment") }} <input
+ name="comment" value="{{ comment }}"></label>
+ <label class="comment">{{ _("Author") }} <input
+ name="author" value="{{ author }}"></label>
+ <div class="buttons">
+ <input type="submit" name="save" value="{{ _("Save") }}">
+ <input type="submit" name="cancel" value="{{ _("Cancel") }}">
+ </div>
+ <input type="hidden" name="parent" value="{{ parent }}">
+ </div></form>
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/websdk/hatta/templates/edit_text.html b/websdk/hatta/templates/edit_text.html
new file mode 100644
index 0000000..41b27b8
--- /dev/null
+++ b/websdk/hatta/templates/edit_text.html
@@ -0,0 +1,29 @@
+{% extends "page.html" %}
+
+{% block page_title %}<h1>{{ _("Editing \"%(title)s\"", title=title) }}</h1>{% endblock %}
+{% block title %}{{ _("Editing \"%(title)s\"", title=title) }}{% endblock %}
+
+{% block content %}
+ <form action="" method="POST" class="editor"><div>
+ <textarea name="text" cols="80" rows="20" id="edtortext"
+ >{% for line in lines %}{{ line }}{% endfor %}</textarea>
+ <input type="hidden" name="parent" value="{{ parent }}">
+ <label class="comment">{{ _("Comment") }} <input
+ name="comment" value="{{ comment }}"></label>
+ <label class="comment">{{ _("Author") }} <input
+ name="author" value="{{ author }}"></label>
+ <div class="buttons">
+ <input type="submit" name="save" value="{{ _("Save") }}">
+ <input type="submit" name="preview" value="{{ _("Preview") }}">
+ <input type="submit" name="cancel" value="{{ _("Cancel") }}">
+ </div>
+ </div></form>
+ {% if preview %}
+ <h1 class="preview">{{ _("Preview, not saved") }}</h1>
+ <div id="hatta-preview">
+ {% for part in page.view_content(preview) %}{{ part|safe }}{% endfor %}
+ </div>
+ {% endif %}
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/websdk/hatta/templates/history.html b/websdk/hatta/templates/history.html
new file mode 100644
index 0000000..d2a4d48
--- /dev/null
+++ b/websdk/hatta/templates/history.html
@@ -0,0 +1,27 @@
+{% extends 'page.html' %}
+
+{% block meta %}<meta name="robots" content="NOINDEX, NOFOLLOW">{% endblock %}
+
+{% block page_title %}
+ <h1>{{ _("History of %(title)s", title=title) }}</h1>
+{% endblock %}
+{% block title %}{{ _("History of %(title)s", title=title) }} - {{ wiki.site_name }}{% endblock %}
+
+{% block content %}
+ <p>{{ _("History of changes for %(link)s.", link=page.wiki_link(title)|safe) }}</p>
+ <form action="{{ url(title, wiki.undo, method='POST') }}" method="POST">
+ <ul id="hatta-history">
+ {% for date, date_url, rev, author, comment in history %}
+ <li><a href="{{ date_url }}"
+ >{{ date_html(date)|safe }}</a>
+ {% if edit_url %}
+ <input type="submit" name="{{ rev }}" value="{{ _('Undo') }}">
+ {% endif %}
+ . . . .
+ <i>{{ page.wiki_link('~%s' % author, author)|safe }}</i>
+ <div class="hatta-comment">{{ comment }}</div></li>
+ {% endfor %}
+ </ul>
+ <input type="hidden" name="parent" value="{{ parent_rev }}">
+ </form>
+{% endblock %}
diff --git a/websdk/hatta/templates/layout.html b/websdk/hatta/templates/layout.html
new file mode 100644
index 0000000..9754cdc
--- /dev/null
+++ b/websdk/hatta/templates/layout.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<meta http-equiv="content-type" content="text/html;charset=utf-8">
+<title>{% block title %}{% endblock %}</title>
+ {% block links %}{% endblock %}
+ {% block meta %}{% endblock %}
+</head><body><div id="hatta-header">
+ {% block logo %}{% endblock %}
+ {% block search %}{% endblock %}
+ {% block menu %}{% endblock %}
+ {% block page_title %}{% endblock %}
+</div><div id="hatta-content">
+ {% block content %}{% endblock %}
+<div id="hatta-footer">
+ {% block footer %}{% endblock %}
+</div></div>
+ {% block scripts %}{% endblock %}
+</body></html>
diff --git a/websdk/hatta/templates/list.html b/websdk/hatta/templates/list.html
new file mode 100644
index 0000000..f5aa8a1
--- /dev/null
+++ b/websdk/hatta/templates/list.html
@@ -0,0 +1,10 @@
+{% extends 'page_special.html' %}
+
+{% block content %}
+ <p>{{ message|format(link=link|safe) }}</p>
+ <ul class="{{ class_|d('pagelist') }}">
+ {% for page_title in pages %}
+ <li>{{ page.wiki_link(page_title)|safe }}</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/websdk/hatta/templates/page.html b/websdk/hatta/templates/page.html
new file mode 100644
index 0000000..9b42ba9
--- /dev/null
+++ b/websdk/hatta/templates/page.html
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+
+{% block page_title %}<h1>{{ title }}</h1>{% endblock %}
+{% block title %}{{ title }} - {{ wiki.site_name }}{% endblock %}
+
+{% block footer %}
+ {% if edit_url %}
+ <a href="{{ edit_url }}"
+ class="edit">{{ _('Edit') }}</a>
+ {% endif %}
+ <a href="{{ url(title, wiki.history) }}"
+ class="hatta-history">{{ _('History') }}</a>
+ <a href="{{ url(title, wiki.backlinks) }}"
+ class="hatta-backlinks">{{ _('Backlinks') }}</a>
+{% endblock %}
diff --git a/websdk/hatta/templates/page_special.html b/websdk/hatta/templates/page_special.html
new file mode 100644
index 0000000..e4315e8
--- /dev/null
+++ b/websdk/hatta/templates/page_special.html
@@ -0,0 +1,13 @@
+{% extends 'base.html' %}
+
+{% block meta %}<meta name="robots" content="NOINDEX, NOFOLLOW">{% endblock %}
+
+{% block page_title %}<h1>{{ special_title }}</h1>{% endblock %}
+{% block title %}{{ special_title }} - {{ wiki.site_name }}{% endblock %}
+
+{% block footer %}
+ <a href="{{ url(None, wiki.recent_changes) }}" class="changes">Changes</a>
+ <a href="{{ url(None, wiki.all_pages) }}" class="index">Index</a>
+ <a href="{{ url(None, wiki.orphaned) }}" class="orphaned">Orphaned</a>
+ <a href="{{ url(None, wiki.wanted) }}" class="wanted">Wanted</a>
+{% endblock %}
diff --git a/websdk/hatta/templates/wanted.html b/websdk/hatta/templates/wanted.html
new file mode 100644
index 0000000..dcc2a2b
--- /dev/null
+++ b/websdk/hatta/templates/wanted.html
@@ -0,0 +1,17 @@
+{% extends "page_special.html" %}
+
+{% block page_title %}{{ _("Wanted pages") }}{% endblock %}
+{% block title %}{{ _("Wanted pages") }}{% endblock %}
+
+{% block content %}
+ <p>{{ _("List of pages that are linked to, but don't exist yet.") }}</p>
+ <ul class="wanted">
+ {% for refs, page_title in pages %}
+ <li><b>{{ page.wiki_link(page_title)|safe }}</b>
+ <i>(<a href="{{ url(page_title, wiki.backlinks) }}"
+ class="backlinks"
+>{{ ngettext("%(num)d reference", "%(num)d references", refs) }}</a>)</i>
+ </li>
+ {% endfor %}
+ </ul>
+{% endblock %}