From a0364380a90faf014e90148c2a7d7f0dcc04cad6 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Thu, 9 Mar 2017 12:58:04 -0500 Subject: [PATCH] adding a "join the FSF" button at the top of pages --- mediagoblin_libreplanet/__init__.py | 7 ++++++- mediagoblin_libreplanet/templates/libreplanet/join.html | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 mediagoblin_libreplanet/templates/libreplanet/join.html diff --git a/mediagoblin_libreplanet/__init__.py b/mediagoblin_libreplanet/__init__.py index 2533be4..af39bdc 100644 --- a/mediagoblin_libreplanet/__init__.py +++ b/mediagoblin_libreplanet/__init__.py @@ -18,7 +18,7 @@ import logging import os from mediagoblin import mg_globals -from mediagoblin.tools.pluginapi import get_config, register_template_path, register_routes +from mediagoblin.tools.pluginapi import get_config, register_template_path, register_routes, register_template_hooks from mediagoblin.db.models import MediaEntry from mediagoblin.db.util import media_entries_for_tag_slug from mediagoblin.tools.pagination import Pagination @@ -109,3 +109,8 @@ hooks = { 'setup': setup_plugin, 'frontpage_view': frontpage_view_hook } + +register_template_hooks( + {'header_extra': "/mediagoblin/plugins/libreplanet/templates/libreplanet/join.html"} +) + diff --git a/mediagoblin_libreplanet/templates/libreplanet/join.html b/mediagoblin_libreplanet/templates/libreplanet/join.html new file mode 100644 index 0000000..88a631c --- /dev/null +++ b/mediagoblin_libreplanet/templates/libreplanet/join.html @@ -0,0 +1,5 @@ + + + Join now + +