Add 'map-mash/' from commit '7f16409d1257e7471fef35c18bcdf32856b908e3'
git-subtree-dir: map-mash git-subtree-mainline:eacc351b17
git-subtree-split:7f16409d12
This commit is contained in:
22
map-mash/app/views/mashes/new.html.haml
Normal file
22
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