-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35488 from dimagi/jc/enterprise-console-metric
Show metric description in Enterprise Console
- Loading branch information
Showing
5 changed files
with
103 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 38 additions & 20 deletions
58
corehq/apps/enterprise/templates/enterprise/partials/date_range_modal.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
{% load hq_shared_tags %} | ||
{% load i18n %} | ||
|
||
<div class="modal" role="dialog" tabindex="-1" id="enterpriseFormsDaterange"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">{% trans 'Customize Mobile Form Submissions Date Range' %}</h5> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans_html_attr 'Close' %}"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<select-toggle name="range_type" data-apply-bindings="false" params="value: presetType, options: presetOptions"></select-toggle> | ||
<div class="row"> | ||
<div class="col-xs-6 pt-1"> | ||
<input type="text" name="date_range" class="form-control" id="id_date_range" data-bind="visible: displayCustom"> | ||
<div id="clarifyingText" class="form-control-plaintext" data-bind="html: clarifyingText, visible: !displayCustom()"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-outline-primary" data-bind="click: onCancel" data-bs-dismiss="modal">{% trans 'Cancel' %}</button> | ||
<button type="button" class="btn btn-primary" data-bind="click: onApply" data-bs-dismiss="modal">{% trans 'Apply' %}</button> | ||
</div> | ||
<div class="modal fade" role="dialog" tabindex="-1" id="enterpriseFormsDaterange"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">{% trans 'Customize Mobile Form Submissions Date Range' %}</h5> | ||
<button | ||
type="button" class="btn-close" aria-label="{% trans_html_attr 'Close' %}" | ||
data-bs-dismiss="modal" | ||
></button> | ||
</div> | ||
<div class="modal-body"> | ||
<select-toggle | ||
name="range_type" | ||
data-apply-bindings="false" | ||
params="value: presetType, options: presetOptions" | ||
></select-toggle> | ||
<div class="row"> | ||
<div class="col-xs-6 pt-1"> | ||
<input type="text" name="date_range" class="form-control" id="id_date_range" data-bind="visible: displayCustom"> | ||
<div | ||
class="form-control-plaintext" id="clarifyingText" | ||
data-bind="html: clarifyingText, visible: !displayCustom()" | ||
></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button | ||
class="btn btn-outline-primary" type="button" | ||
data-bind="click: onCancel" | ||
data-bs-dismiss="modal" | ||
>{% trans 'Cancel' %}</button> | ||
<button | ||
class="btn btn-primary" type="button" | ||
data-bind="click: onApply" | ||
data-bs-dismiss="modal" | ||
>{% trans 'Apply' %}</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
53 changes: 35 additions & 18 deletions
53
corehq/apps/enterprise/templates/enterprise/partials/project_tile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,43 @@ | ||
{% load i18n %} | ||
|
||
<div class="col-md-6 col-lg-6 col-xl-3"> | ||
<div class="card text-center report-panel mb-3" data-slug="{{ report.slug }}" id="{{ report.slug }}"> | ||
<div class="card-header"> | ||
<div class="fs-4">{{ report.title }}</div> | ||
<div | ||
class="card text-center report-panel mb-3" id="{{ report.slug }}" | ||
data-slug="{{ report.slug }}" | ||
> | ||
<div class="card-header"> | ||
<h4 class="fs-5 pt-2">{{ report.title }}</h4> | ||
</div> | ||
<div class="card-body pb-5"> | ||
<div class="total fw-bold fs-1"> | ||
<i class="fa fa-spin fa-spinner"></i> | ||
</div> | ||
<div class="fs-5">{{ report.total_description }}</div> | ||
<div class="py-2"> | ||
{% if report.title == "Mobile Form Submissions" %} | ||
<button id="form_submission_dateRangeDisplay" type="button" data-bind="text: presetText" data-bs-toggle="modal" data-bs-target="#enterpriseFormsDaterange" data-sender="form_submission" class="btn btn-link fs-6"> </button> | ||
<button | ||
class="btn btn-link fs-6" id="form_submission_dateRangeDisplay" type="button" | ||
data-bind="text: presetText" | ||
data-bs-toggle="modal" | ||
data-bs-target="#enterpriseFormsDaterange" | ||
data-sender="form_submission" | ||
> </button> | ||
{% elif report.title == "SMS Usage" %} | ||
<button id="sms_dateRangeDisplay" type="button" data-bind="text: presetText" data-bs-toggle="modal" data-bs-target="#enterpriseFormsDaterange" data-sender="sms" class="btn btn-link fs-6"> </button> | ||
<button | ||
class="btn btn-link fs-6" id="sms_dateRangeDisplay" type="button" | ||
data-bind="text: presetText" | ||
data-bs-toggle="modal" | ||
data-bs-target="#enterpriseFormsDaterange" | ||
data-sender="sms" | ||
> </button> | ||
{% else %} | ||
<div class="form-control-plaintext fs-6">{{ report.subtitle|default:" " }}</div> | ||
<div class="form-control-plaintext fs-6">{{ " " }}</div> | ||
{% endif %} | ||
</div> | ||
<div class="card-body"> | ||
<h1 class="card-text total"> | ||
<i class="fa fa-spin fa-spinner"></i> | ||
</h1> | ||
<br> | ||
<button class="btn btn-primary btn-lg"> | ||
<i class="fa fa-envelope"></i> | ||
{% trans "Email Report" %} | ||
</button> | ||
</div> | ||
</div> | ||
<button class="btn btn-primary btn-lg"> | ||
<i class="fa fa-envelope"></i> | ||
{% trans "Email Report" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters