-
-
Notifications
You must be signed in to change notification settings - Fork 214
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 #5232 from dimagi/master+caseDetailsInCC
Master+case details in cc
- Loading branch information
Showing
5 changed files
with
167 additions
and
23 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
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
66 changes: 66 additions & 0 deletions
66
corehq/apps/cloudcare/templates/cloudcare/includes/case_details.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,66 @@ | ||
{% load i18n %} | ||
|
||
<script type="text/html" id="template-crumbs"> | ||
<% if (childCase || parentCase ){ %> | ||
<div class="accordion-group" id="case-details"> | ||
<div class="accordion-heading accordion-toggle collapsed" data-toggle="collapse" href="#details-list"> | ||
<ul class='breadcrumb'> | ||
<i class="icon-double-angle-down"></i> | ||
<li>{% trans "Selected Case:" %}</li> | ||
<% if (parentCase){ %> | ||
<li <% if (childCase == null){ %> class="active" <% } %>> | ||
<% if (parentCase.href){ %> | ||
<a href="<%= parentCase.href %>"> | ||
<%= parentCase.text %> | ||
</a> | ||
<% } else { %> | ||
<%= parentCase.text %> | ||
<% } %> | ||
<% if (parentCase && childCase) { %> | ||
<span class="divider">/</span> | ||
<% } %> | ||
</li> | ||
<% } %> | ||
<% if (childCase) { %> | ||
<li class="active"><%= childCase.text %></li> | ||
<% } %> | ||
</ul> | ||
</div> | ||
<div id="details-list" class="accordion-body collapse"> | ||
<% if (parentCase) { %> | ||
<table class="table table-striped datatable"> | ||
<thead> | ||
<tr><th colspan="2">{% trans "Case Details for parent: " %}<%= parentCase.text %></th></tr> | ||
</thead> | ||
<tbody> | ||
<% _.each(parentCase.properties,function(field){ %> | ||
<tr> | ||
<th><%= field.key %></th> | ||
<td><%= field.value %></td> | ||
</tr> | ||
<% }); %> | ||
</tbody> | ||
</table> | ||
<% if (parentCase && childCase) { %> | ||
<br class="divider"></br> | ||
<% } %> | ||
<% } %> | ||
<% if (childCase) { %> | ||
<table class="table table-striped datatable"> | ||
<thead> | ||
<tr><th colspan="2">{% trans "Case Details for: " %}<%= childCase.text %></th></tr> | ||
</thead> | ||
<tbody> | ||
<% _.each(childCase.properties,function(field){ %> | ||
<tr> | ||
<th><%= field.key %></th> | ||
<td><%= field.value %></td> | ||
</tr> | ||
<% }); %> | ||
</tbody> | ||
</table> | ||
<% } %> | ||
</div> | ||
</div> | ||
<% } %> | ||
</script> |
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