-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes the record timeline to work for read only users
Overrides the opal record timeline template with a template that works for read only users. Uses js to enforce read only as the record timeline does not have access to the request.
- Loading branch information
fredkingham
committed
May 25, 2023
1 parent
bc1b74b
commit 65e2fcf
Showing
1 changed file
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3> | ||
<i class="{{ icon }}"></i> {{ title }} | ||
{% if editable %} | ||
{% if singleton %} | ||
<i ng-show="!profile.readonly" class="fa fa-pencil edit pull-right pointer" | ||
ng-click="episode.recordEditor.editItem('{{ name }}', episode.{{ name }}[0])"></i> | ||
{% else %} | ||
<i ng-show="!profile.readonly" class="fa fa-plus-circle edit pull-right pointer" | ||
ng-click="episode.recordEditor.newItem('{{ name }}')"></i> | ||
{% endif %} | ||
{% endif %} | ||
</h3> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<div ng-if="$first" class="row"> | ||
<div class="col-md-3 patient-timeline"> | ||
<div class="patient-timeline-now"> | ||
<div class="patient-timeline-now-text bg-secondary"> | ||
Now | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div ng-repeat="item in episode.{{ name }}" class="row content-offset-20"> | ||
|
||
<div class="col-md-3 patient-timeline"> | ||
<a | ||
class="pointer" | ||
ng-show="!profile.readonly" | ||
ng-click="episode.recordEditor.editItem('{{ name }}', item)"> | ||
<div class="patient-timeline-speech-bubble"> | ||
<i class="fa fa-comments patient-timeline-speech-bubble-icon"></i> | ||
</div> | ||
<div ng-show="item.{{whenfield}}"> | ||
<div class="patient-timeline-date"> | ||
[[ item.{{whenfield}} | momentDateFormat:'DD MMM YYYY' ]] | ||
</div> | ||
</div> | ||
</a> | ||
<span | ||
ng-hide="!profile.readonly"> | ||
<div class="patient-timeline-speech-bubble"> | ||
<i class="fa fa-comments patient-timeline-speech-bubble-icon"></i> | ||
</div> | ||
<div ng-show="item.{{whenfield}}"> | ||
<div class="patient-timeline-date"> | ||
[[ item.{{whenfield}} | momentDateFormat:'DD MMM YYYY' ]] | ||
</div> | ||
</div> | ||
</span> | ||
</div> | ||
<div class="col-md-9"> | ||
<div class="patient-timeline-entry"> | ||
{% include detail_template %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |