<%= content_for :javascript do %> $("#space_filter").show(); $("input#spaces_all").click(function(){ $(".other").show(); }); $("input#spaces_my").click(function(){ $(".other").hide(); }); $("#space_name_filter").keyup(function(){ var filter_text = this.value.toLowerCase(); $("div.space_item").each(function() { if($(this).attr("name").toLowerCase().search(filter_text)>=0){ $(this).css("display","inline"); }else{ $(this).hide(); } }); }); var title = "<%=escape_javascript(t('search.space.dots'))%>"; $("#space_name_filter").click(function(){ if(this.value == title){ this.value=""; } }); $("#space_name_filter").blur(function(){ if(this.value == ""){ this.value= title; } }); $(".space_item").hover( function () { var route = "div#" + $(this).attr("name"); $("#space_description_at_index div").hide(); $(route).show(); }, function () { } ); /* $(".unautorized form").submit(function(){ var route = $(this).attr("action"); $.post(route, {authenticity_token: "<%=form_authenticity_token()%>"}, function(data){ eval(data); } ); return false; }); */ $(".unautorized a").fancybox({ 'hideOnContentClick' : false }); <%if params[:space_id]=="my"%> $("input#spaces_my").click(); <%end%> <%if params[:filter]%> $("#space_name_filter").keyup(); <%end%> <% end %> <%= content_for :search do %> <%= render :partial => 'search/form' %> <% end %> <%= content_for :sidebar do %> <% if logged_in? %>
<%= link_to ("" + t('space.create_own') + "").html_safe, new_space_path, :class => "new_space_link big_button orange_button"%>
<% else %>

<%= t('getting_started') %>

<%= link_to ("" + t('register.one') + "").html_safe, signup_path(), :class => "register_link big_button orange_button"%>
<% end %>

<%= t('space.index.select_at_left') %>

<% for space in @spaces %> <%end%>
<% end %> <% @page_title = "Spaces"-%> <%if logged_in? && current_user.spaces.any?%> <% @user_spaces = current_user.spaces%> <%else%> <%@user_spaces = []%> <%end%>

<%= t('space.public.other') %>

<% for space in @public_spaces %>
<%= link_logo(space, :size => 'h64', :title => sanitize(space.name)).html_safe %>
<% end %>

<%= t('space.private') %>

<% for space in @private_spaces %>
" name="<%=space.permalink%>"> <%= link_logo(space, :size=> 'h64', :title => sanitize(space.name)).html_safe %>
<% end %>