Factored sidebar draggables into application.js
[lyrix.git] / app / views / layouts / application.haml
blobe6b494234d95d313332d9b167c65a758454062dc
1 !!!
2 %html
3   %head
4     %title Lyrix
5     = javascript_include_tag *%w(prototype effects dragdrop controls)
6     - %w(lowpro remote).each do |js|
7       = javascript_include_tag "lowpro/#{js}"
8     = javascript_include_tag 'application'
9     = stylesheet_link_tag 'application'
10   %body
11     #sidebar
12       %h1 Songs
13       %ul#side_songs_list
14         - all_songs.each do |s|
15           %li{:class => class_for_song(s), :id => dom_id(s)}
16             = image_tag('cd.png', :align => 'top', :border => 0, :class => 'drag_me')
17             = link_to s.title, edit_song_path(s)
18             /= draggable_element(dom_id(s), :revert => true, :handle => "'drag_me'")
19         %li#new_song
20           = image_tag('cd_add.png', :align => 'top')
21           = link_to 'Add a new song...', new_song_path
22       %h1 Shows
23       %ul#side_shows_list
24         - all_shows.each do |s|
25           %li{:class => class_for_show(s), :id => dom_id(s)}
26             = image_tag('film.png', :align => 'top', :border => 0)
27             = link_to s.title, edit_show_path(s)
28         %li#new_show
29           = image_tag('film_add.png', :align => 'top')
30           = link_to 'Add a new show...', new_show_path
31     #content
32       %p#success_box{:style => 'display:none'}
33         = image_tag('information.png')
34         %span#success
35       = yield