]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Display private only filter as search parameter
authorArthurHoaro <arthur@hoa.ro>
Wed, 8 Mar 2017 18:57:15 +0000 (19:57 +0100)
committerArthurHoaro <arthur@hoa.ro>
Wed, 8 Mar 2017 18:57:15 +0000 (19:57 +0100)
index.php
tpl/default/css/shaarli.css
tpl/default/linklist.html

index 77857d27d942affb0d2849b82ecce86573a5b936..064f43ca783f96537b8869697a1ab1beaa9bf7c8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1681,6 +1681,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
         'result_count' => count($linksToDisplay),
         'search_term' => $searchterm,
         'search_tags' => $searchtags,
+        'visibility' => ! empty($_SESSION['privateonly']) ? 'private' : '',
         'redirector' => $conf->get('redirector.url'),  // Optional redirector URL.
         'links' => $linkDisp,
         'tags' => $LINKSDB->allTags(),
index b937c596c20ba25173a7994f96cb319919e379b8..d33e906683a956a57e9b97a2b59b8104eb551770 100644 (file)
@@ -985,6 +985,10 @@ div.awesomplete > ul {
     margin: 0 0 0 5px;
 }
 
+.search-result .label-private {
+    border: 1px solid white;
+}
+
 /**
  * TOOLS
  */
index 9bc3ba1a3c51e28d55d6ec74f8447f3fa40e8a70..94370203bf2b2b8cf0fe014129569db4907b2008 100644 (file)
@@ -89,7 +89,7 @@
         <div id="searchcriteria">{'Nothing found.'|t}</div>
       </div>
     </div>
-  {elseif="!empty($search_term) or !empty($search_tags)"}
+  {elseif="!empty($search_term) or !empty($search_tags) or !empty($visibility)"}
     <div class="pure-g pure-alert pure-alert-success search-result">
       <div class="pure-u-2-24"></div>
       <div class="pure-u-20-24">
               </span>
           {/loop}
         {/if}
+        {if="!empty($visibility)"}
+          {'with status'|t}
+          <span class="label label-private">
+            {$visibility|t}
+          </span>
+        {/if}
       </div>
     </div>
   {/if}