From 2321f0946f800b6bfee8297dbab84bc38f3de1c0 Mon Sep 17 00:00:00 2001 From: Garrett LeSage Date: Wed, 12 Jun 2013 12:29:03 +0200 Subject: [PATCH] show the create page link on empty search results for those with editing rights (#32 & #26) --- Strapping.skin.php | 6 ++++++ screen.css | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Strapping.skin.php b/Strapping.skin.php index b6c6deb..ec544e5 100644 --- a/Strapping.skin.php +++ b/Strapping.skin.php @@ -210,6 +210,12 @@ public function execute() { $userStateClass = "user-loggedout"; } ?> + data['loggedin']) { + $userStateClass += " editable"; + } else { + $userStateClass += " not-editable"; + } ?> +
diff --git a/screen.css b/screen.css index 05a7f28..5dc108f 100644 --- a/screen.css +++ b/screen.css @@ -278,7 +278,19 @@ input, button, select, textarea { } .mw-search-createlink { - /* Redundant, if there's a page with containing the name anyway */ + text-align: center; +} + +.mw-search-createlink b { + font-weight: normal; +} + +.mw-search-createlink a { +} + +.not-editable .mw-search-createlink { + /* If there are no permissions to edit pages, + * do not display the create link on a no-results search */ display: none; }