Adding CSS to languajes filter at top
[shapado:jdanyluks-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
19     #container{:class => @current_class}
20
21       %nav.top-bar
22         %ul.group-list.sf-menu
23           -if !current_group.isolate
24             = render "groups/top_grouplist"
25           -if !logged_in?
26           - else
27             -if current_user.admin_of?(current_group)
28               = render "admin/manage/top_admin"
29             -if current_user.mod_of?(current_group)
30               = render "admin/moderate/top_moderate"
31
32         .searcher
33           = form_tag search_index_path, :method => :get, :id => "search" do
34             .field
35               = text_field_tag :q, params[:q]
36               
37         -if current_group.languages.count > 1
38           .languages_filter
39             %span
40               See questions in
41             - #i18n
42             = render "shared/language_filter"
43
44         -if !logged_in?
45           /=multiauth_menu("Sign In")
46           = multiauth_dropdown("Sign In")
47         -else
48           = render "users/top_user"
49
50       %section.left-panel
51         .brand
52           %h1
53             = link_to(group_logo_img(current_group, :class => "group_logo"), domain_url(:custom => current_group.domain))
54
55         //= render "shared/user-zone"
56         .widget-links.module
57           %nav
58             %ul
59               = tab_entry "li", t('layouts.application.all'), questions_path, :selected => "active"
60               -if logged_in?
61                 = tab_entry "li", t('layouts.application.followed'), feed_user_path(current_user), :selected => "active"
62                 = tab_entry "li", t('layouts.application.by_me'), by_me_user_path(current_user), :selected => "active"
63                 = tab_entry "li", t('layouts.application.preferred'), preferred_user_path(current_user), :selected => "active"
64                 = tab_entry "li", t('layouts.application.contributed'), contributed_user_path(current_user), :selected => "active"
65                 = tab_entry "li", t('layouts.application.collaborate'), expertise_user_path(current_user), :selected => "active"
66               %li
67                 = link_to t('layouts.application.faq')
68
69         .widget-links.module
70           %nav
71             %ul
72               %li
73                 = link_to t('layouts.application.random_question'), random_questions_path(:unanswered => true)
74               %li
75                 = link_to t('layouts.application.badges'), badges_path
76               %li
77                 = link_to t('layouts.application.pages'), pages_path
78
79         =#render "widgets/tag_cloud", :widget => TagCloudWidget.new
80
81         .widget-networks.module
82           %h3= t('layouts.application.follow_us_and_share')
83           %ul
84             %li
85               =link_to "Facebook", "#", :class => "facebook", :rel => "nofollow"
86             %li
87               =link_to "Twitter", "#", :class => "twitter", :rel => "nofollow"
88             %li
89               =link_to "Digg", "#", :class => "digg", :rel => "nofollow"
90             %li
91               =link_to "Delicious", "#", :class => "delicious", :rel => "nofollow"
92             %li
93               -feed_urls.each do |title, url|
94                 %a{:href => url}
95                   =image_tag "atom.png", :width => 20
96           .clear
97
98
99         -if AppConfig.enable_adbard && request.domain == AppConfig.domain
100           -widget = AdbardWidget.new(:settings => {'host_id' => AppConfig.adbard_host_id, 'site_key' => AppConfig.adbard_site_key})
101           .widget.block{:id => widget.name}
102             = render :partial => widget.partial_name, :locals => {:widget => widget}
103
104         = render "shared/widgets", :context => 'mainlist', :position => 'navbar'
105
106
107       %section.content-panel
108         - unless params[:controller] =~ /moderate\//
109           //= render "shared/action-tabs"
110           =render "shared/quick_question_box"
111         = render "shared/widgets", :context => 'mainlist', :position => 'header'
112
113         #main-content-wrap{:class => @active_tab}
114           - if params[:controller] =~ /moderate\//
115             = render "shared/moderate_navigation"
116           = yield
117           .clear
118
119       %section.right-panel
120         = yield :sidebar
121
122         .clear
123
124       = render "shared/widgets", :context => 'mainlist', :position => 'footer'
125
126       = render "shared/layout/footer"