tazbug diff web/plugins/mybugs/user.sh @ rev 140

Add 'mybugs' plugin with user profile support
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 20:51:46 2017 +0100 (2017-02-22)
parents
children b4700d7f9d42
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/web/plugins/mybugs/user.sh	Wed Feb 22 20:51:46 2017 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# This script display bug for a given user. A copy is used on SCN to
     1.7 +# display user bugs on profile page with a custom config file to set
     1.8 +# $bugdir.
     1.9 +#
    1.10 +[ -f "$plugins/mybugs/user.conf" ] && . $plugins/mybugs/user.conf
    1.11 +
    1.12 +echo "<h3>My bugs</h3>"
    1.13 +echo "<pre>"
    1.14 +for bug in $(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')
    1.15 +do
    1.16 +	. ${bug}
    1.17 +	id=$(basename $(dirname $bug))
    1.18 +	cat << EOT
    1.19 +<img src='images/bug.png' alt='' /> \
    1.20 +Bug $id: <a href="?id=$id">$BUG</a> <span class="date">- $DATE</span>
    1.21 +EOT
    1.22 +done
    1.23 +echo "</pre>"