Subversion Repositories SmartDukaan

Rev

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

Rev 9155 Rev 11826
Line 171... Line 171...
171
		String templateFile = "templates/header.vm";
171
		String templateFile = "templates/header.vm";
172
		
172
		
173
		return getHtmlFromVelocity(templateFile, context);
173
		return getHtmlFromVelocity(templateFile, context);
174
	}
174
	}
175
	
175
	
-
 
176
	public String getHeaderHtml(boolean isLoggedIn, String email, int totalItems, String url, long catId, boolean displayBestDealsImg, boolean isPrivateDealUser)	{
-
 
177
		VelocityContext context = new VelocityContext();
-
 
178
		
-
 
179
		if (isLoggedIn)	{
-
 
180
			context.put("LOGGED_IN", "TRUE");
-
 
181
			context.put("WELCOME_MESSAGE", "Hi " + email.split("@")[0]);
-
 
182
			if(isPrivateDealUser) {
-
 
183
				context.put("PRIVATE_DEAL_USER", "TRUE");
-
 
184
			}
-
 
185
				
-
 
186
		} else	{
-
 
187
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
-
 
188
			context.put("REDIRECT_URL", url);
-
 
189
		}
-
 
190
		
-
 
191
		context.put("BEST_DEALS_BADGE", displayBestDealsImg);
-
 
192
		context.put("CAT_ID", catId);
-
 
193
		context.put("TOTAL_ITEMS", totalItems);
-
 
194
		String templateFile = "templates/header.vm";
-
 
195
		
-
 
196
		return getHtmlFromVelocity(templateFile, context);
-
 
197
	}
-
 
198
	
176
	public String getThinHeaderHtml(boolean isLoggedIn, String email, int totalItems, String url, long catId, boolean displayBestDealsImg) {
199
	public String getThinHeaderHtml(boolean isLoggedIn, String email, int totalItems, String url, long catId, boolean displayBestDealsImg) {
177
        VelocityContext context = new VelocityContext();
200
        VelocityContext context = new VelocityContext();
178
        
201
        
179
        if (isLoggedIn) {
202
        if (isLoggedIn) {
180
            context.put("LOGGED_IN", "TRUE");
203
            context.put("LOGGED_IN", "TRUE");