fix rendering with html_safe and raw(),
[shapado:shapado.git] / app / views / welcome / index.html.haml
1 -content_for :head do
2   -if !current_group.default_tags.empty?
3     %meta{:name => "keywords", :content => current_group.default_tags.join(", ")}
4   %meta{:name => "description", :content => markdown(current_group.description).gsub(/<\/?[^>]*>/, "")[0, 255] }
5
6 -content_for :subtabs do
7   .navtitle
8     = t(".recent_questions", :default => "Recent Questions")
9     -if @questions
10       == (#{@questions.total_entries})
11
12   %ul{:style => "display: inline"}
13     %li.activity
14       = link_to t("questions.index.active"), root_path(:tab=>"activity"), :title => t("questions.index.active_tooltip"), :rel => "nofollow"
15     %li.hot
16       = link_to t("questions.index.hot"), root_path(:tab=>"hot"), :title => t("questions.index.hot_tooltip"), :rel => "nofollow"
17
18 %div
19   -if logged_in?
20     #quick_question
21       =render :partial => "quick_question_box"
22     %ul.items#related_questions
23       %li
24 %ul.items#questions
25   -if @questions.empty?
26     .box.highlight
27       %li
28         = t(".empty", :default => :"questions.index.empty")
29   -@questions.each do |question|
30     = render :partial => "questions/question", :object => question
31
32 #additional_info
33   #help_us
34     = t(".browse_all_or_by_tags", :full_list_of_questions => link_to(t('.full_list_of_questions'), questions_path), :browse_by_tags => link_to(t('.browse_by_tags'), tags_questions_path)).html_safe
35     %br
36     = t("questions.index.help_to_answer")
37     = link_to t("questions.index.unanswered_questions"), unanswered_questions_path
38
39   .clear
40
41 -content_for :sidebar do
42   .block.notice
43     = render :partial => "shared/layout/notice"
44
45   = render "shared/widgets", :context => 'welcome'
46
47   -if logged_in?
48     = render :partial => "shared/preferred_tags"
49   -if AppConfig.enable_i18n
50     = render :partial => "shared/language_filter"
51
52   -if !current_group.isolate && AppConfig.enable_groups
53     .block{:style => "background: transparent"}
54       .content
55         = link_to t(".create_own_site").html_safe, new_group_path, :id => "create_own_site"