Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
f3b44f31
Unverified
Commit
f3b44f31
authored
5 years ago
by
me5na7qbjqbrp
Browse files
Options
Downloads
Patches
Plain Diff
Bootstrap for conso page
parent
94ab2c81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!53
Base conso page
Pipeline
#7897
passed with stages
in 4 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/base.html
+0
-3
0 additions, 3 deletions
templates/base.html
templates/note/conso_form.html
+112
-58
112 additions, 58 deletions
templates/note/conso_form.html
with
112 additions
and
61 deletions
templates/base.html
+
0
−
3
View file @
f3b44f31
...
@@ -75,9 +75,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
...
@@ -75,9 +75,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<li
class=
"nav-item active"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"#"
><i
class=
"fa fa-calendar"
></i>
{% trans 'Activities' %}
</a>
<a
class=
"nav-link"
href=
"#"
><i
class=
"fa fa-calendar"
></i>
{% trans 'Activities' %}
</a>
</li>
</li>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"{% url 'note:template_list' %}"
><i
class=
"fa fa-coffee"
></i>
{% trans 'Button' %}
</a>
</li>
<li
class=
"nav-item active"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"{% url 'note:transfer' %}"
><i
class=
"fa fa-exchange"
></i>
{% trans 'Transfer' %}
</a>
<a
class=
"nav-link"
href=
"{% url 'note:transfer' %}"
><i
class=
"fa fa-exchange"
></i>
{% trans 'Transfer' %}
</a>
</li>
</li>
...
...
This diff is collapsed.
Click to expand it.
templates/note/conso_form.html
+
112
−
58
View file @
f3b44f31
...
@@ -6,75 +6,129 @@
...
@@ -6,75 +6,129 @@
{% block contenttitle %}{% endblock %}
{% block contenttitle %}{% endblock %}
{% block content %}
{% block content %}
{# Regroup buttons under categories #}
<div
class=
"row mt-4"
>
{% regroup transaction_templates by category as categories %}
<div
class=
"col-sm-5 col-md-4"
>
<div
class=
"row"
>
<form
method=
"post"
onsubmit=
"window.onbeforeunload=null"
>
{# User details column #}
{% csrf_token %}
<div
class=
"col-xl-5"
>
<div
class=
"card border-success shadow mb-4"
>
<div
class=
"row"
>
<img
src=
"https://perso.crans.org/erdnaxe/site-crans/img/logo.svg"
<div
class=
"col-sm-5 mb-4"
>
alt=
""
class=
"img-fluid rounded mx-auto d-block"
>
{% if form.non_field_errors %}
<div
class=
"card-body text-center"
>
<p
class=
"errornote"
>
Paquito (aka. PAC) : -230 €
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</p>
{% endif %}
{% for field in form %}
<div
class=
"form-row{% if field.errors %} errors{% endif %}"
>
{{ field.errors }}
<div>
{{ field.label_tag }}
{% if field.is_readonly %}
<div
class=
"readonly"
>
{{ field.contents }}
</div>
{% else %}
{{ field }}
{% endif %}
{% if field.field.help_text %}
<div
class=
"help"
>
{{ field.field.help_text|safe }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div
class=
"col-sm-7"
>
{# User selection column #}
<div
class=
"card text-center shadow"
>
<div
class=
"col-xl-7"
>
{# Tabs for button categories #}
<div
class=
"card border-success shadow mb-4"
>
<div
class=
"card-header"
>
<div
class=
"card-header"
>
<ul
class=
"nav nav-tabs nav-fill card-header-tabs"
>
<p
class=
"card-text font-weight-bold"
>
{% for category in categories %}
Sélection des émitteurs
<li
class=
"nav-item"
>
</p>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#{{ category.grouper|slugify }}"
>
</div>
{{ category.grouper }}
<ul
class=
"list-group list-group-flush"
>
</a>
<li
class=
"list-group-item py-1 d-flex justify-content-between align-items-center"
>
</li>
Cras justo odio
{% endfor %}
<span
class=
"badge badge-dark badge-pill"
>
14
</span>
</li>
<li
class=
"list-group-item py-1 d-flex justify-content-between align-items-center"
>
Dapibus ac facilisis in
<span
class=
"badge badge-dark badge-pill"
>
1
</span>
</li>
</ul>
</ul>
<div
class=
"card-body"
>
TODO: reimplement select2 here in JS
</div>
</div>
</div>
</div>
</div>
</div>
{# Buttons column #}
<div
class=
"col-sm-7 col-md-8"
>
{# Show last used buttons #}
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body text-nowrap"
style=
"overflow:auto hidden"
>
<p
class=
"card-text text-muted font-weight-light font-italic"
>
Les boutons les plus utilisés s'afficheront ici.
</p>
</div>
</div>
{# Regroup buttons under categories #}
{% regroup transaction_templates by template_type as template_types %}
{# Tabs content #}
<div
class=
"card border-primary text-center shadow mb-4"
>
<div
class=
"card-body"
>
{# Tabs for button categories #}
<div
class=
"tab-content"
>
<div
class=
"card-header"
>
{% for category in categories %}
<ul
class=
"nav nav-tabs nav-fill card-header-tabs"
>
<div
class=
"tab-pane"
id=
"{{ category.grouper|slugify }}"
>
{% for template_type in template_types %}
<div
class=
"d-inline-flex flex-wrap justify-content-center"
>
<li
class=
"nav-item"
>
{% for button in category.list %}
<a
class=
"nav-link font-weight-bold"
data-toggle=
"tab"
href=
"#{{ template_type.grouper|slugify }}"
>
<button
class=
"btn btn-outline-dark rounded-0 flex-fill"
{{ template_type.grouper }}
name=
"button"
value=
"{{ button.name }}"
>
</a>
{{ button.name }} ({{ button.amount | pretty_money }})
</li>
</button>
{% endfor %}
{% endfor %}
</ul>
</div>
</div>
{# Tabs content #}
<div
class=
"card-body"
>
<div
class=
"tab-content"
>
{% for template_type in template_types %}
<div
class=
"tab-pane"
id=
"{{ template_type.grouper|slugify }}"
>
<div
class=
"d-inline-flex flex-wrap justify-content-center"
>
{% for button in template_type.list %}
<button
class=
"btn btn-outline-dark rounded-0 flex-fill"
name=
"button"
value=
"{{ button.name }}"
>
{{ button.name }} ({{ button.amount | pretty_money }})
</button>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
{# Mode switch #}
<div
class=
"card-footer border-primary"
>
<a
class=
"btn btn-sm btn-secondary float-left"
href=
"{% url 'note:template_list' %}"
>
<i
class=
"fa fa-edit"
></i>
Éditer
</a>
<div
class=
"btn-group btn-group-toggle float-right"
data-toggle=
"buttons"
>
<label
class=
"btn btn-sm btn-outline-primary active"
>
<input
type=
"radio"
name=
"options"
id=
"option1"
checked
>
Consomations simples
</label>
<label
class=
"btn btn-sm btn-outline-primary"
>
<input
type=
"radio"
name=
"options"
id=
"option2"
>
Consomations doubles
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-header"
>
<p
class=
"card-text font-weight-bold"
>
Historique des transactions récentes
</p>
</div>
{% render_table table %}
</div>
{% endblock %}
{% block extracss %}
<style>
.select2-container
{
max-width
:
100%
;
min-width
:
100%
;
}
</style>
{% endblock %}
{% endblock %}
{% block extrajavascript %}
{% block extrajavascript %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment