# HG changeset patch # User Christophe Lincoln # Date 1487794683 -3600 # Node ID b4700d7f9d42d6d963c8ba503f9631b4d4c0f8c1 # Parent 49fa101e75f53a8cefc411b6a1407917ac414a64 Improve mybugs plugin diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/dashboard/dashboard.cgi --- a/web/plugins/dashboard/dashboard.cgi Wed Feb 22 20:51:46 2017 +0100 +++ b/web/plugins/dashboard/dashboard.cgi Wed Feb 22 21:18:03 2017 +0100 @@ -24,15 +24,15 @@ fi if check_auth; then cat << EOT -
- $DASHBOARD_TOOLS $ADMIN_TOOLS -

Dashboard

 Bugs count       : $(ls_bugs | wc -l)
 Messages count   : $(find $bugdir -name msg.* | wc -l)
 Database size    : $(du -sh $bugdir | awk '{print $1}')
 
+
+ $DASHBOARD_TOOLS $ADMIN_TOOLS +
EOT # Only for admins diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/dashboard/dashboard.conf --- a/web/plugins/dashboard/dashboard.conf Wed Feb 22 20:51:46 2017 +0100 +++ b/web/plugins/dashboard/dashboard.conf Wed Feb 22 21:18:03 2017 +0100 @@ -6,3 +6,4 @@ # Authenticated users PLUGINS_TOOLS="Dashboard ${PLUGINS_TOOLS}" +PROFILE_TOOLS="Dashboard ${PROFILE_TOOLS}" diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/mybugs/mybugs.cgi --- a/web/plugins/mybugs/mybugs.cgi Wed Feb 22 20:51:46 2017 +0100 +++ b/web/plugins/mybugs/mybugs.cgi Wed Feb 22 21:18:03 2017 +0100 @@ -12,7 +12,7 @@ echo "You must logged to view user bugs" html_footer && exit 0 fi - echo "

$(get_gravatar "$MAIL" 48) $USER

" + echo "

$(get_gravatar "$MAIL" 48) $NAME

" . $plugins/mybugs/user.sh html_footer && exit 0 fi diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/mybugs/mybugs.conf --- a/web/plugins/mybugs/mybugs.conf Wed Feb 22 20:51:46 2017 +0100 +++ b/web/plugins/mybugs/mybugs.conf Wed Feb 22 21:18:03 2017 +0100 @@ -4,12 +4,6 @@ SHORT_DESC="Show bugs for a user (also on profile page)" MAINTAINER="devel@slitaz.org" -# All users -BUGS_TOOLS="${BUGS_TOOLS} My bugs" - # Authenticated users -PLUGINS_TOOLS="${PLUGINS_TOOLS}" -DASHBOARD_TOOLS="${DASHBOARD_TOOLS}" - -# Admin only in Dashboard -ADMIN_TOOLS="${ADMIN_TOOLS}" +PLUGINS_TOOLS="${PLUGINS_TOOLS} My bugs" +DASHBOARD_TOOLS="${DASHBOARD_TOOLS} My bugs" diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/mybugs/user.sh --- a/web/plugins/mybugs/user.sh Wed Feb 22 20:51:46 2017 +0100 +++ b/web/plugins/mybugs/user.sh Wed Feb 22 21:18:03 2017 +0100 @@ -3,8 +3,9 @@ # This script display bug for a given user. A copy is used on SCN to # display user bugs on profile page with a custom config file to set # $bugdir. -# -[ -f "$plugins/mybugs/user.conf" ] && . $plugins/mybugs/user.conf +# +[ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf +[ "$(GET user)" ] && user="$(GET user)" echo "

My bugs

" echo "
"
diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/skel/skel.conf
--- a/web/plugins/skel/skel.conf	Wed Feb 22 20:51:46 2017 +0100
+++ b/web/plugins/skel/skel.conf	Wed Feb 22 21:18:03 2017 +0100
@@ -10,6 +10,7 @@
 # Authenticated users
 PLUGINS_TOOLS="${PLUGINS_TOOLS}"
 DASHBOARD_TOOLS="${DASHBOARD_TOOLS}"
+PROFILE_TOOLS="${PROFILE_TOOLS}"
 
 # Admin only in Dashboard
 ADMIN_TOOLS="${ADMIN_TOOLS}"
diff -r 49fa101e75f5 -r b4700d7f9d42 web/plugins/users/users.cgi
--- a/web/plugins/users/users.cgi	Wed Feb 22 20:51:46 2017 +0100
+++ b/web/plugins/users/users.cgi	Wed Feb 22 21:18:03 2017 +0100
@@ -15,7 +15,7 @@
 
- $PLUGINS_TOOLS + $PROFILE_TOOLS $(gettext "Modify profile")
EOT