diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-01-14 10:52:53 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-01-14 12:53:09 +0000 |
commit | c2bf5a90fc76eda220b35b510b7a200a43c858b1 (patch) | |
tree | bbe3b081cb062880049fce59e6b6a54c16830cf9 /app/views | |
parent | 9e9c5e4bf090e98ef16d7a54c46f16e87ce3e4ae (diff) |
Cleanup popup notices.
Move HTML to view from controller, use same elements for other country
popup and everypage - partly so they don't display on top of each other
anymore. Don't position them over existing content, position them at the
top of the page. Use consistent styling, and keep the javascript
unobtrusive.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/default.html.erb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 63e22b004..07e1bb808 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -67,15 +67,23 @@ <% if is_admin? %> <%= render :partial => 'admin_general/admin_navbar' %> <% end %> -<% popup_banner = render(:partial => "general/popup_banner").strip %> -<% if popup_banner.present? %> -<div id="everypage" class="jshide"> - <%= raw popup_banner %> - <p class="popup-close"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;"><%= _('Close') %></a></p> -</div> -<% end %> <div class="entirebody"> + <% popup_banner = render(:partial => "general/popup_banner").strip %> + <% if popup_banner.present? and ! @render_to_file %> + <div id="everypage" class="popup"> + <span class="popup-content"> + <%= raw popup_banner %> + </span> + <span class="popup-close"><a href="#top" ><%= _('Close') %></a></span> + </div> + <% end %> + + <div id="other-country-notice" class="popup"> + <span class="popup-content"> + </span> + <span class="popup-close"><a href="#top" ><%= _('Close') %></a></span> + </div> <div id="banner"> <div id="banner_inner"> <div class="lang"><%= render :partial => 'general/locale_switcher' %></div> @@ -132,7 +140,6 @@ <%= render :partial => 'general/footer' %> </div> -<div id="other-country-notice"></div> <div id="link_box"><span class="close-button">X</span> <%= _("Paste this link into emails, tweets, and anywhere else:") %> <br /> |