Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Removed all the subActions (sub nav links) and updated styling to match
Browse files Browse the repository at this point in the history
addresses #361
  • Loading branch information
Darin Swanson committed Mar 16, 2016
1 parent b2bacb3 commit db4e77f
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 90 deletions.
22 changes: 1 addition & 21 deletions app/admin/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,7 @@ export default AbstractModuleRoute.extend({
allowSearch: false,
moduleName: 'admin',
sectionTitle: 'Admin',
subActions: function() {
var options = [{
text: this.get('i18n').t('admin.address_options'),
linkTo: 'admin.address'
}, {
text: this.get('i18n').t('admin.lookup_lists'),
linkTo: 'admin.lookup'
}];
if (this.currentUserCan('load_db')) {
options.push({
text: this.get('i18n').t('admin.load_db'),
linkTo: 'admin.loaddb'
});
}
options.push({
text: this.get('i18n').t('admin.users'),
linkTo: 'users.index'
});
return options;
}.property(),


editPath: function() {
return 'users.edit';
}.property(),
Expand Down
11 changes: 0 additions & 11 deletions app/appointments/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,5 @@ export default AbstractModuleRoute.extend(UserSession, {
}, {
name: 'visitTypesList',
findArgs: ['lookup', 'visit_types']
}],

subActions: [{
text: 'This Week',
linkTo: 'appointments.index'
}, {
text: 'Today',
linkTo: 'appointments.today'
}, {
text: 'Search',
linkTo: 'appointments.search'
}]
});
15 changes: 1 addition & 14 deletions app/imaging/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,5 @@ export default AbstractModuleRoute.extend({
allowSearch: false,
moduleName: 'imaging',
newButtonText: t('imaging.buttons.new_button'),
sectionTitle: t('imaging.section_title'),
subActions: function() {
let i18n = this.get('i18n');

return [{
text: i18n.t('labels.requests'),
linkTo: 'imaging.index'
}, {
text: i18n.t('labels.completed'),
linkTo: 'imaging.completed'
}];

}.property()

sectionTitle: t('imaging.section_title')
});
10 changes: 0 additions & 10 deletions app/inventory/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ export default AbstractModuleRoute.extend(FulfillRequest, InventoryId, Inventory
moduleName: 'inventory',

newButtonText: '+ new request',
subActions: [{
text: 'Requests',
linkTo: 'inventory.index'
}, {
text: 'Items',
linkTo: 'inventory.listing'
}, {
text: 'Reports',
linkTo: 'inventory.reports'
}],
sectionTitle: 'Inventory',

actions: {
Expand Down
9 changes: 1 addition & 8 deletions app/labs/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,5 @@ export default AbstractModuleRoute.extend({
allowSearch: false,
moduleName: 'labs',
newButtonText: '+ new lab',
sectionTitle: 'Labs',
subActions: [{
text: 'Requests',
linkTo: 'labs.index'
}, {
text: 'Completed',
linkTo: 'labs.completed'
}]
sectionTitle: 'Labs'
});
11 changes: 0 additions & 11 deletions app/medication/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ export default AbstractModuleRoute.extend({
findArgs: ['lookup', 'warehouse_list']
}],

subActions: function() {
let i18n = this.get('i18n');
return [{
text: i18n.t('labels.requests'),
linkTo: 'medication.index'
}, {
text: i18n.t('labels.completed'),
linkTo: 'medication.completed'
}];
}.property(),

actions: {
dispenseMedication: function() {
if (this.currentUserCan('fulfill_medication')) {
Expand Down
10 changes: 1 addition & 9 deletions app/patients/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ export default AbstractModuleRoute.extend(PatientId, {
}.bind(this));
}
},
moduleName: 'patients',
newButtonText: '+ new patient',
sectionTitle: 'Patients',
subActions: [{
text: 'Patient listing',
linkTo: 'patients.index'
}, {
text: 'Reports',
linkTo: 'patients.reports'
}]
moduleName: 'patients'
});
2 changes: 0 additions & 2 deletions app/styles/_bootstrap-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@
padding: 0;
color: $navy;
}

.panel-body { padding-top: 0; }
}
}

Expand Down
1 change: 1 addition & 0 deletions app/styles/_variables_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $view_sub_nav: #6784a2;
font-size: 28px;
line-height: 55px;
margin: 0;
float: left;
}

// layout
Expand Down
6 changes: 2 additions & 4 deletions app/templates/section.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

<div class="view-top-bar">
<h1 class="view-current-title">{{currentScreenTitle}}</h1>
</div>

<div class="view-sub-bar">

<div class="view-action-buttons">
{{#if newButtonAction}}
<button class="btn btn-primary" {{action newButtonAction}}>{{newButtonText}}</button>
Expand All @@ -20,7 +16,9 @@
{{/each}}
{{/if}}
</div>
</div>

<div class="view-sub-bar">
<ul class="nav nav-pills view-sub-nav">
{{#each subActions as |subAction|}}
{{#if subAction.statusQuery}}
Expand Down

0 comments on commit db4e77f

Please sign in to comment.