-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Patient documents #575
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3e5e229
Fix #475 issue about patient documents
mbayopanda 93f5176
Fix ui and style
mbayopanda 109761f
Merge branch 'master' of https://github.com/IMA-WorldHealth/bhima-2.X…
mbayopanda 4155962
Use of bootstrap panel instead of a custom style
mbayopanda f176427
Fix download link and style
mbayopanda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -83,4 +83,6 @@ | |
/* document upload thumbnail */ | ||
.document-upload-thumbnail { | ||
width: 100%; | ||
height: 300px; | ||
overflow: hidden; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,7 @@ | |
<!-- heading --> | ||
<div ng-if="$ctrl.session.enableOptionBar" class="heading"> | ||
<div class="left"> | ||
<b><i class="fa fa-universal-access"></i> {{ $ctrl.session.patient.reference }} / </b> | ||
{{ $ctrl.session.patient.first_name + ' ' + $ctrl.session.patient.last_name + ' ' + $ctrl.session.patient.middle_name }} | ||
<i class="glyphicon glyphicon-paperclip"></i> {{ 'PATIENT_DOCUMENT.DOCUMENTS' | translate }} | ||
({{ $ctrl.session.patientDocuments.length }}) | ||
</div> | ||
|
||
|
@@ -69,32 +68,11 @@ | |
<i class="fa fa-3x" ng-class="{{ '$ctrl.mimeIcon(doc.mimetype).icon' }}"></i> | ||
</a> | ||
<div class="media-body"> | ||
<b class="btn-sm pull-right"> | ||
<i ng-show="$ctrl.session.showAction && $ctrl.selectedIndex === $index" class="fa fa-angle-up"></i> | ||
<i ng-hide="$ctrl.session.showAction && $ctrl.selectedIndex === $index" class="fa fa-angle-down"></i> | ||
</b> | ||
|
||
<h4 class="media-heading">{{ doc.label }}</h4> | ||
|
||
<div ng-show="$ctrl.session.showAction && $ctrl.selectedIndex === $index"> | ||
<i class="fa fa-file-o"></i> | ||
{{ $ctrl.mimeIcon(doc.mimetype).label }} (~{{ doc.size | bytes }}) | ||
</div> | ||
|
||
<i class="fa fa-calendar-o"></i> | ||
{{ doc.timestamp | date }}, {{ 'FORM.LABELS.BY' | translate }} | ||
{{ doc.first + ' ' + doc.last }} | ||
|
||
<div ng-show="$ctrl.session.showAction && $ctrl.selectedIndex === $index" class="document-action" style="border-top:1px solid #ccc; padding-top:5px;"> | ||
<button | ||
title="{{ 'PATIENT_DOCUMENT.OVERVIEW' | translate }}" | ||
type="button" | ||
class="btn btn-sm btn-default"> | ||
<i class="fa fa-eye"></i> | ||
</button> | ||
|
||
<!-- actions buttons --> | ||
<div class="pull-right"> | ||
<a | ||
ng-href="/{{ doc.link }}" download="{{ doc.label }}" | ||
ng-href="/{{ doc.link }}" download="{{ doc.label + $ctrl.mimeIcon(doc.mimetype).ext }}" | ||
title="{{ 'PATIENT_DOCUMENT.DOWNLOAD' | translate }}" | ||
type="button" | ||
class="btn btn-sm btn-default"> | ||
|
@@ -109,6 +87,18 @@ <h4 class="media-heading">{{ doc.label }}</h4> | |
<i class="fa fa-trash"></i> | ||
</button> | ||
</div> | ||
|
||
<!-- title --> | ||
<h4 class="media-heading">{{ doc.label }}</h4> | ||
|
||
<!-- file size --> | ||
<i class="fa fa-file-o"></i> | ||
{{ $ctrl.mimeIcon(doc.mimetype).label }} (~{{ doc.size | bytes }}) <br> | ||
|
||
<!-- date and author --> | ||
<i class="fa fa-calendar-o"></i> | ||
{{ doc.timestamp | date }}, {{ 'FORM.LABELS.BY' | translate }} | ||
{{ doc.first + ' ' + doc.last }} | ||
</div> | ||
</li> | ||
</ul> | ||
|
@@ -142,15 +132,8 @@ <h4 class="media-heading">{{ doc.label }}</h4> | |
{{ doc.first + ' ' + doc.last }} | ||
</div> | ||
<div ng-show="$ctrl.session.showAction && $ctrl.selectedIndex === $index" class="document-actions"> | ||
<button | ||
title="{{ 'PATIENT_DOCUMENT.OVERVIEW' | translate }}" | ||
type="button" | ||
class="btn btn-sm btn-default"> | ||
<i class="fa fa-eye"></i> | ||
</button> | ||
|
||
<a | ||
ng-href="/{{ doc.link }}" download="{{ doc.label }}" | ||
ng-href="/{{ doc.link }}" download="{{ doc.label + $ctrl.mimeIcon(doc.mimetype).ext }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's generally not a good idea to include functions in the view - they will be re-evaluated on every Could this be pre-processed in the controller? Something like: // in the controller
documents.forEach(function (doc) {
doc.downloadLink = doc.label + mimeIcon(doc.mimetype).ext;
}); .. in the view.. <a ng-href="/{{doc.link}}" download="{{doc.downloadLink}}" ...></a> That would be much more efficient! |
||
title="{{ 'PATIENT_DOCUMENT.DOWNLOAD' | translate }}" | ||
type="button" | ||
class="btn btn-sm btn-default"> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads really nicely. The component API looks fantastic. Well done!