Permalink
Browse files

Toggle columns

  • Loading branch information...
moeffju committed May 17, 2011
1 parent de720c3 commit 33f2ac6163b094f7ed7ba40c4771c18c82788cc8
Showing with 30 additions and 9 deletions.
  1. +6 −0 app/stylesheets/screen.scss
  2. +21 −2 app/views/home/index.html.erb
  3. +3 −7 app/views/layouts/application.html.erb
@@ -139,6 +139,12 @@ body {
#participants {
clear: both;
@include column(8);
+ h3 {
+ a {
+ font-size: 14px;
+ padding-left: 16px;
+ }
+ }
}
#yes, #maybe {
@include column(8);
@@ -1,3 +1,22 @@
+<% content_for :javascripts do %>
+<script type="text/javascript">
+ $(function(){
+ $('#maybe').hide();
+ $('#maybe h3 a').click(function(){
+ $('#maybe').hide();
+ $('#yes').show();
+ e.preventDefault();
+ return false;
+ });
+ $('#yes h3 a').click(function(e){
+ $('#yes').hide();
+ $('#maybe').show();
+ e.preventDefault();
+ return false;
+ });
+ });
+</script>
+<% end %>
<div id="was">
<h2>Worum geht's?</h2>
<p>Wir machen eine Alternativveranstaltung zur next 11, in Hamburg. Wir nennen sie "<em>Hamburg<span>++</span></em>".</p>
@@ -48,15 +67,15 @@
<div id="participants">
<h2>Wer kommt noch?</h2>
<div class="ptc" id="yes">
- <h3>Auf jeden Fall<%- if @users.include?(:yes) %> (<%= @users[:yes].size %>)<% end %></h3>
+ <h3>Auf jeden Fall<%- if @users.include?(:yes) %> (<%= @users[:yes].size %>)<% end %> <a href="#maybe">Vielleicht<%- if @users.include?(:maybe) %> (<%= @users[:maybe].size %>)<% end %></a></h3>
<ul>
<%- @users[:yes].each do |user| %>
<li><%= render :partial => 'user', :locals => { :user => user } %></li>
<%- end %>
</ul>
</div>
<div class="ptc" id="maybe">
- <h3>Vielleicht<%- if @users.include?(:maybe) %> (<%= @users[:maybe].size %>)<% end %></h3>
+ <h3>Vielleicht<%- if @users.include?(:maybe) %> (<%= @users[:maybe].size %>)<% end %> <a href="#yes">Auf jeden Fall<%- if @users.include?(:yes) %> (<%= @users[:yes].size %>)<% end %></a></h3>
<ul>
<%- @users[:maybe].each do |user| %>
<li><%= render :partial => 'user', :locals => { :user => user } %></li>
@@ -3,11 +3,7 @@
<head>
<title><%- if @title %><%= @title %><% end %>Hamburg++ 2011</title>
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
- <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
- <!--[if IE]>
- <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
- <![endif]-->
- <% if is_admin? %><%= javascript_include_tag :all %><% end %>
+ <%= javascript_include_tag 'jquery.min', 'rails', 'application' %>
<script type="text/javascript">
var _gaq = _gaq || [];
@@ -20,9 +16,9 @@
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
+ })();
</script>
+ <%= content_for :javascripts %>
<%= csrf_meta_tag %>
</head>
<body class="<%= [params[:controller], params[:action]] * '-' %>">

0 comments on commit 33f2ac6

Please sign in to comment.