diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-05-28 12:03:56 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-05-28 12:03:56 +0200 |
| commit | 7231d6dd3b16d9454593ad75fdd26ea6b81fd449 (patch) | |
| tree | 99a0c0437376ef5e988647f057ca38b965f973eb /templates/index.html | |
| parent | 446163be0f346ce8a91d4201ec67e56cf31efa6f (diff) | |
| download | jokevote-7231d6dd3b16d9454593ad75fdd26ea6b81fd449.tar.gz jokevote-7231d6dd3b16d9454593ad75fdd26ea6b81fd449.zip | |
add report button
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/templates/index.html b/templates/index.html index 33a5126..ef7559d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,12 +16,19 @@ <div class="section row valign-wrapper"> <form class="col s2 row" action="vote" method="post"> <input type="hidden" name="id" value="{{ joke.id }}"> - <button class="btn col s12" type="submit" name="vote" value="upvote"><i class="material-icons">thumb_up</i> {{ joke.upvotes }}</button> - <button class="btn col s12" type="submit" name="vote" value="downvote"><i class="material-icons">thumb_down</i> {{ joke.downvotes }}</button> + <button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="upvote"><i class="material-icons">thumb_up</i> {{ joke.upvotes }}</button> + <button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="downvote"><i class="material-icons">thumb_down</i> {{ joke.downvotes }}</button> </form> - <div class="col s10 row"> - <p class="valign s12">{{ joke.text }}</p> + <div class="col s8 {% if joke.reports>0 %}grey-text{% endif %}"> + <p>{{ joke.text }}</p> </div> + <form class="col s2" action="report" method="post"> + <input type="hidden" name="id" value="{{ joke.id }}"> + <button class="btn-flat row" type="submit"> + <i class="material-icons col s6">report_problem</i> + <span class="red-text col s6">{% if joke.reports>0 %}{{ joke.reports }}{% endif %}</span> + </button> + </form> </div> <div class="divider"></div> {% endfor %} |
