[vhffs-dev] [1334] Fixed "Report a bug" link.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1334
Author:   beuss
Date:     2009-02-07 08:28:42 +0100 (Sat, 07 Feb 2009)

Log Message:
-----------
Fixed "Report a bug" link. Theme and help/panel urls are now read from config file.

Modified Paths:
--------------
    branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Public.pm
    branches/vhffs-design/vhffs-public/templates/parts/header.tt


Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Public.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Public.pm	2009-02-06 19:47:48 UTC (rev 1333)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Public.pm	2009-02-07 07:28:42 UTC (rev 1334)
@@ -54,6 +54,7 @@
 
 sub render {
 	my ($self, $file, $vars) = @_;
+	my $conf = $self->{vhffs}->get_config;
 	
 	# TODO Should be in parent class when Template::Toolkit switch is over
 	my $create_vars = {
@@ -79,11 +80,14 @@
 	
 	
 	$vars = {} unless(defined $vars);
+	
 	#TODO Read theme from config file
-	$vars->{theme} = 'light-grey' unless(defined $vars->{theme});
+	$vars->{theme} = $conf->get_panel->{default_theme} unless(defined $vars->{theme});
 	$vars->{left} = 'parts/left-menu.tt' unless(defined $vars->{left});
 	$vars->{right} = 'parts/tags-cloud.tt' unless(defined $vars->{right});
 	$vars->{top} = 'parts/top-menu.tt' unless(defined $vars->{top});
+	$vars->{panel_url} = $conf->get_panel->{url};
+	$vars->{help_url} = $conf->get_panel->{url_help};
 	
 	# Handling ajax stuff
 	if($self->{is_ajax_request}) {
@@ -99,11 +103,7 @@
 	binmode STDOUT , ':utf8';	
 	
 	print CGI::header( -type=>'text/html', -charset=>'utf-8' );
-	
 
-	# TODO Only do a full layout process if we aren't in the ajax case
-	# To achieve this, add a filter AJAX_WRAPPER which includes the
-	# given file only if X-Requested-By isn't set
 	$template->process($file, $vars) 
 		|| die('Error while processing template: '.$template->error());
 	

Modified: branches/vhffs-design/vhffs-public/templates/parts/header.tt
===================================================================
--- branches/vhffs-design/vhffs-public/templates/parts/header.tt	2009-02-06 19:47:48 UTC (rev 1333)
+++ branches/vhffs-design/vhffs-public/templates/parts/header.tt	2009-02-07 07:28:42 UTC (rev 1334)
@@ -16,8 +16,8 @@
     <!-- Navigation Level 1 -->
 
     <div class="nav1">
-        <a href="#">[% 'Report a bug' | i18n %]</a>
-        <a href="#">[% 'Help' | i18n %]</a>
-                <a href="?page=login">[% 'Log in' | i18n %]</a>
+        <a href="http://bugs.vhffs.org/";>[% 'Report a bug' | i18n %]</a>
+        <a href="[% help_url %]">[% 'Help' | i18n %]</a>
+                <a href="[% panel_url %]">[% 'Log in' | i18n %]</a>
             </div>			
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/