Merge branch 'master' into next
[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           = render :partial => "#{widget.partial_name}_settings", :locals => {:widget => widget}
15         .widget.block{:id => widget.name}
16           .controls
17             .action
18               = link_to t("scaffold.destroy"), widget_path(widget), :method => :delete, :confirm => t("scaffold.sure", :model => "widget")
19             -form_tag move_widget_path(widget), :class => "vote_box" do
20               = image_submit_tag("to_vote_up.png", :name=>"move_to", :value => "up")
21               = image_submit_tag("to_vote_down.png", :name=>"move_to", :value => "down")
22             .clear
23           .widget_content
24             = render :partial => widget.partial_name, :locals => {:widget => widget}
25         .clear
26
27 %h2.title
28   =t(".new_widget", :default => "Add new widget")
29
30 -form_tag widgets_path, :class => "form" do
31   .group
32     = select :widget, "_type", Widget.types.map {|w| [w.sub("Widget", "").titleize, w] }
33   .group.navform
34     =submit_tag t("scaffold.add"), :class => "button"