45 lines
1.3 KiB
HTML
45 lines
1.3 KiB
HTML
{% 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 €</p>
|
|
</button>
|
|
<div class="g-item button" id="{{ user.username }}-1">
|
|
<p>+1 €</p>
|
|
</div>
|
|
<div class="g-item button" id="{{ user.username }}-050">
|
|
<p>+0,5 €</p>
|
|
</div>
|
|
<div class="g-item button" id="{{ user.username }}-040">
|
|
<p>+0,4 €</p>
|
|
</div>
|
|
<div class="g-item button" id="{{ user.username }}-020">
|
|
<p>+0,2 €</p>
|
|
</div>
|
|
<div class="g-item button" id="{{ user.username }}-010">
|
|
<p>+0,1 €</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 %}
|
|
|