1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

[note] comments view and templates

This commit is contained in:
Pierre-antoine Comby
2020-08-18 14:27:04 +02:00
parent 448d379315
commit f324965f1a
5 changed files with 24 additions and 20 deletions

View File

@ -1,12 +1,14 @@
{# Select amount to transfert in € #}
<div class="input-group">
<input class="form-control mx-auto d-block" type="number" {% if not widget.attrs.negative %}min="0"{% endif %} step="0.01"
{% if widget.value != None and widget.value != "" %}value="{{ widget.value }}"{% endif %}
name="{{ widget.name }}"
{% for name, value in widget.attrs.items %}
{# Other attributes are loaded #}
{% for name, value in widget.attrs.items %}
{% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %}
{% endfor %}>
<div class="input-group-append">
<span class="input-group-text"></span>
</div>
<p id="amount-required" class="invalid-feedback"></p>
</div>
</div>

View File

@ -45,7 +45,7 @@
</div>
</div>
</div>
{# Summary of consumption and consume button #}
<div class="col-xl-5 d-none" id="consos_list_div">
<div class="card border-info shadow mb-4">
<div class="card-header">
@ -91,7 +91,6 @@
</div>
{# Regroup buttons under categories #}
{# {% regroup transaction_templates by category as categories %} #}
<div class="card border-primary text-center shadow mb-4">
{# Tabs for button categories #}
@ -148,7 +147,7 @@
</div>
</div>
</div>
{# history of transaction #}
<div class="card shadow mb-4" id="history">
<div class="card-header">
<p class="card-text font-weight-bold">

View File

@ -6,7 +6,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% load i18n static django_tables2 perms %}
{% block content %}
{# bandeau transfert/crédit/débit/activité #}
<div class="row">
<div class="col-xl-12">
<div class="btn-group btn-group-toggle" style="width: 100%; padding: 0 0 2em 0" data-toggle="buttons">
@ -34,8 +34,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div>
</div>
</div>
<div class="row">
{# Preview note profile (picture, username and balance) #}
<div class="col-md-3" id="note_infos_div">
<div class="card border-success shadow mb-4">
<a id="profile_pic_link" href="#"><img src="/media/pic/default.png"
@ -45,7 +45,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div>
</div>
</div>
{# list of emitters #}
<div class="col-md-3" id="emitters_div">
<div class="card border-success shadow mb-4">
<div class="card-header">
@ -66,7 +66,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div>
</div>
</div>
{# list of receiver #}
<div class="col-md-3" id="dests_div">
<div class="card border-info shadow mb-4">
<div class="card-header">
@ -83,7 +83,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div>
</div>
</div>
{# Information on transaction (amount, reason, name,...) #}
<div class="col-md-3" id="external_div">
<div class="card border-warning shadow mb-4">
<div class="card-header">
@ -108,7 +108,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<p id="reason-required" class="invalid-feedback"></p>
</div>
</div>
{# in case of special transaction add identity information #}
<div class="d-none" id="special_transaction_div">
<div class="form-row">
<div class="col-md-12">
@ -149,7 +149,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div>
</div>
</div>
{# transaction history #}
<div class="card shadow mb-4" id="history">
<div class="card-header">
<p class="card-text font-weight-bold">

View File

@ -5,6 +5,7 @@
{% block content %}
<div class="row justify-content-center mb-4">
<div class="col-md-10 text-center">
{# Search field , see js #}
<input class="form-control mx-auto w-25" type="text" id="search_field" placeholder="{% trans "Name of the button..." %}" value="{{ request.GET.search }}">
<hr>
<a class="btn btn-primary text-center my-1" href="{% url 'note:template_create' %}" data-turbolinks="false">{% trans "New button" %}</a>