[vhffs-dev] [1044] Added dirty hack to display admin menu on object editing pages. |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1044
Author: beuss
Date: 2007-10-27 22:00:41 +0000 (Sat, 27 Oct 2007)
Log Message:
-----------
Added dirty hack to display admin menu on object editing pages.
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-panel/templates/admin/cvs/part.tmpl
trunk/vhffs-panel/templates/admin/dns/part.tmpl
trunk/vhffs-panel/templates/admin/git/part.tmpl
trunk/vhffs-panel/templates/admin/group/part.tmpl
trunk/vhffs-panel/templates/admin/mail/part.tmpl
trunk/vhffs-panel/templates/admin/mailinglist/part.tmpl
trunk/vhffs-panel/templates/admin/mysql/part.tmpl
trunk/vhffs-panel/templates/admin/pgsql/part.tmpl
trunk/vhffs-panel/templates/admin/repository/part.tmpl
trunk/vhffs-panel/templates/admin/svn/part.tmpl
trunk/vhffs-panel/templates/admin/user/part.tmpl
trunk/vhffs-panel/templates/admin/web/part.tmpl
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-10-27 22:00:41 UTC (rev 1044)
@@ -204,7 +204,7 @@
unless($user->is_admin) {
$panel->set_title( gettext('Access denied') );
$panel->add_error( gettext('You are not granted to access this page') );
- $panel->build;
+ $panel->build;
$panel->display;
exit 0;
}
@@ -435,6 +435,7 @@
my $templatedir = $panel->{templatedir};
my $groupname = $panel->{groupname};
my $vhffs = $panel->{vhffs};
+ my $cgi = $panel->{cgi};
my $menutemplate = new HTML::Template( filename => $templatedir.'/panel/menu/main.tmpl' );
$menutemplate->param( THEME => $theme );
@@ -459,7 +460,7 @@
$menutemplate->param( HELP_URL => $vhffs->get_config->get_panel->{'url_help'} || 'http://www.vhffs.org/' );
# Current project stuff (TODO stop handle it in session)
- if( ( CGI::url( -absolute => 1) =~ /^\/admin\// ) ) {
+ if( ( CGI::url( -absolute => 1) =~ /^\/admin\// ) || defined $cgi->param('admin_menu')) {
if( $user->is_admin ) {
$menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_admin_ctxmenu($vhffs->get_config) );
} elsif( $user->is_moderator ) {
Modified: trunk/vhffs-panel/templates/admin/cvs/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/cvs/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/cvs/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/cvs/prefs.pl?name=<TMPL_VAR NAME="CVSROOT">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/cvs/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="CVSROOT">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/dns/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/dns/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/dns/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/dns/prefs.pl?name=<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/dns/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/git/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/git/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/git/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/git/prefs.pl?name=<TMPL_VAR NAME="GITROOT">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/git/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="GITROOT">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/group/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/group/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/group/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/group/prefs.pl?project=<TMPL_VAR NAME="GROUPNAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/group/prefs.pl?admin_menu=1&project=<TMPL_VAR NAME="GROUPNAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/mail/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mail/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/mail/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/mail/prefs.pl?name=<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/mail/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/mailinglist/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mailinglist/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/mailinglist/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/mailinglist/prefs.pl?name=<TMPL_VAR NAME="LOCAL_PART">@<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/mailinglist/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="LOCAL_PART">@<TMPL_VAR NAME="DOMAIN">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/mysql/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mysql/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/mysql/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/mysql/prefs.pl?name=<TMPL_VAR NAME="DBNAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/mysql/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="DBNAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/pgsql/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/pgsql/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/pgsql/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/pgsql/prefs.pl?name=<TMPL_VAR NAME="DBNAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/pgsql/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="DBNAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/repository/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/repository/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/repository/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/repository/prefs.pl?name=<TMPL_VAR NAME="NAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/repository/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="NAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/svn/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/svn/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/svn/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/svn/prefs.pl?name=<TMPL_VAR NAME="SVNROOT">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/svn/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="SVNROOT">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/user/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/user/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/user/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/user/prefs.pl?name=<TMPL_VAR NAME="USERNAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/user/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="USERNAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>
Modified: trunk/vhffs-panel/templates/admin/web/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/web/part.tmpl 2007-10-27 21:04:47 UTC (rev 1043)
+++ trunk/vhffs-panel/templates/admin/web/part.tmpl 2007-10-27 22:00:41 UTC (rev 1044)
@@ -10,7 +10,7 @@
<TMPL_VAR NAME="STATE">
</td>
<td>
- <a href="/web/prefs.pl?name=<TMPL_VAR NAME="SERVERNAME">"><TMPL_VAR NAME="ACTION"></a>
+ <a href="/web/prefs.pl?admin_menu=1&name=<TMPL_VAR NAME="SERVERNAME">"><TMPL_VAR NAME="ACTION"></a>
</td>
</tr>
</TMPL_LOOP>