flaschengeist/geruecht/templates/home.html

45 lines
1.3 KiB
HTML
Raw Normal View History

2019-01-13 19:07:46 +00:00
{% extends "layout.html" %}
{% block content %}
{% for user in users %}
<div class="geruecht">
<div class="g-item">
<p>{{ user.username }}</p>
</div>
<button class="g-item button" id="{{ user.id }}-2">
<p>+2 &euro;</p>
</button>
<div class="g-item button" id="{{ user.username }}-1">
<p>+1 &euro;</p>
</div>
<div class="g-item button" id="{{ user.username }}-050">
<p>+0,5 &euro;</p>
</div>
<div class="g-item button" id="{{ user.username }}-040">
<p>+0,4 &euro;</p>
</div>
<div class="g-item button" id="{{ user.username }}-020">
<p>+0,2 &euro;</p>
</div>
<div class="g-item button" id="{{ user.username }}-010">
<p>+0,1 &euro;</p>
</div>
<div class="g-item">
<p id="{{ user.id }}-sum">{{ user.sum }}</p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#{{ user.id }}-2").click(function(){
$("#{{ user.id }}-sum").text("Hello world!");
});
});
</script>
<!-- url: "{{ url_for('add', username=user.username, value=2) }}",
type: "POST",
success: function(resp){
$('div#{{ user.id }}-sum').text(resp.data);
} -->
{% endfor %}
{% endblock %}