Fix messages locale display.

Add Google Ads.
This commit is contained in:
Paulo Gustavo Veiga 2012-08-31 00:46:46 -03:00
parent 9be46d6822
commit d1ce3540ed
3 changed files with 31 additions and 7 deletions

View File

@ -130,7 +130,12 @@ public class MindmapController {
@RequestMapping(value = "maps/")
public String showListPage(@NotNull Model model) {
final Locale locale = LocaleContextHolder.getLocale();
model.addAttribute("locale", locale.toString().toLowerCase());
// @Todo: This should be more flexible ...
String localeStr = locale.toString().toLowerCase();
if ("es".equals(locale.getLanguage()) || "pt".equals(locale.getLanguage())) {
localeStr = locale.getLanguage();
}
model.addAttribute("locale", localeStr);
return "mindmapList";
}

View File

@ -87,3 +87,8 @@ site.baseurl = http://localhost:8080
##################################################################################
google.analytics.enabled=false
google.analytics.account=UA-XXXX
##################################################################################
# Google Ads enable
##################################################################################
google.ads.enabled=false

View File

@ -113,8 +113,24 @@
$('#pPageBtn').click(function () {
$('#mindmapListTable_previous').click();
});
}); </script>
});
</script>
<c:if test="${requestScope['google.ads.enabled']}">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7564778578019285";
/* WiseMapping Mindmap List */
google_ad_slot = "4071968444";
google_ad_width = 120;
google_ad_height = 460;
//-->
</script>
<div style="position:absolute;right: 9px;top: 90px">
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</c:if>
</head>
<body>
<jsp:include page="header.jsp">
@ -123,7 +139,6 @@
</jsp:include>
<div style="min-height: 500px">
<div id="mindmapListContainer">
<div id="messagesPanel" class="alert alert-error alert-block fade in hide" style="margin-top: 10px">
<strong><spring:message code="UNEXPECTED_ERROR"/></strong>
@ -213,8 +228,7 @@
</div>
</div>
</div>
<div style="border: 1px solid #000000">
<div style="border-top: 1px solid #000000">
<jsp:include page="footer.jsp"/>
</div>