Re-namespacing a bit to clear out some fairly old stuff from the top level
This commit is contained in:
22
oldstuff/map-mash/app/views/mashes/new.html.haml
Normal file
22
oldstuff/map-mash/app/views/mashes/new.html.haml
Normal file
@@ -0,0 +1,22 @@
|
||||
- content_for :head_js do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('.mash-image').click(function(elem) {
|
||||
$('#mash_winner_id').val($(elem.target).attr('data-map-id'));
|
||||
$('form[id^="edit_mash_"]').submit();
|
||||
});
|
||||
});
|
||||
|
||||
%h1 Mash the Maps!
|
||||
%p Choose your fave.
|
||||
|
||||
- form_for(@mash) do |f|
|
||||
= f.error_messages
|
||||
|
||||
#maps
|
||||
#map_a.mash-image
|
||||
%image{:src => "#{url_for @mash.map_a}.png", :'data-map-id' => @mash.map_a.id}
|
||||
#map_b.mash-image
|
||||
%image{:src => "#{url_for @mash.map_b}.png", :'data-map-id' => @mash.map_b.id}
|
||||
|
||||
= f.hidden_field :winner_id, :value => '?'
|
Reference in New Issue
Block a user