diff options
| author | Jocelyn Delalande <jocelyn@crapouillou.net> | 2017-02-04 00:29:10 +0100 |
|---|---|---|
| committer | Jocelyn Delalande <jocelyn@crapouillou.net> | 2017-02-04 00:41:28 +0100 |
| commit | fe39258630e55d4a3e1297a01a1c8fd39bad3a4e (patch) | |
| tree | 0bc8de21222aa1bb06668238104572db155daa05 | |
| parent | a47d91fab96653c8cc3caa28c01fdd3ae3baae32 (diff) | |
| download | ihatemoney-mirror-fe39258630e55d4a3e1297a01a1c8fd39bad3a4e.zip ihatemoney-mirror-fe39258630e55d4a3e1297a01a1c8fd39bad3a4e.tar.gz ihatemoney-mirror-fe39258630e55d4a3e1297a01a1c8fd39bad3a4e.tar.bz2 | |
Adapt list bills view to bootstrap 4
- modal classes and hierarchy changed since BS2
- striped tables are now handled by css3 pseudo-class rather than classes
- fix placement/alignment for the button and comment above the table
| -rw-r--r-- | budget/static/css/main.css | 5 | ||||
| -rw-r--r-- | budget/templates/list_bills.html | 22 |
2 files changed, 18 insertions, 9 deletions
diff --git a/budget/static/css/main.css b/budget/static/css/main.css index 8d73e70..eded897 100644 --- a/budget/static/css/main.css +++ b/budget/static/css/main.css @@ -121,6 +121,11 @@ footer{ float: right; } +#new-bill, .identifier { + margin-top: 16px; + margin-bottom: 16px; +} + .password-reminder{ float: right; margin-right: 20px; diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index 69a1692..1eb5356 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -87,22 +87,26 @@ <div class="identifier">{{ _("The project identifier is") }} <a href="{{ url_for(".list_bills") }}">{{ g.project.id }}</a>, {{ _("remember it!") }}</div> <a id="new-bill" href="{{ url_for(".add_bill") }}" class="btn btn-primary" data-toggle="modal" data-target="#bill-form">{{ _("Add a new bill") }}</a> - <div id="bill-form" class="modal hide"> - <div class="modal-header"> - <a href="#" class="close" data-dismiss="modal">×</a> - <h3>{{ _('Add a bill') }}</h3> + <div id="bill-form" class="modal fade show" role="dialog"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h3 class="modal-title">{{ _('Add a bill') }}</h3> + <a href="#" class="close" data-dismiss="modal">×</a> + </div> + <form action="{{ url_for(".add_bill") }}" method="post" class="modal-body container"> + {{ forms.add_bill(bill_form, title=False) }} + </form> + </div> </div> - <form action="{{ url_for(".add_bill") }}" method="post" class="modal-body form-horizontal"> - {{ forms.add_bill(bill_form, title=False) }} - </form> </div> {% if bills.count() > 0 %} - <table id="bill_table" class="table table-striped"> + <table id="bill_table" class="col table table-striped table-hover"> <thead><tr><th>{{ _("When?") }}</th><th>{{ _("Who paid?") }}</th><th>{{ _("For what?") }}</th><th>{{ _("For whom?") }}</th><th>{{ _("How much?") }}</th><th>{{ _("Actions") }}</th></tr></thead> <tbody> {% for bill in bills %} - <tr class="{{ loop.cycle("odd", "even") }}" owers={{bill.owers|join(',','id')}} payer={{bill.payer.id}}> + <tr owers={{bill.owers|join(',','id')}} payer={{bill.payer.id}}> <td>{{ bill.date }}</td> <td>{{ bill.payer }}</td> <td>{{ bill.what }}</td> |
