these links are only available when the user is logged in
[shapado:shapado.git] / app / views / layouts / application.html.haml
1 !!! 5
2 %html{"xml:lang" => I18n.locale, :lang => I18n.locale, :xmlns => "http://www.w3.org/1999/xhtml" }
3   %head
4     %title
5       &= page_title
6     = render "shared/layout/css"
7
8     = raw(current_group.head_tag)
9     = render "shared/layout/meta"
10     <!--[if lt IE 8]><link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/ie7.css"><![endif]-->
11     = render "shared/layout/javascript"
12     <link type="text/css" rel="stylesheet" media="screen" href="http://jqueryui.com/themes/base/jquery.ui.tabs.css">
13
14     = csrf_meta_tag
15
16   %body
17     = render "shared/analytics"
18     #container{:class => @current_class}
19
20       %nav.top-bar
21         %ul.group-list.sf-menu
22           = render "groups/top_grouplist"
23           -if !logged_in?
24           - else
25             //-if current_user.mod_of?(current_group)
26             = render "admin/manage/top_admin"
27             = render "admin/moderate/top_moderate"
28
29         .searcher
30           = form_tag search_index_path, :method => :get, :id => "search" do
31             .field
32               = text_field_tag :q, params[:q]
33
34
35         -if !logged_in?
36           /=multiauth_menu("Sign In")
37           = multiauth_dropdown("Sign In")
38         -else
39           = render "users/top_user"
40
41       %section.left-panel
42         .brand
43           %h1
44             // Im comment this just to not see the app broken :) you can uncomment without problem
45             //-if current_group.has_logo?
46             //=link_to image_tag(logo_path(current_group), :class => "group_logo", :width => current_group.logo_info["width"], :height => current_group.logo_info["height"]), domain_url(:custom => current_group.domain)
47             //-else
48             = link_to image_tag("shapado-brand.png", :class => "group_logo"), domain_url(:custom => current_group.domain)
49
50         //= render "shared/user-zone"
51         .widget-links.module
52           %nav
53             %ul
54               -if logged_in?
55                 = tab_entry "li", "Followed", feed_user_path, :selected => "active"
56                 = tab_entry "li", "All", questions_path, :selected => "active"
57                 = tab_entry "li", "By Me", by_me_user_path(current_user), :selected => "active"
58                 = tab_entry "li", "Preferred", preferred_user_path(current_user), :selected => "active"
59                 = tab_entry "li", "Contributed", contributed_user_path(current_user), :selected => "active"
60                 = tab_entry "li", "Collaborate!", expertise_user_path(current_user), :selected => "active"
61               %li
62                 =link_to "FAQ"
63
64         = render :partial => "shared/language_filter"
65
66         .widget-links.module
67           %nav
68             %ul
69               %li
70                 = link_to "Random question", random_questions_path(:unanswered => true)
71               %li
72                 = link_to "Badges", badges_path
73               %li
74                 = link_to "Pages", pages_path
75
76         =render "widgets/tag_cloud", :widget => TagCloudWidget.new
77
78         .widget-networks.module
79           %h3  Siguenos y comparte:
80           %ul
81             %li
82               =link_to "Facebook", "#", :class => "facebook", :rel => "nofollow"
83             %li
84               =link_to "Twitter", "#", :class => "twitter", :rel => "nofollow"
85             %li
86               =link_to "Digg", "#", :class => "digg", :rel => "nofollow"
87             %li
88               =link_to "Delicious", "#", :class => "delicious", :rel => "nofollow"
89             %li
90               -feed_urls.each do |title, url|
91                 %a{:href => url}
92                   =image_tag "atom.png", :width => 20
93           .clear
94
95         .add
96           %h6 Publicidad
97           =link_to image_tag "http://www.bipbanners.co.uk/assets/images/WebConveyancing_Animated_SkyScraper_Banner_Sample_1A.gif"
98
99       %section.content-panel
100         - unless params[:controller] =~ /moderate\//
101           //= render "shared/action-tabs"
102           =render "shared/quick_question_box"
103
104         #main-content-wrap{:class => @active_tab}
105           - if params[:controller] =~ /moderate\//
106             = render "shared/moderate_navigation"
107           = yield
108           .clear
109
110       %section.right-panel
111
112         .add
113           %h6 Publicidad
114           =link_to image_tag "banner-250x250.jpg"
115
116         = yield :sidebar
117
118         = render "shared/ads/context_panel_ads"
119
120         .clear
121         = render "shared/ads/footer_ads"
122
123       = render "shared/layout/footer"