Subversion Repositories SmartDukaan

Rev

Rev 888 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 888 Rev 924
Line 367... Line 367...
367
		return htmlString;
367
		return htmlString;
368
	}
368
	}
369
 
369
 
370
 
370
 
371
 
371
 
372
	public String getHeaderHtml(boolean isLoggedIn, String  userName) {
372
	public String getHeaderHtml(boolean isLoggedIn, String  userName, String url) {
373
		VelocityContext context = new VelocityContext();
373
		VelocityContext context = new VelocityContext();
374
		if (isLoggedIn) {
374
		if (isLoggedIn) {
375
			context.put("LOGGED_IN", "TRUE");
375
			context.put("LOGGED_IN", "TRUE");
376
			context.put("WELCOME_MESSAGE", "Hi, " + userName);
376
			context.put("WELCOME_MESSAGE", "Hi, " + userName);
377
		} else {
377
		} else {
378
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
378
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
-
 
379
			context.put("REDIRECT_URL", url);
379
		}		
380
		}		
380
		
381
		
381
		String templateFile = "templates/header.vm";
382
		String templateFile = "templates/header.vm";
382
		
383
		
383
		return getHtmlFromVelocity(templateFile, context);
384
		return getHtmlFromVelocity(templateFile, context);