]> 91.132.146.200 Git - insipid.git/commitdiff
some small cleanups and working linkage to tags and category overview
authorBanana <banana@optimus.de>
Thu, 3 Oct 2019 15:45:25 +0000 (17:45 +0200)
committerBanana <banana@optimus.de>
Thu, 3 Oct 2019 15:45:25 +0000 (17:45 +0200)
webroot/lib/link.class.php
webroot/view/editcategories.php
webroot/view/edittags.php
webroot/view/home.php
webroot/view/linkinfo.php

index 8cecbf4397293d6a42e168f8b8752a8b70d9dc95..f3d24191a85bcca9d5ade3df63539d51aabe7ed4 100644 (file)
@@ -244,14 +244,14 @@ class Link {
 
                if(!empty($this->_data['hash'])) {
                        $queryStr = "SELECT
-                               DISTINCT(tag) as tag
+                               DISTINCT tag, tagId
                                FROM `".DB_PREFIX."_combined`
                                WHERE `hash` = '".$this->DB->real_escape_string($this->_data['hash'])."'";
                        $query = $this->DB->query($queryStr);
                        if(!empty($query) && $query->num_rows > 0) {
                                while($result = $query->fetch_assoc()) {
                                        if($result['tag'] !== NULL) {
-                                               $ret[$result['tag']] = $result['tag'];
+                                               $ret[$result['tagId']] = $result['tag'];
                                        }
                                }
 
@@ -270,13 +270,14 @@ class Link {
 
                if(!empty($this->_data['hash'])) {
                        $queryStr = "SELECT
-                               DISTINCT(category) FROM `".DB_PREFIX."_combined`
+                               DISTINCT category, categoryId
+                               FROM `".DB_PREFIX."_combined`
                                WHERE `hash` = '".$this->DB->real_escape_string($this->_data['hash'])."'";
                        $query = $this->DB->query($queryStr);
                        if(!empty($query) && $query->num_rows > 0) {
                        while($result = $query->fetch_assoc()) {
                                        if($result['category'] !== NULL) {
-                                               $ret[$result['category']] = $result['category'];
+                                               $ret[$result['categoryId']] = $result['category'];
                                        }
                                }
                        }
index d8dbca59065bf113b4be3198d4380dceabd2e92b..5289eea7af9e5311bbbe9dd575d49cd550c2984d 100644 (file)
@@ -48,6 +48,8 @@
                        <?php if(!empty($subHeadline)) { ?>
                        <h2 class="is-size-2"><?php echo $subHeadline; ?></h2>
                        <?php } ?>
+                       <h3><a href="index.php?p=overview&m=tag">
+                                       <i class="icon ion-md-return-left"></i></a></h3>
                </div>
        </div>
 
index 5c31193a40bf68fc965d94b0400b24e77042649a..864799c3c91a4e9c62bdedc7d1d983b962c9dae8 100644 (file)
@@ -48,6 +48,8 @@
                        <?php if(!empty($subHeadline)) { ?>
                        <h2 class="is-size-2"><?php echo $subHeadline; ?></h2>
                        <?php } ?>
+                       <h3><a href="index.php?p=overview&m=tag">
+                                       <i class="icon ion-md-return-left"></i></a></h3>
                </div>
        </div>
 
index 81bc0491e3e0e28b55eb0d8a043406919479b6f8..48e7776e9f390489b6292c63fd08b0f1f761e1a7 100644 (file)
                        <div class="content">
                                <h4><a href="index.php?p=overview&m=all">Last added</a></h4>
 <?php if(!empty($latestLinks)) { ?>
-                               <div class="field is-grouped is-grouped-multiline">
+                               <div class="tags">
 <?php foreach ($latestLinks as $ll) { ?>
-                                       <div class="control">
-                                               <div class="tags has-addons">
-                                               <a class="tag is-link" href="<?php echo $ll['link']; ?>" target="_blank"><?php echo $ll['title']; ?></a>
-                                               <a class="tag is-info">x</a>
-                                               </div>
-                                       </div>
+                                       <a class="tag is-link" href="<?php echo $ll['link']; ?>" target="_blank"><?php echo $ll['title']; ?></a>
 <?php } ?>
                                </div>
 <?php } ?>
index c728139ba97fc2d4ac758c2958d1157dcd5a7ec3..ad423bdd3bc061a97cfa6dad91be288dae1c7906 100644 (file)
                                <span class="icon">
                                        <i class="ion-md-create"></i>
                                </span>
-                               <span>edit</span>
+                               <span>Edit</span>
                        </a>
                </div>
        </div>