aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/templates/display-head.htm12
-rw-r--r--data/templates/help.htm49
2 files changed, 60 insertions, 1 deletions
diff --git a/data/templates/display-head.htm b/data/templates/display-head.htm
index 78c32a5..ba699bf 100644
--- a/data/templates/display-head.htm
+++ b/data/templates/display-head.htm
@@ -5,7 +5,17 @@
</div>
<div class="span2 pull-right">
<form method="post" action="{{repo.getLink('fork')}}">
- <button type="submit" class="btn pull-right"><i class="icon-share"></i> fork</button>
+ <div class="btn-group pull-right">
+ <button type="submit" class="btn"><i class="icon-share"></i> fork</button>
+ <button class="btn dropdown-toggle" data-toggle="dropdown">
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="{{repo.getLink('remotefork')}}"><i class="icon-share"></i> Fork to remote system</a></li>
+ <li class="divider"></li>
+ <li><a href="help#remote-forking"><i class="icon-question-sign"></i> Help on remote forking</a></li>
+ </ul>
+ </div>
</form>
</div>
</div>
diff --git a/data/templates/help.htm b/data/templates/help.htm
new file mode 100644
index 0000000..555a738
--- /dev/null
+++ b/data/templates/help.htm
@@ -0,0 +1,49 @@
+{% extends "base.htm" %}
+{% block title %}phorkie help{% endblock %}
+
+{% block content %}
+<h1>Help on phorkie</h1>
+
+<h2 id="remote-forking">Remote forking</h2>
+<script type="text/javascript">
+function registerHandler() {
+ navigator.registerProtocolHandler(
+ "web+fork",
+ "{{htmlhelper.fullUrl('fork-remote?remote_url=%s')}}",
+ "phorkie@"
+ + "{{htmlhelper.fullUrl()}}"
+ .replace(/https?:\/\//, '')
+ .replace(/\/$/, '')
+ );
+}
+</script>
+
+<div class="row-fluid">
+ <div class="span8">
+ <p>
+ Phorkie allows cloning/forking of pastes on other servers
+ - other phorkie instances, github gists or simply any remote
+ git repository.
+ </p>
+ <p>
+ You can go to <a href="fork-remote">fork-remote</a> and enter the
+ URL of the paste on the other server.
+ </p>
+ <p>
+ It's way easier to simply click a "fork" button that automatically
+ takes you to this phorkie's remote paste page, prefilled with
+ the correct git URL.
+ </p>
+ <p>
+ To make this work, click the register button on the right.
+ It will register a "protocol handler" for "web+fork:"-URLs,
+ making phorkie chime in whenever a <tt>web+fork</tt> URL is clicked.
+ </p>
+ </div>
+ <div class="span4">
+ <a href="#" onclick="registerHandler(); return false;" class="btn">
+ register web+fork protocol handler
+ </a>
+ </div>
+</div>
+{% endblock %}