-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
card list template and unit tests added
- Loading branch information
1 parent
5bf47a4
commit 6c10bab
Showing
7 changed files
with
210 additions
and
4 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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% load forms %} | ||
<div class="container content-offset"> | ||
<div class="panel panel-primary panel-container"> | ||
<div class="panel-heading"> | ||
<h2> | ||
<i class="fa fa-user-md"></i> | ||
[[ tag_display[currentTag] ]] | ||
</h2> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="row screen-only"> | ||
<form class="form-inline"> | ||
<div class="col-md-12"> | ||
{% include "patient_lists/partials/list_dropdown_menu.html" %} | ||
<div class="form-group pull-right"> | ||
<label class="offset-right-5" for="listfilter">{% icon "fa-filter" %} Filter </label> | ||
<input ui-event="{focus: 'focusOnQuery()', blur: 'blurOnQuery()'}" ng-model="query.hospital_number" type="text" class="form-control" id="listfilter" placeholder="Name or Hospital Num"> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-8 col-md-push-2"> | ||
<div ng-repeat="row in rows" class="panel panel-default content-offset patient-row"> | ||
<a class="panel-link" href="{{ patient_list.card_link }}"> | ||
{% include patient_list.card_header_template %} | ||
{% include patient_list.card_body_template %} | ||
</a> | ||
{% include patient_list.card_footer_template %} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="empty-list" ng-hide="num_episodes > 0"> | ||
<p class="lead text-center"> | ||
There are no patients on this list. | ||
</p> | ||
<p class="lead text-center"> | ||
<span class="screen-only"> | ||
Would you like to <a href="/pathway/#/add_patient">add one</a>? | ||
</span> | ||
</p> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% load forms %} | ||
<div class="panel-body"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
{% for column in columns %} | ||
{% if not forloop.counter0|divisibleby:2 %} | ||
<h4><strong> | ||
{% if column.icon %} | ||
{% icon column.icon %} | ||
{% endif %} | ||
{{ column.title }} | ||
</strong></h4> | ||
<p ng-repeat="item in row.diagnosis"> | ||
{% include column.detail_template_path %} | ||
</p> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
<div class="col-md-6"> | ||
{% for column in columns %} | ||
{% if forloop.counter0|divisibleby:2 %} | ||
<h4><strong> | ||
{% if column.icon %} | ||
{% icon column.icon %} | ||
{% endif %} | ||
{{ column.title }} | ||
</strong></h4> | ||
<p ng-repeat="item in row.diagnosis"> | ||
{% include column.detail_template_path %} | ||
</p> | ||
{% endif %} | ||
{% endfor %} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="panel-footer"> | ||
<div class="row"> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="panel-heading"> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<h3><i class="fa fa-user"></i> | ||
[[ row.demographics[0].first_name ]] [[ row.demographics[0].surname ]] [[ row.demographics[0].hospital_number ]] | ||
<small> | ||
[[ row.demographics[0].date_of_birth|shortDate ]] | ||
<span ng-show="row.demographics[0].date_of_birth"> | ||
([[ row.demographics[0].date_of_birth | age ]]) | ||
</span> | ||
</small> | ||
</h3> | ||
</div> | ||
|
||
</div> | ||
</div> |
21 changes: 21 additions & 0 deletions
21
opal/templates/patient_lists/partials/list_dropdown_menu.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% load forms %} | ||
<h1 > | ||
<div class="btn-group pull-left" uib-dropdown is-open="status.isopen"> | ||
<button type="button" class="btn btn-secondary" uib-dropdown-toggle ng-disabled="disabled" id="list-dropdown"> | ||
<i class="fa fa-user-md"></i> | ||
{{ patient_list.display_name }} | ||
<i class="fa fa-angle-down"></i> | ||
</button> | ||
<ul class="uib-dropdown-menu slides" role="menu" aria-labelledby="list-dropdown"> | ||
{% for list in lists %} | ||
{% if list.get_slug != list_slug %} | ||
<li> | ||
<a href="#/list/{{ list.get_slug }}"> | ||
{{ list.display_name }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</h1> |
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