Subversion Repositories SmartDukaan

Rev

Rev 3830 | Rev 4183 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3830 Rev 3903
Line 147... Line 147...
147
		return htmlString;
147
		return htmlString;
148
	}
148
	}
149
 
149
 
150
 
150
 
151
 
151
 
152
	public String getHeaderHtml(boolean isLoggedIn, String  userName, String url, long catId) {
152
	public String getHeaderHtml(boolean isLoggedIn, String  userName, String url, long catId, boolean displayBestDealsImg) {
153
		VelocityContext context = new VelocityContext();
153
		VelocityContext context = new VelocityContext();
154
		if (isLoggedIn) {
154
		if (isLoggedIn) {
155
			context.put("LOGGED_IN", "TRUE");
155
			context.put("LOGGED_IN", "TRUE");
156
			context.put("WELCOME_MESSAGE", "Hi, " + userName);
156
			context.put("WELCOME_MESSAGE", "Hi, " + userName);
157
		} else {
157
		} else {
158
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
158
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
159
			context.put("REDIRECT_URL", url);
159
			context.put("REDIRECT_URL", url);
160
		}		
160
		}		
161
		
161
		
-
 
162
		context.put("BEST_DEALS_BADGE", displayBestDealsImg);
162
		context.put("CAT_ID", catId);
163
		context.put("CAT_ID", catId);
163
		
164
		
164
		String templateFile = "templates/header.vm";
165
		String templateFile = "templates/header.vm";
165
		
166
		
166
		return getHtmlFromVelocity(templateFile, context);
167
		return getHtmlFromVelocity(templateFile, context);