Permalink
Browse files

Fixed headers; added mixpanel, GA, etc.

  • Loading branch information...
1 parent 6a0f84a commit 05d26f18ed59119899cdae1669b324b502110e6e @ChristopherThorpe committed Dec 1, 2011
Showing with 1,725 additions and 604 deletions.
  1. +11 −27 app.rb
  2. +46 −16 public/en/aboutus.html
  3. +46 −16 public/en/contact.html
  4. +46 −16 public/en/feedback.html
  5. +46 −15 public/en/find-an-attorney.html
  6. +45 −16 public/en/friends.html
  7. +2 −0 public/en/list.html
  8. +37 −5 public/en/mailsent.html
  9. +44 −15 public/en/notifydv.html
  10. +46 −16 public/en/onmyown.html
  11. +46 −16 public/en/privacy.html
  12. +45 −15 public/en/referral.html
  13. +46 −16 public/en/referralmade.html
  14. +46 −16 public/en/resources.html
  15. +46 −16 public/en/school.html
  16. +46 −16 public/en/sponsors.html
  17. +46 −16 public/en/terms.html
  18. +45 −15 public/en/visa-type-interview/my-family.html
  19. +45 −15 public/en/visa-type-interview/organization.html
  20. +45 −15 public/en/visa-type-interview/prominent.html
  21. +46 −16 public/en/visa-type-interview/spouse-or-fiance.html
  22. +46 −16 public/en/visa-type-interview/study.html
  23. +46 −16 public/en/visa-type-interview/visaforme.html
  24. +46 −16 public/en/visa-type-interview/whatnext.html
  25. +45 −15 public/en/visa-type-interview/workinus.html
  26. +45 −15 public/en/visa/adoption.html
  27. +45 −15 public/en/visa/citizenship.html
  28. +1 −1 public/en/visa/extraordinary.html
  29. +45 −15 public/en/visa/family.html
  30. +45 −15 public/en/visa/fiance.html
  31. +47 −17 public/en/visa/investor.html
  32. +45 −15 public/en/visa/journalist.html
  33. +45 −15 public/en/visa/organization.html
  34. +45 −15 public/en/visa/spouse-has-visa.html
  35. +45 −15 public/en/visa/spouse.html
  36. +45 −15 public/en/visa/student.html
  37. +45 −15 public/en/visa/visitor.html
  38. +45 −15 public/en/visa/work.html
  39. +45 −15 public/en/we-should-talk.html
  40. +38 −14 public/homepage.html
  41. +45 −15 public/index.html
View
@@ -25,7 +25,10 @@ def send_email(recipient, subject, body)
})
end
-def error_message(message)
+def error_message(message, locale="en")
+ raise 'locale not supported yet' unless locale.downcase.to_s == 'en'
+ header = "Something went wrong..."
+ goback = "Go back..."
return <<EOF
<html>
@@ -60,29 +63,6 @@ def error_message(message)
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
-
-<script language="javascript">
-function popUp(URL) {
- if (typeof popupId !== 'undefined') {
- eval("pagePopup" + popupId + ".close();");
- }
- popupId = (new Date()).getTime();
- eval("pagePopup" + popupId + " = window.open(URL, '" + popupId + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=550,left = 835,top = 400');");
-}
-
-function toggle(arg) {
- var ele = document.getElementById("toggleText" + arg);
- var text = document.getElementById("displayText");
- if(ele.style.display == "block") {
- ele.style.display = "none";
- text.innerHTML = "Learn more...";
- }
- else {
- ele.style.display = "block";
- text.innerHTML = "Hide this text:";
- }
-}
-</script>
</head>
<!-- END OF COMMON HEADERS -->
@@ -95,9 +75,9 @@ def error_message(message)
</tr>
</table>
<div class="pagewrap">
- <h1>Something went wrong...</h1>
+ <h1>#{header}</h1>
<p>#{message}</p>
- <p><a href="javascript:history.back()">Go back...</a></p>
+ <p><a href="javascript:history.back()">#{goback}</a></p>
</div>
</div>
</body>
@@ -136,8 +116,12 @@ def send_friend_email(sender, recipient)
redirect "/#{params[:locale]}/mailsent.html"
end
+get '/' do
+ redirect "/index.html"
+end
+
post '/friends' do
- return error_message("Please supply a valid email address for yourself and at least one friend") unless params[:email].present? && params[:email1].present?
+ return error_message("Please supply a valid email address for yourself and at least one friend.") unless params[:email].present? && params[:email1].present?
friend = (params[:name].present? ? params[:name] : params[:email])
send_friend_email(friend, params[:email1])
send_friend_email(friend, params[:email2]) if params[:email2].present?
@@ -2,7 +2,7 @@
<!-- START OF COMMON HEADERS -->
<head>
-<title>Which visa do I need? - CIS Visa</title>
+<title>About us - CIS Visa</title>
<!-- Meta Tags -->
<meta charset="utf-8">
@@ -54,46 +54,76 @@
}
}
</script>
+
+<script type="text/javascript">
+ document.write(unescape("%3Cscript src='" + ((document.location.protocol=="https:")?"https://snapabug.appspot.com":"http://www.snapengage.com") + "/snapabug.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">
+ SnapABug.setLocale("en");
+ SnapABug.addButton("41ba034c-2b1b-4240-bf97-2c38b6245b66","0","45%");
+</script>
+
+<!-- start Mixpanel before the end HEAD tag -->
+<script type="text/javascript">
+ var mpq=[];
+ mpq.push(["init","9937819a1e5a06ffe437594ff41aa4c7"]);
+ (function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push([f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links","track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script><!-- end Mixpanel -->
+
</head>
+<!-- END OF COMMON HEADERS -->
<body>
+
+<div id="fb-root"></div>
+<script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
<div id="container">
+ <div class="pagewrap">
+
+ <table width=100% cellspacing=5>
+ <tr><td>
+
<table cellspacing=10>
- <tr><td>
+ <tr><td>
<a href="/"><img src="/images/banner-narrow.png"></a>
- </td>
- <td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload"><img src="/images/icons/flags/gif/es.gif"></a><br>
+ </td>
+ <td align="center" valign=middle>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'><img src="/images/icons/flags/gif/es.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload">Castellano</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'>Castellano</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload"><img src="/images/icons/flags/gif/de.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'><img src="/images/icons/flags/gif/de.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload">Deutsch</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'>Deutsch</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload"><img src="/images/icons/flags/gif/gb.gif"></a><br>
+ <a href="#" onclick='return false;'><img src="/images/icons/flags/gif/gb.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload">English</a>
+ <a href="#" onclick='return false;'>English</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload"><img src="/images/icons/flags/gif/fr.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'><img src="/images/icons/flags/gif/fr.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload">Français</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'>Français</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload"><img src="/images/icons/flags/gif/ru.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'><img src="/images/icons/flags/gif/ru.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload">Русский</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'>Русский</a>
</font>
+ </td></tr>
+ </table>
+ <!-- END OF BANNER -->
- </td></tr></table>
-<!-- END OF COMMON HEADERS -->
<div class="pagewrap">
@@ -2,7 +2,7 @@
<!-- START OF COMMON HEADERS -->
<head>
-<title>Which visa do I need? - CIS Visa</title>
+<title>Contact us - CIS Visa</title>
<!-- Meta Tags -->
<meta charset="utf-8">
@@ -54,46 +54,76 @@
}
}
</script>
+
+<script type="text/javascript">
+ document.write(unescape("%3Cscript src='" + ((document.location.protocol=="https:")?"https://snapabug.appspot.com":"http://www.snapengage.com") + "/snapabug.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">
+ SnapABug.setLocale("en");
+ SnapABug.addButton("41ba034c-2b1b-4240-bf97-2c38b6245b66","0","45%");
+</script>
+
+<!-- start Mixpanel before the end HEAD tag -->
+<script type="text/javascript">
+ var mpq=[];
+ mpq.push(["init","9937819a1e5a06ffe437594ff41aa4c7"]);
+ (function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push([f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links","track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script><!-- end Mixpanel -->
+
</head>
+<!-- END OF COMMON HEADERS -->
<body>
+
+<div id="fb-root"></div>
+<script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
<div id="container">
+ <div class="pagewrap">
+
+ <table width=100% cellspacing=5>
+ <tr><td>
+
<table cellspacing=10>
- <tr><td>
+ <tr><td>
<a href="/"><img src="/images/banner-narrow.png"></a>
- </td>
- <td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload"><img src="/images/icons/flags/gif/es.gif"></a><br>
+ </td>
+ <td align="center" valign=middle>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'><img src="/images/icons/flags/gif/es.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload">Castellano</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'>Castellano</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload"><img src="/images/icons/flags/gif/de.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'><img src="/images/icons/flags/gif/de.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload">Deutsch</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'>Deutsch</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload"><img src="/images/icons/flags/gif/gb.gif"></a><br>
+ <a href="#" onclick='return false;'><img src="/images/icons/flags/gif/gb.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload">English</a>
+ <a href="#" onclick='return false;'>English</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload"><img src="/images/icons/flags/gif/fr.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'><img src="/images/icons/flags/gif/fr.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload">Français</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'>Français</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload"><img src="/images/icons/flags/gif/ru.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'><img src="/images/icons/flags/gif/ru.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload">Русский</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'>Русский</a>
</font>
+ </td></tr>
+ </table>
+ <!-- END OF BANNER -->
- </td></tr></table>
-<!-- END OF COMMON HEADERS -->
<div class="pagewrap">
<h3>Contact us</h3>
@@ -2,7 +2,7 @@
<!-- START OF COMMON HEADERS -->
<head>
-<title>Feedback - CIS Visa</title>
+<title>Contact - CIS Visa</title>
<!-- Meta Tags -->
<meta charset="utf-8">
@@ -54,47 +54,77 @@
}
}
</script>
+
+<script type="text/javascript">
+ document.write(unescape("%3Cscript src='" + ((document.location.protocol=="https:")?"https://snapabug.appspot.com":"http://www.snapengage.com") + "/snapabug.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">
+ SnapABug.setLocale("en");
+ SnapABug.addButton("41ba034c-2b1b-4240-bf97-2c38b6245b66","0","45%");
+</script>
+
+<!-- start Mixpanel before the end HEAD tag -->
+<script type="text/javascript">
+ var mpq=[];
+ mpq.push(["init","9937819a1e5a06ffe437594ff41aa4c7"]);
+ (function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push([f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links","track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script><!-- end Mixpanel -->
+
</head>
<!-- END OF COMMON HEADERS -->
<body>
+
+<div id="fb-root"></div>
+<script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
<div id="container">
+ <div class="pagewrap">
+
+ <table width=100% cellspacing=5>
+ <tr><td>
+
<table cellspacing=10>
- <tr><td>
+ <tr><td>
<a href="/"><img src="/images/banner-narrow.png"></a>
- </td>
-
- <td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload"><img src="/images/icons/flags/gif/es.gif"></a><br>
+ </td>
+ <td align="center" valign=middle>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'><img src="/images/icons/flags/gif/es.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=es&amp;step=reload">Castellano</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "es"}); alert("¡Disculpe! Todavía estamos trabajando en las páginas en castellano."); return false;'>Castellano</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload"><img src="/images/icons/flags/gif/de.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'><img src="/images/icons/flags/gif/de.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=de&amp;step=reload">Deutsch</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "de"}); alert("Leider arbeiten wir noch in der deutschen Fassung."); return false;'>Deutsch</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload"><img src="/images/icons/flags/gif/gb.gif"></a><br>
+ <a href="#" onclick='return false;'><img src="/images/icons/flags/gif/gb.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=en&amp;step=reload">English</a>
+ <a href="#" onclick='return false;'>English</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload"><img src="/images/icons/flags/gif/fr.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'><img src="/images/icons/flags/gif/fr.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=fr&amp;step=reload">Français</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "fr"}); alert("Veuillez nous en excuser. Nous travaillons encore sur la version française."); return false;'>Français</a>
</font>
</td><td align="center" valign=middle>
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload"><img src="/images/icons/flags/gif/ru.gif"></a><br>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'><img src="/images/icons/flags/gif/ru.gif"></a><br>
<font size="-2">
- <a href="/dv_interview/new_locale?locale=ru&amp;step=reload">Русский</a>
+ <a href="#" onclick='mpq.track("Locale", {"locale": "ru"}); alert("Мы все еще работаем над русская версия."); return false;'>Русский</a>
</font>
+ </td></tr>
+ </table>
+ <!-- END OF BANNER -->
+
- </td></tr></table>
<div class="pagewrap">
<p><font size="-1"><b><a href="/index.html">You</a> &laquo; Share feedback</b></font><p/>
Oops, something went wrong. Retry.

0 comments on commit 05d26f1

Please sign in to comment.