Merge remote branch 'origin/feed-filter-language'
[shapado:shapado.git] / app / views / widgets / index.html.haml
1 -content_for :subtabs do
2   .navtitle
3     =t(".title")
4
5 %h2.title
6   =t(".description")
7
8 #manage_widgets
9   %ul.list#widgets
10     -@widgets.each do |widget|
11       %li
12         .widget_description
13           =widget.description # do not escape
14         .widget.block{:id => widget.name}
15           .controls
16             .action
17               = link_to t("scaffold.destroy"), widget_path(widget), :method => :delete, :confirm => t("scaffold.sure", :model => "widget")
18             -form_tag move_widget_path(widget), :class => "vote_box" do
19               = image_submit_tag("to_vote_up.png", :name=>"move_to", :value => "up")
20               = image_submit_tag("to_vote_down.png", :name=>"move_to", :value => "down")
21             .clear
22           .widget_content
23             = render :partial => widget.partial_name, :locals => {:widget => widget}
24         .clear
25
26 %h2.title
27   =t(".new_widget", :default => "Add new widget")
28
29 -form_tag widgets_path, :class => "form" do
30   .group
31     = select :widget, "_type", Widget.types.map {|w| [w.sub("Widget", "").titleize, w] }
32   .group.navform
33     =submit_tag t("scaffold.add"), :class => "button"