LT-195: Add Worklist menu item to go wordlist when audit page is shown

This commit is contained in:
Aysel Afsar 2016-02-17 11:31:07 -05:00
parent 7b106d9bdd
commit f46b6b0ebe
2 changed files with 31 additions and 11 deletions

View File

@ -6,15 +6,25 @@
{{fullName}} <span class="caret"></span> {{fullName}} <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu"> <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu">
<li> {{#if showWorklistMenu}}
<!-- TODO: Move this elsewhere in the Worklist? --> <li>
{{ >optionsButton }} <a href="worklist" id="worklist">
</li> <i class="fa fa-list-ul"></i> Worklist
<li> </a>
<a href="audit" id="audit"> </li>
<i class="fa fa-list-ul"></i> View Audit Log
</a> {{else}}
</li> <li>
<!-- TODO: Move this elsewhere in the Worklist? -->
{{ >optionsButton }}
</li>
<li>
<a href="audit" id="audit">
<i class="fa fa-list-ul"></i> View Audit Log
</a>
</li>
{{/if}}
<li> <li>
<a href="changePassword" id="changePassword"> <a href="changePassword" id="changePassword">
<i class="fa fa-lock"></i> Change Password <i class="fa fa-lock"></i> Change Password

View File

@ -6,18 +6,28 @@ Template.lesionTrackerLayout.events({
Router.go('/entrySignIn'); Router.go('/entrySignIn');
}); });
}, },
'click #changePassword': function() { 'click #worklist': function(e, template) {
Router.go('/changePassword'); template.showWorklistMenu.set(false);
},
'click #audit': function(e, template) {
template.showWorklistMenu.set(true);
} }
}); });
Template.lesionTrackerLayout.helpers({ Template.lesionTrackerLayout.helpers({
fullName: function() { fullName: function() {
return Meteor.user().profile.fullName; return Meteor.user().profile.fullName;
},
showWorklistMenu: function() {
return Template.instance().showWorklistMenu.get();
} }
}); });
Template.lesionTrackerLayout.onCreated(function() { Template.lesionTrackerLayout.onCreated(function() {
// showViewer to go to viewer from audit
this.showWorklistMenu = new ReactiveVar(false);
// Show countdown dialog // Show countdown dialog
var handle; var handle;
$(document).on('TriggerOpenTimeoutCountdownDialog', function(e, leftTime) { $(document).on('TriggerOpenTimeoutCountdownDialog', function(e, leftTime) {